[tex-eplain] Error

Rodolfo Medina rodolfo.medina at gmail.com
Sun Jul 3 17:20:48 CEST 2016


Philip Taylor <P.Taylor at Rhul.Ac.Uk> writes:

> I think that if you were to avoid giving any further example code, and just
> explain what you are trying to accomplish, we might more quickly converge on
> a viable solution.


I will, although it's not very simple and that's why code examples better
explain what I want.

In fact, I already solved the problem years ago (see thread `Treat \refn as a
number?' on this list), and now I'm trying to refine and improve my - rather
home-made - macros.

I've been linking different files one to another with cross-reference
hyperlinks.  Recent versions of Eplain have actually cross-reference
hyperlinks, but only within one single file.  I wrote some macros - years ago -
that put together hyperlinks and cross-references so to have cross-reference
hyperlinks work *also* between two different files.

But I want each of those different documents, linked now together with
cross-reference hyperlinks, to live and be processed by TeX not only as single
articles but also as children (sections) of a master: both alternate
possibilities according to needs.  For that purpose, I needed `\if' conditions
that would alternatively activate both `modes': let's call them `book' and `no
book'.  So now I'm going back to an old problem in order to improve its
solution already found years ago.  What I want is the following: when referring
to a \subsection, *if* we are in book mode I want something like simply
`Section 3'.  Instead, if we are in `single articles' mode, I want something
like `Article-Title Section 3'.  I hope I was clear enough.  For that I've been
using for years the mechanism shown in the example:

---------------------------------------------------
\input eplain

\definexref{label}{\jobname}{}

\def\xrefn#1{%
\edef\tempa{\refn{#1}}\edef\tempa{\meaning\tempa}}
\xrefn{label}
\edef\tempb{\jobname}\edef\tempb{\meaning\tempb}

\ifx\tempa\tempb yes\else no\fi.

\end 
---------------------------------------------------

, which seems to work fine with Eplain 2.8.1, and that's all right for me.
Only, now I want to improve it.  In fact, the \definexref{label}{\jobname}{} up
there is always necessary whereas I need to also do without it.  In fact I have
to put it at the beginning of every file, and there are troubles whenever I
forget to do so.

I hope I was clear enough.  The problem of cross-reference hyperlinks between
different files seems important to me.  I can provide further explanation if
the case.

Thanks,

Rodolfo



More information about the tex-eplain mailing list