X-Git-Url: https://git.distorted.org.uk/~mdw/mdwtools/blobdiff_plain/2028c55c07634313b6e528d9524529456dbb1c02..b2fa76c1ab2a3450375bf999807941f7923a056a:/mdwref.dtx diff --git a/mdwref.dtx b/mdwref.dtx index 66c2d07..fe386b0 100644 --- a/mdwref.dtx +++ b/mdwref.dtx @@ -124,10 +124,21 @@ % 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} @@ -147,19 +158,12 @@ % % \begin{macro}{\defxref} % Defining prefixes is easy. We store the text for each prefix in a macro -% called \syntax{"\\xref$"}. 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$"}. % \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}