summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/base/ref-file.opm
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-02-10 03:01:13 +0000
committerNorbert Preining <norbert@preining.info>2021-02-10 03:01:13 +0000
commit7428e668f046bec10d1200214789e40390fa51e7 (patch)
treed28de61e9d3ed96c80ebf2300d0ba3d6a76414e6 /macros/luatex/optex/base/ref-file.opm
parent1350502b809c028b8f123dec94ca92782eda564f (diff)
CTAN sync 202102100301
Diffstat (limited to 'macros/luatex/optex/base/ref-file.opm')
-rw-r--r--macros/luatex/optex/base/ref-file.opm14
1 files changed, 9 insertions, 5 deletions
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` `\<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>}
...