summaryrefslogtreecommitdiff
path: root/docs/macros.tex
blob: 2f16900c2d281818d1c41124681a1a1355fe9a3c (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 %%