[tex-eplain] \definexref problem

Adam Fenn acwfenn at hotmail.com
Tue Oct 11 08:57:44 CEST 2005


On Sunday, October 9, 2005 8:51 PM, Oleg Katsitadze wrote:

>You need to prevent expansion of the command sequences:

>\definexref{mynewref}
>             {\string\iflongref\space a long reference\string\longreffalse
>              \string\else\space a short reference\string\fi}
>             {}

When I put this into the following macro only the first reference to the 
first book appears in full whereas the first reference to each new book 
ought to be in full. Where should I put the \longreftrue to make this work 
or am I going about this the wrong way?

\newif \iflongref

\def\book#1#2#3{%
\longreftrue
\def\longref{#1}
\def\shortref{#2}
\definexref{#3}
	   {\string\iflongref\space \longref\global
	    \string\longreffalse
	    \string\else\space \shortref\string\fi
           {}
}%

\book
{Oleg Katsitadze, {\it Everything You Ever Wanted To Know About Eplain But 
Were Afraid To Ask\/} (2005).}
{Katsitadze, {\it Everything You Ever Wanted To Know About Eplain}.}
{Oleg}

\book
{Adam Fenn, {\it Eplain: A Very Slim Volume\/} (2005).}
{Fenn, {\it Eplain}.}
{Adam}

\numberedfootnote{\xrefn{Oleg}}

\numberedfootnote{\xrefn{Oleg}}

\numberedfootnote{\xrefn{Adam}}

\numberedfootnote{\xrefn{Adam}}




More information about the tex-eplain mailing list