# [tex-eplain] \definexref problem

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

\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
{Oleg}

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

\numberedfootnote{\xrefn{Oleg}}

\numberedfootnote{\xrefn{Oleg}}