diff options
author | Norbert Preining <norbert@preining.info> | 2023-03-30 03:01:43 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-03-30 03:01:43 +0000 |
commit | 0a426619b66178dd2257f1ece60ff80f86f40e88 (patch) | |
tree | fb35be40eb794817645905b4813c091d5f75dda9 /macros/latex/contrib/wargame/source/chit/modifiers.dtx | |
parent | 395caca342df230d7d98a658477b7f54c3ee5845 (diff) |
CTAN sync 202303300301
Diffstat (limited to 'macros/latex/contrib/wargame/source/chit/modifiers.dtx')
-rw-r--r-- | macros/latex/contrib/wargame/source/chit/modifiers.dtx | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/macros/latex/contrib/wargame/source/chit/modifiers.dtx b/macros/latex/contrib/wargame/source/chit/modifiers.dtx new file mode 100644 index 0000000000..b42ee5790f --- /dev/null +++ b/macros/latex/contrib/wargame/source/chit/modifiers.dtx @@ -0,0 +1,42 @@ +% \iffalse +% -------------------------------------------------------------------- +% <*chit> +% \fi +% \subsubsection{Modifications to chits} +% +% These defines overlays one can add on top of chits, for example to +% shade a chit, put a semi-transparent red cover to indicate +% elimination, and similar. +% +% \begin{macrocode} +\tikzset{ + pics/chit/shade/.style={ + code={% + \path[fill=white,opacity=#1,pic actions] (-.6,-.6) rectangle(.6,.6);}}, + pics/chit/eliminate/.style={ + code={% + \path[fill=red,opacity=#1,pic actions] (-.6,-.6) rectangle(.6,.6);}}, + pics/chit/shade/.default=0.5, + pics/chit/eliminate/.default=0.25, + dummy chit/.style={draw=none,fill=none,chit={}}, +} +\def\shadechit{% + \@ifnextchar[{\sh@dechit}{\sh@dechit[.5]}%] +} +\def\eliminatechit{% + \@ifnextchar[{\elimin@techit}{\elimin@techit[.25]}%] +} +\def\sh@dechit[#1](#2){% + % \message{^^JShading chit with opacity `#1'}% + \pic[transform shape] at (#2) {chit/shade=#1};% + \@ifnextchar;{\@gobble}{}} +\def\elimin@techit[#1](#2){% + \pic[transform shape] at (#2) {chit/eliminate=#1};% + \@ifnextchar;{\@gobble}{}} +% \end{macrocode} +% +% +% \iffalse +% -------------------------------------------------------------------- +% </chit> +% \fi |