From 57db2136844339b947bf0af8c518487514f8cee1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 19 Jul 2020 21:25:40 +0000 Subject: nimsticks (19jul20) git-svn-id: svn://tug.org/texlive/trunk@55877 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Master/texmf-dist/tex/latex/nimsticks') 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 %% -- cgit v1.2.3