summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/fnotes.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/fnotes.opm')
-rw-r--r--macros/luatex/optex/fnotes.opm14
1 files changed, 9 insertions, 5 deletions
diff --git a/macros/luatex/optex/fnotes.opm b/macros/luatex/optex/fnotes.opm
index 9f9a9d3f5e..91365879a9 100644
--- a/macros/luatex/optex/fnotes.opm
+++ b/macros/luatex/optex/fnotes.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \fnote {Footnotes, marginal notes OpTeX <2020-03-19>} % loaded in format
+\_codedecl \fnote {Footnotes, marginal notes OpTeX <2020-03-20>} % loaded in format
\_doc -----------------------------
\begitems
@@ -41,16 +41,20 @@
footnote itself, then you can define `\_printfnotemarkA` and `\_printfnotemarkB`.
The following example shows an implementation of hyperlinked footnotes
(from text to footnote and bacward):
- \begtt
- \def\_printfnotemarkA{\ilink[fnB:\the\gfnotenum]{\_printfnotemark}\dest[fnA::\the\gfnotenum]}
- \def\_printfnotemarkB{\ilink[fnA:\the\gfnotenum]{\_printfnotemark}\dest[fnB::\the\gfnotenum]}
- \endtt
\_cod -----------------------------
\_def \_printfnotemark {$^{\_fnotenum}$} % default footnote mark
\_def \_printfnotemarkA {\_printfnotemark} % footnote marks used in text
\_def \_printfnotemarkB {\_printfnotemark} % footnote marks used in front of footnotes
+\_def \_fnotelinks#1#2{% <inText color> <inFootnote color>
+ \_def\_printfnotemarkA{\_link[fnt:\the\_gfnotenum]{\_localcolor#1}{\_printfnotemark}%
+ \_dest[fnf:\the\_gfnotenum]}%
+ \_def\_printfnotemarkB{\_link[fnf:\the\_gfnotenum]{\_localcolor#2}{\_printfnotemark}%
+ \_dest[fnt:\the\_gfnotenum]}%
+}
+\public \fnotelinks ;
+
\_doc ----------------------------
Each footnote saves the `\_Xfnote` (without parameter) to the `.ref`
file (if `\openref`). We can create the mapping from <gfnotenum> to <pgfnotenum>