chiark
/
gitweb
/
~mdw
/
mdwtools
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2028c55
)
mdwref.dtx: Build the table the old-fashioned way.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 22 Jul 2022 10:30:42 +0000
(11:30 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 22 Jul 2022 10:33:34 +0000
(11:33 +0100)
It's going to become impractical to do this. Besides, the machinery was
only used for the documentation (which is rather nasty) and doesn't work
well in other circumstances.
mdwref.dtx
patch
|
blob
|
blame
|
history
diff --git
a/mdwref.dtx
b/mdwref.dtx
index 66c2d07bbb83775d3fb92250e4c3fef2d26ab9d2..fe386b09f46da204a585cc41600c2d0fc1c8c534 100644
(file)
--- 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}
% 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}
% \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}
% \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
%
% \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{%
% \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}
\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}
% \end{macro}
%
% \begin{macro}{\formatxref}