this is for holding javascript data
Deyan Ginev edited section_LaTeX_Programming_Only_if__.tex
almost 9 years ago
Commit id: 02ca72dbc4d591ea2263ce3f858f41b101ac44a2
deletions | additions
diff --git a/section_LaTeX_Programming_Only_if__.tex b/section_LaTeX_Programming_Only_if__.tex
index 610e9db..e18c0e8 100644
--- a/section_LaTeX_Programming_Only_if__.tex
+++ b/section_LaTeX_Programming_Only_if__.tex
...
\subsection{Generating a multiplication table}
To illustrate why you should \textbf{avoid} doing any low-level {\TeX} programming yourself\footnote{Unless you really know what you are doing, and you really must} here is an example of the hoops you need to jump through to typeset the multiplication table from one to five:
\noindent\begin{minipage}{0.6\textwidth} \noindent\begin{minipage}{0.7\textwidth}
\begin{lstlisting}
% We realize our loop variables via TeX counters
\newcounter{a}
...
\end{longtable}
\end{lstlisting}
\end{minipage}
\begin{minipage}{0.2\textwidth}
% Actual multiplication table implementation:
\newcounter{a}
\newcounter{b}
...
\expandafter\global\expandafter\allrows\expandafter{\the\allrows\hline}
\repeat
\noindent\begin{minipage}{0.1\textwidth}
\begin{longtable}{|rrr|}
\hline $A$ & $B$ & $A\times B$ \\ \hline
\printrows