Deyan Ginev edited section_LaTeX_Programming_Only_if__.tex  almost 9 years ago

Commit id: 560271a6f0cc93d42b1ae46d40b9e62d6549ad66

deletions | additions      

       

\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.7\textwidth}  \begin{lstlisting}  % We realize our loop variables via TeX counters  \newcounter{a} 

\printrows  \end{longtable}  \end{lstlisting}  \end{minipage}  \noindent\begin{minipage}{0.2\textwidth}  % Actual multiplication table implementation:  \newcounter{a}  \newcounter{b} 

\begin{longtable}{|rrr|}  \hline $A$ & $B$ & $A\times B$ \\ \hline  \printrows  \end{longtable} \end{minipage}