summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/base/doc.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/base/doc.opm')
-rw-r--r--macros/luatex/optex/base/doc.opm9
1 files changed, 9 insertions, 0 deletions
diff --git a/macros/luatex/optex/base/doc.opm b/macros/luatex/optex/base/doc.opm
index c86199d76c..d098cc6754 100644
--- a/macros/luatex/optex/base/doc.opm
+++ b/macros/luatex/optex/base/doc.opm
@@ -96,6 +96,8 @@
\_endgroup \_ttskip
\_isnextchar\_par{}{\_noindent}%
}
+\_def\_remfirstunderscore#1{\_ea\_remfirstunderscoreA#1\_relax#1}
+\_def\_remfirstunderscoreA#1#2\_relax#3{\_if _#1\_def#3{#2}\_fi}
\_doc -----------------------------
The lines in the listing mode have Yellow background.
@@ -183,6 +185,12 @@
\_doc -----------------------------
Main documentation point and hyperlinks to/from it.
+ Main documentation point: \code{\\`\\foo`}.
+ User-level documentation point: \code{\\^`\\foo}, first occurence only.
+ Next occurences are only links to main documentation point.
+ Link to user-level documentation point: \code{\\~`\\foo}.
+ If user-level documentation point follows the main documentation point
+ then use \code{\\_forwardlink\\`\\foo`}.
\_cod -----------------------------
\_activettchar`
@@ -194,6 +202,7 @@
\_link[cs:^\_tmp]{\Red}{\_tt\_csstring\\\_tmp}\_else
{\_tt\Red\_csstring\\\_tmp}\_fi}%
}
+\_def\_forwardlink\`#1`{{\_slet{cs:^\_csstring#1}{relax}\`#1`}}
\_def\^`#1{\_leavevmode\_edef\_tmp{\_csstring#1}\_iindex{\_tmp}%
\_hbox{\_ifcsname cs:^\_tmp\_endcsname \_else \_dest[cs:^\_tmp]\_sxdef{cs:^\_tmp}{}\_fi