summaryrefslogtreecommitdiff
path: root/docs/macros.tex
diff options
context:
space:
mode:
authorPeter Ward <peteraward@gmail.com>2012-07-29 23:43:29 +1000
committerPeter Ward <peteraward@gmail.com>2012-07-29 23:43:29 +1000
commitc35db75eba1f67c6d6bbca9fefe7aaefb6b6d6e9 (patch)
treed32b851da74ed9b053248351f308a734b8c2a8b6 /docs/macros.tex
parentb62e033801895ad633f702685e50cf367ae0adee (diff)
Add start of tutorial.
Diffstat (limited to 'docs/macros.tex')
-rw-r--r--docs/macros.tex19
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 %%
+