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

Rodolfo Medina romeomedina at libero.it
Fri Aug 20 12:14:28 CEST 2004

Oleg Katsitadze wrote:

>On Wed, Aug 18, 2004 at 11:37:34PM +0200, Rodolfo Medina wrote:
>> I was thinking though that maybe the problem that the \IsInteger
>> is able to work out,
>> i.e. to compare \refn with a number,
>> can alternatively be solved as well in the way that was suggested by
>> Henkel,
>> that I reported in my previous message.
>Seems to work.  But this will do only if you are comparing the label with a
>certain number.  In my case, I did not know what number the label could
>to (it was a page number), and I needed to set a \count register to the
>value.  So I'm still stuck with \IsInteger.

The \comparemynumberwithrefn command
will compare a certain value of \mynumber,
reported by \refn, with the actual one:

%%%%%%%%%%%%%%beginning of file%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input eplain

      \ifx\tempa\tempb yes
       \else no
\def\mydef{\global\advance\mynumber by 1}



%%%%%%%%%%%%%%%%%%end of file%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Similarly, the \comparefoliowithrefn command
will compare a certain page number,
reported by \refn, with the actual:

%%%%%%%%%%%%%%%%%%beginnign of file%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input eplain

      \ifx\tempa\tempb yes
       \else no
%Label for the page number:





%%%%%%%%%%%%%%%%%%end of file%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Can this deal with your case?
If not, could you maybe send your code?
Now I'd be curious to see
if what you need can be worked out with the \temp... \meaning procedure,
which looks more general than \IsInteger.


More information about the tex-eplain mailing list