I would not recommend abusing the feynmf package. In the past I have used the picture environment (with the eepic
package) to do precisely this.
Table 6.2 in page 185 of these lecture notes (PDF file), I typeset the Dynkin diagrams using the picture environment. I'm happy to make the code available. Here's a sample for the $A_n$ Dynkin diagram:
\begin{picture}(50,7)
\multiput(5,1)(10,0){5}{\circle{2}}
\multiputlist(10,1)(10,0)%
{{\line(1,0){8}},{\line(1,0){8}},{$\cdots$},{\line(1,0){8}}}
\multiputlist(5,3)(10,0){$\scriptscriptstyle 1$,%
$\scriptscriptstyle 2$,$\scriptscriptstyle 3$,%
$\scriptscriptstyle \ell{-}1$,$\scriptscriptstyle \ell$}
\end{picture}
The diagram is decorated with a labelling of the nodes, by the way.
Using the tikz-dimline
package will get you:
\documentclass[tikz,border=2mm]{standalone}
\usepackage{tikz-dimline}\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}[]
\path (0,0) coordinate (A)
(4,0) coordinate (B)
(12,0) coordinate (C)
(16,0) coordinate (D)
(0,2) coordinate (E)
(4,2) coordinate (F)
(16,2) coordinate (G);
\draw[gray!10,fill=yellow] (E) rectangle (B) node[black] at ($(E)!.5!(B)$){bus1};
\draw[gray!10,fill=red] (F) rectangle (C) node[black] at ($(F)!.5!(C)$){overlapping};
\draw[gray!10,fill=green] (C) rectangle (G) node[black] at ($(C)!.5!(G)$){bus2};
\dimline [color=blue,
line style={thick},
extension start style={blue,thin},
extension end style={blue,thin}
]{($(E)+(0,.5)$)}{($(G)+(0,.5)$)}{$t_c$};
\dimline [color=blue,
line style={thick},
extension start style={blue,thin},
extension end style={blue,thin},
extension start length=-1cm,
extension end length=-1cm
]{($(A)-(0,.5)$)}{($(B)-(0,.5)$)}{$(t_c-t_{12})/2$};
\dimline [color=blue,
line style={thick},
extension start style={blue,thin},
extension end style={blue,thin},
extension start length=-1cm,
extension end length=-1cm
]{($(B)-(0,.5)$)}{($(C)-(0,.5)$)}{$t_{12}$};
\dimline [color=blue,
line style={thick},
extension start style={blue,thin},
extension end style={blue,thin},
extension start length=-1cm,
extension end length=-1cm
]{($(C)-(0,.5)$)}{($(D)-(0,.5)$)}{$(t_c-t_{12})/2$};
\end{tikzpicture}
\end{document}
Using Tarass's excellent solution from Dimensioning of a technical drawing in TikZ will get you:
\documentclass[tikz,border=2mm]{standalone}
\usepackage{xparse}
\usetikzlibrary{calc}
\tikzset{%
Cote node/.style={%
midway,
sloped,
fill=white,
inner sep=1.5pt,
outer sep=2pt
},
Cote arrow/.style={%
<->,
>=latex,
very thin
}
}
\makeatletter
\NewDocumentCommand{\Cote}{%
s % cotation avec les flèches à l'extérieur
D<>{1.5pt} % offset des traits
O{.75cm} % offset de cotation
m % premier point
m % second point
m % étiquette
D<>{o} % () coordonnées -> angle
% h -> horizontal,
% v -> vertical
% o or what ever -> oblique
O{} % parametre du tikzset
}{%
{%
\tikzset{#8}
\coordinate (@1) at #4 ;
\coordinate (@2) at #5 ;
\if #7v % Cotation verticale
\coordinate (@0) at ($($#4!.5!#5$) + (#3,0)$) ;
\coordinate (@4) at (@0|-@1) ;
\coordinate (@5) at (@0|-@2) ;
\else
\if #7h % Cotation horizontale
\coordinate (@0) at ($($#4!.5!#5$) + (0,#3)$) ;
\coordinate (@4) at (@0-|@1) ;
\coordinate (@5) at (@0-|@2) ;
\else % cotation encoche
\ifnum\pdfstrcmp{\unexpanded\expandafter{\@car#7\@nil}}{(}=\z@
\coordinate (@5) at ($#7!#3!#5$) ;
\coordinate (@4) at ($#7!#3!#4$) ;
\else % cotation oblique
\coordinate (@5) at ($#5!#3!90:#4$) ;
\coordinate (@4) at ($#4!#3!-90:#5$) ;
\fi
\fi
\fi
\draw[very thin,shorten >= #2,shorten <= -2*#2] (@4) -- #4 ;
\draw[very thin,shorten >= #2,shorten <= -2*#2] (@5) -- #5 ;
\IfBooleanTF #1 {% avec étoile
\draw[Cote arrow,-] (@4) -- (@5) node[Cote node] {#6\strut};
\draw[Cote arrow,<-] (@4) -- ($(@4)!-6pt!(@5)$) ;
\draw[Cote arrow,<-] (@5) -- ($(@5)!-6pt!(@4)$) ;
}{% sans étoile
\ifnum\pdfstrcmp{\unexpanded\expandafter{\@car#7\@nil}}{(}=\z@
\draw[Cote arrow] (@5) to[bend right] node[Cote node] {#6\strut} (@4) ;
\else
\draw[Cote arrow] (@4) -- (@5) node[Cote node] {#6\strut};
\fi
}
}
}
\makeatother
\begin{document}
\begin{tikzpicture}
\path (0,0) coordinate (A)
(4,0) coordinate (B)
(12,0) coordinate (C)
(16,0) coordinate (D)
(0,2) coordinate (E)
(4,2) coordinate (F)
(16,2) coordinate (G);
\draw[gray!10,fill=yellow] (E) rectangle (B) node[black] at ($(E)!.5!(B)$){bus1};
\draw[gray!10,fill=red] (F) rectangle (C) node[black] at ($(F)!.5!(C)$){overlapping};
\draw[gray!10,fill=green] (C) rectangle (G) node[black] at ($(C)!.5!(G)$){bus2};
\Cote{(E)}{(G)}{$t_c$}<h>
\Cote{(A)}{(B)}{$(t_c-t_{12})/2$}
\Cote{(B)}{(C)}{$t_{12}$}
\Cote{(C)}{(D)}{$(t_c-t_{12})/2$}
\end{tikzpicture}
\end{document}
Best Answer
And now let me show you the right way to do it.
Produces:
I'm sure that there are cleaner ways to do this, and optimisations (though, for the record, some of my experiments with the
chains
library didn't work correctly - indeed, I couldn't get some of the examples in the manual to compile). I tried to get it as close to the book as I could, whilst looking for a slightly more expansive and "cleaner" style (at least, as far as the preview in Google docs goes).One of these days I'll learn what these diagrams actually mean ...
Packages loaded:
geometry
: just to get the whole lot on one pageamssymb
: to get the triple arrows and the left-right double arrowmathtools
: to get themathrlap
command as I preferred the labels centred on the\alpha
rather than on the whole label.tikz
: to do the actual diagramchains
: to do the automatic placement of the nodes