[tex-eplain] Eplain and Context

John R. Culleton john at wexfordpress.com
Sat Mar 24 05:53:10 CET 2007


On Saturday 24 March 2007 05:19, Oleg Katsitadze wrote:
> On Thu, Mar 22, 2007 at 06:33:43AM -0400, John R. Culleton wrote:
> > Is there a
> > way to define everything that is needed for indexing, and only
> > those lines, in xeplain.tex or eplain.tex?
>
> The attached macro file seems to work.  I didn't bother adding
> hyperlink support as I don't know if you need it.  But hyperlink
> macro names shouldn't clash because they all start with \hl or \@hl
> prefix, so you hopefully can add the entire hyperlinks section
> without any problems.
>
> HTH,
> Oleg
Thanks very much for your assistance. Unfortunately your test file 
when processed by texexec blows up in a manner similar to eplain.tex. 

(./idx.tex)
! Undefined control sequence.
\uncatcodespecials ... `##1 = \other }\dospecials

\idx at getverbatimarg ...ingroup \uncatcodespecials
                                                  \catcode \idxargopen 
=1 \c...
<to be read again>
                   {
l.11 \idx{
          term}

There is an inherent incompatiblity between eplain.tex and Context 
that I cannot conquer.  Yet Context badly needs the greater indexing 
power of makeindex and eplain or its equivalent.

My workaround has been to create my own crude indexing macro and 
\write procedure. Some hand editing of the output book.idx file is 
still needed before processing through makeindex. But at least it 
doesn't blow up. 
Here is my kludge:
-------------------------
\newwrite\ind
\immediate\openout\ind=book.idx
\def\sidx#1{\write\ind{\\indexentry{#1}{\the\pageno}}}
-----------------------
The resulting book.idx file has statements of the form 
------------------------------
\\indexentry{foo}{1}
\\indexentry{foo!bar}{2}
\\indexentry{testit}{3}
-------------------------------
...which requires a mass change from \\indexentry  to \indexentry.

-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com



More information about the tex-eplain mailing list