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

Rodolfo Medina romeomedina at libero.it
Sat Aug 14 15:05:05 CEST 2004


Oleg Katsitadze wrote:

>Now comparing the result of \refn{label} with a number would look like the
>following:
>
>  \definexref{label}{1}{}
>
>  \edef\temp{\refn{label}}
>  \if\IsInteger{\temp}%
>    \ifnum2=\refn{label}yes\else no\fi
>  \else
>    <no .aux file present yet>%
>  \fi


The solution you suggested seems to work perfectly
(although the \IsInteger macro remains totally misterious to me!).
You solved an important problem to me, I have no words to thank you.
That problem though is bound to another one analogous,
still concerned with \refn.
Please, maybe you (or anybody else) could help me deal with this one, also?

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?

I'm looking forward to a kind reply.
Regards, and thanks again,
        			Rodolfo Medina

P.S. Actually, there must be a problem elsewhere bisides with \refn, 
because I also get 'no' if I say

\newtoks\filename
\filename={myfile}
\edef\tempa{\the\filename}
\edef\tempb{\jobname}
\ifx\tempa\tempb yes\else no\fi

, whereas I get 'yes' if I say

\newtoks\filename
\filename={myfile}
\edef\tempa{\the\filename}
\edef\tempb{myfile}
\ifx\tempa\tempb yes\else no\fi








More information about the tex-eplain mailing list