[tex-eplain] Treat \refn as a number?

Rodolfo Medina romeomedina at libero.it
Sun Aug 15 11:05:03 CEST 2004


Rodolfo Medina wrote:

>Suppose I'm editing 'myfile.tex'. I say:
>\definexref{label}{\jobname}{}
>and, some lines below,
>\refn{label}
>. This gives 'myfile'. Fine. Now I try with:
>\ifx\jobname\refn{label}yes\else no\fi
>and I get 'no', whereas I would like 'yes'. Is there a way to achieve this?


The solution was suggested by Hartmut Henkel in the texhax mailing list.
Here's the hack:

\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.

Thanks to all, indeed.
			Rodolfo



More information about the tex-eplain mailing list