diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-09 22:01:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-09 22:01:07 +0000 |
commit | fe491675252d9e6fe3ae6b1c67b198daed5cf936 (patch) | |
tree | ec846c8c711f8d0cdc9ab381f175d71746864a78 /Master/texmf-dist/tex/luatex/optex/base/ref-file.opm | |
parent | 8790b9df74c6be439ccba2d4c53edfb57407ad6b (diff) |
optex (9feb21)
git-svn-id: svn://tug.org/texlive/trunk@57691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/optex/base/ref-file.opm')
-rw-r--r-- | Master/texmf-dist/tex/luatex/optex/base/ref-file.opm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm b/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm index fd7c1101d76..d594bf88c04 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \openref {File for references <2020-02-14>} % preloaded in format +\_codedecl \openref {File for references <2021-02-05>} % preloaded in format \_doc -------------------------- The \`\_inputref` macro is used in `\everyjob`. It reads `\jobname.ref` file @@ -34,7 +34,10 @@ the \`\_wref` `\<macro>{<data>}` is redefined in order to save the line `\<macro><data>` to the `.ref` file using asynchronous `\write` primitive. Finally, the `\_openref` destroys itself, because we - need not open the file again. + need not open the file again.\nl + The `\_wref``<csname>{<params>}` does exactly `\write\_reffile{\string<csname><params>}` + in this case and \`\_ewref``<csname>{<params>}` does + `\write\_reffile{\string<csname><expanded-params>}`. \_cod --------------------- \_def\_openref {% @@ -47,7 +50,8 @@ \_immediate\_write\_reffile {\_pcent\_pcent\_space OPTeX <\_optexversion> - REF file (#1)}% \_immediate\_wref \Xrefversion{{\_REFversion}}% } -\def\openref{\_openref} +\_def\_ewref #1#2{\_edef\_ewrefA{#2}\_ea\_wref\_ea#1\_ea{\_ewrefA}} +\_def\openref{\_openref} \_doc ---------------------- We are using the convention that the macros used in `.ref` file are named @@ -65,7 +69,7 @@ versa. \_cod ---------------------- -\_def\_REFversion{4} % actual version of .ref files in OpTeX +\_def\_REFversion{5} % actual version of .ref files in OpTeX \_def\_Xrefversion#1{\_ifnum #1=\_REFversion\_relax \_else \_endinput \_fi} \_public \Xrefversion ; % we want to ignore .ref files generated by OPmac @@ -107,7 +111,7 @@ The `.ref` file looks like: \begtt \catcode`\<=13 \Xrefversion{<ref-version>} \_Xpage{<gpageno>}{<pageno>} -\_Xtoc{<level>}{<type>}{<text>}<title> +\_Xtoc{<level>}{<type>}{<text>}{}<title> \_Xlabel{<label>}{<text>} \_Xlabel{<label>}{<text>} ... |