diff options
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>} ... |