[tex-eplain] Error

Rodolfo Medina rodolfo.medina at gmail.com
Sun Jul 3 15:20:47 CEST 2016


Philip Taylor <P.Taylor at Rhul.Ac.Uk> writes:

> Because the expansion of \refn requires information that is not available at
> the time that you attempt to expand it using \edef; you need to defer the
> expansion, as below.
>
> \input eplain 
> \message {\string \refn: \meaning \refn}
> \def \mytest
> {
> \edef \tempa {\noexpand \refn {f}}
> } 
> \mytest 
> \end 

Thanks.  But doing so, it expands too late I'm afraid.  What I need is the
following:

---------------------------------------------------
\input eplain

\definexref{label}{\jobname}{}

\def\xrefn#1{%
\edef\tempa{\refn{#1}}\edef\tempa{\meaning\tempa}}
\xrefn{label}
\edef\tempb{\jobname}\edef\tempb{\meaning\tempb}

\ifx\tempa\tempb yes\else no\fi.

\end 
---------------------------------------------------

If I process that, I get error.  But, if I put \noexpand just before \refn, as
you suggest, I get `no' whereas the right answer should be `yes'.  Note that,
with old Eplain 2.8.1, I get no error at all unless I cancel
\definexref{label}{\jobname}{} up there.

Please any other suggestion.  Thanks,

Rodolfo



More information about the tex-eplain mailing list