diff options
author | Karl Berry <karl@freefriends.org> | 2020-07-19 21:25:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-07-19 21:25:40 +0000 |
commit | 57db2136844339b947bf0af8c518487514f8cee1 (patch) | |
tree | 2682067e4f26630f381a4561e5b78eafe65e93d5 /Master/texmf-dist/tex/latex/nimsticks | |
parent | 1a4a24b8f06ee63757ee0fc7e0ce2e6291733e37 (diff) |
nimsticks (19jul20)
git-svn-id: svn://tug.org/texlive/trunk@55877 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nimsticks')
-rw-r--r-- | Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty b/Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty index ae3241b7b24..c00c10004ae 100644 --- a/Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty +++ b/Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty @@ -26,9 +26,10 @@ %% SOFTWARE. %% -\ProvidesPackage{nimsticks}[2020/07/12 nimsticks 1.0.1] +\ProvidesPackage{nimsticks}[2020/07/19 nimsticks 1.1] \RequirePackage[first=-100,last=100,seed=0]{lcg} \RequirePackage{tikz} +\RequirePackage{ifthen} \@ifundefined{drawnimstick}{} {\PackageWarning{nimsticks}{Command `drawnimstick' already defined}} \@ifundefined{nimgame}{} @@ -58,16 +59,16 @@ \draw[very thick] (\topx,0) -- (\botx,0.5);% \end{tikzpicture}% } -\newcommand{\nimgame}[1]{% - \begin{center}% - \def\listofgames{#1}% +\newcommand{\nimgame}[2][block]{% + \ifthenelse{\equal{#1}{inline}}{}{\begin{center}}% + \def\listofgames{#2}% \foreach \heap in \listofgames {% \foreach \heapindex in {1, ..., \heap} {% \drawnimstick\hspace{0.5mm}% }% \hspace{10mm}% }% - \end{center}% + \ifthenelse{\equal{#1}{inline}}{}{\end{center}}% } \endinput %% |