Currently \refdecl just opens the ref file and writes to it immediatly. This seems against OpTeX principle of not creating .ref files if they are not needed.
@olsak Do you think that \refdecl could check if the .ref file is open, and either would write to it immediatly, or buffer its argument until first \openref is run?
In pdfextra I am thinking about either working around this by not using \openref but some kind of \.refinit which would \openref as well as \refdecl. But then \refdecl is nested under another macro, and needs doubling of #.
Currently
\refdecl
just opens the ref file and writes to it immediatly. This seems against OpTeX principle of not creating.ref
files if they are not needed.@olsak Do you think that
\refdecl
could check if the.ref
file is open, and either would write to it immediatly, or buffer its argument until first\openref
is run?In pdfextra I am thinking about either working around this by not using
\openref
but some kind of\.refinit
which would\openref
as well as\refdecl
. But then\refdecl
is nested under another macro, and needs doubling of#
.