From e0464890d25b3299ff008d946e49d3fcf657694b Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 2 Aug 2019 12:27:47 +0100 Subject: [PATCH] mdwref.dtx: Add a useful output-formatting hook. Rather than have `\xref@@' produce the output directly, because it's very hairy and hard to replace, have it call a new macro, `\formatxfref', to actually put the pieces together. This can be overridden comfortably, even by novices. Have the default `\formatxref' notice that `hyperref' is available and do use its fancier features to include the category name in the link. --- mdwref.dtx | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/mdwref.dtx b/mdwref.dtx index f1da45c..58bec2e 100644 --- a/mdwref.dtx +++ b/mdwref.dtx @@ -103,6 +103,18 @@ %\newcommand{\Xref}[1]{\xref[\toupper]{#1}} % \end{listing} % +% \DescribeMacro\formatxref +% The reference itself is typeset by calling +% \syntax{"\\formatxref{""}{""}{"