X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw-ref.tex;h=86d41a19c3dc67d14a68ef7dc9c231ec1012e952;hb=refs%2Ftags%2Fv2.0.1;hp=74143e212b2825dd93013bdf0e1307a1ce917a0a;hpb=0c237a9f7495940ef0e74778bde04962f652a02a;p=ucwmac.git diff --git a/ucw-ref.tex b/ucw-ref.tex index 74143e2..86d41a1 100644 --- a/ucw-ref.tex +++ b/ucw-ref.tex @@ -2,7 +2,8 @@ % Written by Martin Mares in 2018 and placed into public domain % ------------------------------------------------------------------------- -\input ucw-link.tex +\ucwdefmodule{ref} +\ucwmodule{link} % We maintain a collection of objects. Each object has: % - type (namespace -- e.g., chapter) @@ -43,7 +44,7 @@ \ifx\optarg\relax \let\currentid\relax \else - \edef\currentid{#1\optarg}% + \edef\currentid{#1:\optarg}% \writeid{\currentid}{#2}% \destpos{\currentid}% \fi @@ -52,11 +53,11 @@ % A low-level interface for typesetting references: produces a clickable link % to the identifier #2 of type #1 with a label translated by macro #3 (use \relax % for no translation). -\def\reflink#1#2#3{\expandafter\ifx\csname id:#1#2\endcsname\relax +\def\reflink#1#2#3{\expandafter\ifx\csname id:#1:#2\endcsname\relax {\ifx\bo\undefined\bf\else\bo\fi ??}% - \immediate\write16{*** Warning: Reference #1 undefined ***}% + \immediate\write16{*** Warning: Reference #1:#2 undefined ***}% \else - \link{#1#2}{#3{\csname id:#1#2\endcsname}}% + \link{#1:#2}{#3{\csname id:#1:#2\endcsname}}% \fi }