[tex-eplain] Eplain and Context

Oleg Katsitadze olegkat at gmail.com
Sat Mar 24 17:29:17 CET 2007


On Sat, Mar 24, 2007 at 12:53:10AM -0400, John R. Culleton wrote:
> (./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}

\dospecials is somehow undefined in ConTeXt.  You can simply copy its
definition from plain TeX:

  \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
    \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}

This helps, but there's another problem -- in conTeXt, the character
`|' is active, so the definition of \idxencapoperator is broken.  You
can set `|' to "other" for the duration of the Eplain excerpt:

  \catcode`\|=12
  <contents of idx.tex>
  \catcode`\|=13

But wait...  If I add these two fixes, I can \input the whole of
Eplain without problems :) (but not sure if everything will work...).
Try something like:

  \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
    \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
  \catcode`\|=12
  \input eplain
  \catcode`\|=13

One thing I noticed broken is \indexproofingtrue does not work.  Have
to figure that out.

> -------------------------
> \newwrite\ind
> \immediate\openout\ind=book.idx
> \def\sidx#1{\write\ind{\\indexentry{#1}{\the\pageno}}}
                         ^^^^^^^^^^^^
            Replace with \string\indexentry

Best,
Oleg


More information about the tex-eplain mailing list