From: Mark Wooding Date: Fri, 22 Jul 2022 10:40:53 +0000 (+0100) Subject: mdwref.dtx: Introduce `\defxref*' for more complex typesetting. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mdwtools/commitdiff_plain/ae8b308b845cb0f6ed748ceac7f9c49964788abf mdwref.dtx: Introduce `\defxref*' for more complex typesetting. Use this for equation numbers, which are traditionally just set in parentheses. --- diff --git a/mdwref.dtx b/mdwref.dtx index d7d24e0..0075487 100644 --- a/mdwref.dtx +++ b/mdwref.dtx @@ -110,6 +110,26 @@ % the string to be typeset by |\xref|. Such references are typeset using % |\formatxref|, described below. % +% For references that don't fit into this pattern, there's a more complex +% definition syntax using |\defxref*|: +% \begin{grammar} +% ::= \[[ +% "\\defxref*" +% "{" "}" +% "{" "}" +% \]] +% \end{grammar} +% The \ is given four arguments. +% \begin{itemize} +% \item |#1| is the name of a macro which should be given two arguments, +% respectively the reference name and the body of the hyperlink to +% generate. +% \item |#2| is the name of a macro to apply to the reference name to typeset +% the actual reference. +% \item |#3| is the \ token, or |\relax|. +% \item |#4| is the reference name itself. +% \end{itemize} +% % \DescribeMacro\formatxref % Simple references are typeset by calling % \syntax{"\\formatxref{""}{""}{"