[texhax] A problem about \jobname

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

Hartmut Henkel wrote:

>Take e. g. \meaning or \string to align the catcodes of
>the two items:
>\ifx\tempa\tempb yes\else no\fi
>\edef\tempc{\expandafter\string\csname \the\filename\endcsname}
>\edef\tempd{\expandafter\string\csname \jobname\endcsname}
>\ifx\tempc\tempd yes\else no\fi

Thanks indeed for your suggestions, which worked perfectly both of them.
I should study carefully commands like
\csname... \endcsname, \expandafter, \string, \meaning and others:
I tried to, but found them quite hard to understand.

The problem you helped me with, though,
was just the first step of a final problem I want to work out in the end,
which is using the above \ifx... \else... \fi condition
with the eplain commands \refn{} and \definexref{}{}{} for cross references.
My final purpose is to say first:

and then achieve something like (trying to applying your indications):



\ifx\tempa{label}\tempb yes\else no\fi

and get 'yes'. I get 'no' instead. I also tried with

\edef\tempc#1{\expandafter\string\csname pippo:#1\endcsname\refn{#1}}
\edef\tempd#1{\csname pippo:#1\endcsname}
\edef\tempe{\expandafter\string\csname \jobname\endcsname}

\ifx\tempd{label}\tempe yes\else no\fi

getting 'no' as well.

Is there a way to achieve this? Could you help me in this final step?

Thanks indeed,

More information about the texhax mailing list