X-Git-Url: https://git.distorted.org.uk/~mdw/mdwtools/blobdiff_plain/39bf771aebd339019d1f11c0c0f60d30aab4ddc4..9cb5c64cc696cd59cf723021386b254ab8de5b13:/mdwref.dtx diff --git a/mdwref.dtx b/mdwref.dtx index f1da45c..1a40fb3 100644 --- a/mdwref.dtx +++ b/mdwref.dtx @@ -1,41 +1,33 @@ -% \begin{meta-comment} -% -% $Id: mdwref.dtx,v 1.3 2003/11/10 14:43:48 mdw Exp $ -% -% Slightly fancy cross-referencing stuff -% -% (c) 2007 Mark Wooding -% -% \end{meta-comment} -% % \begin{meta-comment} %% %% mdwref package -- slightly fancy cross-referencing stuff -%% Copyright (c) 2007 Mark Wooding +%% Copyright (c) 2007, 2019 Mark Wooding +%% +%% This file is part of the `mdwtools' LaTeX package collection. %% -%% This program is free software; you can redistribute it and/or modify -%% it under the terms of the GNU General Public License as published by -%% the Free Software Foundation; either version 2 of the License, or -%% (at your option) any later version. +%% `mdwtools' is free software: you can redistribute it and/or modify it +%% under the terms of the GNU General Public License as published by the +%% Free Software Foundation; either version 2 of the License, or (at your +%% option) any later version. %% -%% This program is distributed in the hope that it will be useful, -%% but WITHOUT ANY WARRANTY; without even the implied warranty of -%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -%% GNU General Public License for more details. +%% `mdwtools' is distributed in the hope that it will be useful, but +%% WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%% General Public License for more details. %% %% You should have received a copy of the GNU General Public License -%% along with this program; if not, write to the Free Software -%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%% along with `mdwtools'. If not, write to the Free Software Foundation, +%% Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %% % \end{meta-comment} % % \begin{meta-comment} %<+package>\NeedsTeXFormat{LaTeX2e} %<+package>\ProvidesPackage{mdwref} -%<+package> [2007/04/09 1.01 Cross-referencing] +%<+package> [2020/09/06 1.14.0 Cross-referencing] % \end{meta-comment} % -% ^^A\CheckSum{96} +% \CheckSum{131} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -115,15 +107,59 @@ % \]] % \end{grammar} % The \ is what you put on the front of your labels; the \ is -% the string to be typeset by |\xref|. +% 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{""}{""}{"