diff options
author | Peter Ward <peteraward@gmail.com> | 2012-07-29 23:43:29 +1000 |
---|---|---|
committer | Peter Ward <peteraward@gmail.com> | 2012-07-29 23:43:29 +1000 |
commit | c35db75eba1f67c6d6bbca9fefe7aaefb6b6d6e9 (patch) | |
tree | d32b851da74ed9b053248351f308a734b8c2a8b6 /docs/macros.tex | |
parent | b62e033801895ad633f702685e50cf367ae0adee (diff) |
Add start of tutorial.
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 %% + |