diff options
author | Karl Berry <karl@freefriends.org> | 2020-06-15 20:43:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-06-15 20:43:56 +0000 |
commit | 56cd0df67df77a677bd72b01d10d2cd5d4581a54 (patch) | |
tree | f6fa19e934db7c0539e137131413a62547cd740b /Master/texmf-dist/tex/luatex/optex/base/fnotes.opm | |
parent | 2c3a20ef9f039b8b2d912828fbdb45f5392b0d5d (diff) |
optex (15jun20)
git-svn-id: svn://tug.org/texlive/trunk@55562 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/optex/base/fnotes.opm')
-rw-r--r-- | Master/texmf-dist/tex/luatex/optex/base/fnotes.opm | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/luatex/optex/base/fnotes.opm b/Master/texmf-dist/tex/luatex/optex/base/fnotes.opm index 3a1f28cfc25..219b2cf2935 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/fnotes.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/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-20>} % loaded in format +\_codedecl \fnote {Footnotes, marginal notes OpTeX <2020-05-26>} % loaded in format \_doc ----------------------------- \`\_gfnotenum` is conter which counts footnotes globally in the document. @@ -92,7 +92,8 @@ \_ifpgfnote \_openref \_fi \_wref \_Xfnote{}% \_ifpgfnote \_ifcsname _fn:\_the\_gfnotenum \_endcsname \_else - \_opwarning{unknown \_noexpand\fnote mark. TeX me again} + \_opwarning{unknown \_noexpand\fnote mark. TeX me again}% + \_incr\_unresolvedrefs \_fi\_fi \_opfootnote\_fnset\_printfnotemarkB } @@ -126,18 +127,32 @@ \_public \fixmnotes ; \_doc ----------------------------- - The outer box of marginal note has zero width and zero depth and it is appended - after current line using `\vadjust` primitive or it is inverted to vertical mode + The \`\_mnoteD``{<text>}` macro sets the position the marginal note. + The outer box of marginal note has zero width and zero depth and it is appended + after current line using `\vadjust` primitive or it is inverted to vertical mode as a box with `\vskip-\baselineskip` followed. \_cod ----------------------------- -\_long\_def\_mnote#1{\_ifvmode {\_mnoteA{#1}}\_nobreak\_vskip-\_baselineskip \_else +\_def\_mnote #1#{\_ifx^#1^\_else \_mnoteC#1\_end \_fi \_mnoteD} +\_def\_mnoteC up#1\_end{\_mnoteskip=#1\_relax} % \mnote up<dimen> {<text>} syntax +\_long\_def\_mnoteD#1{\_ifvmode {\_mnoteA{#1}}\_nobreak\_vskip-\_baselineskip \_else \_lower\_dp\_strutbox\_hbox{}\_vadjust{\_kern-\_dp\_strutbox \_mnoteA{#1}\_kern\_dp\_strutbox}% \_fi } \_public \mnote ; \_doc ----------------------------- + The \`\mnoteskip` is a dimen which denotes the vertical shift of marginal + note from its normal position. Positive value means shift up, negative + down. The `\mnoteskip` register is set to zero + after the marginal note is printed. The new sytax `\mnote up<dimen>{<text>}` + is possible too, but public `\mnoteskip` is kept for backward compatibility. + \_cod ----------------------------- + +\_newdimen\_mnoteskip +\_public \mnoteskip ; + + \_doc ----------------------------- The \`\_mnoteA` macro does the real work. The \`\_lrmnote``{<left>}{<right>}` uses only first or only second parameter depending on the left or right marginal note. @@ -149,6 +164,7 @@ \_edef\_mnotesfixed{\_cs{_mn:\_the\_mnotenum}}% \_else \_opwarning{unknown \_noexpand\mnote side. TeX me again}\_openref + \_incr\_unresolvedrefs \_def\_mnotesfixed{\_right}% \_fi\_fi \_hbox to0pt{\_wref\_Xmnote{}\_everypar={}% @@ -172,4 +188,5 @@ \_endcode % ------------------------------------- - +2020-05-26 \mnote up<dimen> implemented +2020-03-20 released |