diff options
Diffstat (limited to 'docs/macros.tex')
-rw-r--r-- | docs/macros.tex | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/macros.tex b/docs/macros.tex new file mode 100644 index 0000000..2f16900 --- /dev/null +++ b/docs/macros.tex @@ -0,0 +1,19 @@ +%%- macro make_board(board) %% +\begin{verbatim} +%% for row in board %% +%%- if loop.first %% +<- ' ' > +%%- for n in range(row |length) %% +<- ' ' ~ n > +%%- endfor %% +< ' +' ~ '-+' * (row | length) > +%%- endif %% +< loop.index0 ~ '|' > +%%- for cell in row %% +<- cell >| +%%- endfor %% +< ' +' ~ '-+' * (row | length) > +%%- endfor %% +\end{verbatim} +%%- endmacro %% + |