From 7428e668f046bec10d1200214789e40390fa51e7 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 10 Feb 2021 03:01:13 +0000 Subject: CTAN sync 202102100301 --- macros/luatex/optex/base/ref-file.opm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'macros/luatex/optex/base/ref-file.opm') diff --git a/macros/luatex/optex/base/ref-file.opm b/macros/luatex/optex/base/ref-file.opm index fd7c1101d7..d594bf88c0 100644 --- a/macros/luatex/optex/base/ref-file.opm +++ b/macros/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` `\{}` is redefined in order to save the line `\` 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``{}` does exactly `\write\_reffile{\string}` + in this case and \`\_ewref``{}` does + `\write\_reffile{\string}`. \_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{} \_Xpage{}{} -\_Xtoc{}{}{} +\_Xtoc{<level>}{<type>}{<text>}{}<title> \_Xlabel{<label>}{<text>} \_Xlabel{<label>}{<text>} ... -- cgit v1.2.3