diff options
Diffstat (limited to 'macros/latex/contrib/wargame/source/chit/elements.dtx')
-rw-r--r-- | macros/latex/contrib/wargame/source/chit/elements.dtx | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/macros/latex/contrib/wargame/source/chit/elements.dtx b/macros/latex/contrib/wargame/source/chit/elements.dtx index 8708ca2a15..6585c94064 100644 --- a/macros/latex/contrib/wargame/source/chit/elements.dtx +++ b/macros/latex/contrib/wargame/source/chit/elements.dtx @@ -5,6 +5,12 @@ % % \subsubsection{Predefined \texttt{chit} element pictures} % +% \begin{macrocode} +\DeclareRobustCommand\chit@sep[2][/]{% + \foreach[count=\is] \s in {#2}{% + \ifnum\is>1\relax#1\fi% + \s}} +% \end{macrocode} % \begin{TikzKey}{/tikz/pics/chit/1 factor, % /tikz/pics/chit/2 factors, % /tikz/pics/chit/2 factors artillery, @@ -28,24 +34,32 @@ pics/chit/2 factors artillery/.style args={#1,#2,#3}{% code={ \chit@dbg{4}{ Chit 2 factors w/artillery: `#1' `#2' `#3'}% - \node[chit/factor,chit/2 factors,pic actions]{% - #1$\overset{\text{\scriptsize #3}}{\text{--}}$#2};}}, + \node[chit/factor,chit/2 factors]{% + {#1}$\overset{\text{\scriptsize #3}}{\text{--}}${#2}};}}, pics/chit/3 factors/.style args={#1,#2,#3}{% code={ \chit@dbg{4}{ Chit 3 factors: `#1' `#2' `#3'}% - \node[chit/factor,chit/3 factors,pic actions]{#1-#2-#3};}}, + \node[chit/factor,chit/3 factors]{#1-#2-#3};}}, pics/chit/4 factors/.style args={#1,#2,#3,#4}{% code={ \chit@dbg{4}{ Chit 3 factors: `#1' `#2' `#3' `#4'}% - \node[chit/factor,chit/4 factors,pic actions]{#1-#2-#3-#4};}}, + \node[chit/factor,chit/4 factors]{#1-#2-#3-#4};}}, chit/identifier/.pic={ \chit@dbg{4}{ Chit identifier: `#1'}% \node[chit/identifier,pic actions]{#1}; }, + chit/identifiers/.pic={ + \chit@dbg{4}{ Chit identifiers: `#1'}% + \node[chit/identifier,pic actions]{\chit@sep{#1}}; + }, chit/small identifier/.pic={ \chit@dbg{4}{ Chit small identifier: `#1'}% \node[chit/small identifier,pic actions]{#1}; }, + chit/small identifiers/.pic={ + \chit@dbg{4}{ Chit small identifiers: `#1'}% + \node[chit/small identifier,pic actions]{\chit@sep{#1}}; + }, chit/identifier macro/.pic={% \chit@dbg{4}{ Chit identifier macro: \meaning#1} \edef\chit@i@tmp{#1} @@ -69,32 +83,35 @@ \tikzset{% chit/factor/.style={ shape=rectangle, - font=\sffamily\bfseries\large, + font=\sffamily\bfseries\fontsize{12}{14}\selectfont, anchor=base, inner sep=0, %text=pgfstrokecolor, draw=none, fill=none, + transform shape, }, chit/1 factor/.style={}, chit/2 factors/.style={}, chit/3 factors/.style={}, - chit/4 factors/.style={text/.append style=\small}, + chit/4 factors/.style={text/.append style=\fontsize{10}{12}\selectfont}, chit/identifier/.style={ shape=rectangle, - font=\sffamily\bfseries\scriptsize, + font=\sffamily\bfseries\fontsize{8}{9}\selectfont, inner sep=0, % text=pgfstrokecolor, draw=none, fill=none, + transform shape, }, chit/small identifier/.style={ shape=rectangle, - font=\sffamily\bfseries\tiny, + font=\sffamily\bfseries\fontsize{6}{7}\selectfont, inner sep=0, % text=pgfstrokecolor, draw=none, fill=none, + transform shape, }, } % \end{macrocode} |