mdwref.dtx: Build the table the old-fashioned way.
[mdwtools] / mdwref.dtx
index 66c2d07..fe386b0 100644 (file)
 % A number of useful prefixes are already defined, following my usual
 % preferences; they're shown in \xref{tab:defs}.
 % \begin{table}
-%   \def\i#1#2{\texttt{#1}&\texttt{#2}\\}
 %   \begin{tabular}[C]{ll} \hlx*{hv}
 %   \textbf{Prefix} & \textbf{Text} \\ \hlx{vhv}
-%   \csname xref@defs\endcsname
+%     \texttt{ch}       & chapter $n$                                   \\
+%     \texttt{app}      & appendix $n$                                  \\
+%     \texttt{sec}      & section $n$                                   \\
+%     \texttt{def}      & definition $n$                                \\
+%     \texttt{th}       & theorem $n$                                   \\
+%     \texttt{lem}      & lemma $n$                                     \\
+%     \texttt{prop}     & proposition $n$                               \\
+%     \texttt{cor}      & corollary $n$                                 \\
+%     \texttt{fig}      & figure $n$                                    \\
+%     \texttt{tab}      & table $n$                                     \\
+%     \texttt{eq}       & equation $n$                                  \\
+%     \texttt{i}        & item $n$                                      \\
+%     \texttt{ex}       & exercise $n$                                  \\
 %   \hlx*{vh}\end{tabular}
 %   \caption{Predefined reference prefixes}
 %   \label{tab:defs}
 %
 % \begin{macro}{\defxref}
 % Defining prefixes is easy.  We store the text for each prefix in a macro
-% called \syntax{"\\xref$"<prefix>}.  The only catch is that, for the
-% purposes of generating \xref{tab:defs}, we maintain a list of the prefixes
-% which have been defined so far, but this is fairly easy.
+% called \syntax{"\\xref$"<prefix>}.
 %    \begin{macrocode}
 \def\defxref#1#2{%
-  \toks@\expandafter{\xref@defs\i{#1}{#2}}\xdef\xref@defs{\the\toks@}%
   \expandafter\def\csname xref$#1\endcsname{#2}%
 }
 %    \end{macrocode}
-% The list is obviously empty initially.
-%    \begin{macrocode}
-\gdef\xref@defs{}
-%    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\formatxref}