[NTG-context] LMTX deeptextcommand issue

Jan Tosovsky j.tosovsky at email.cz
Wed Apr 3 00:35:13 CEST 2019


On 2019-04-02 Hans Hagen wrote:
> On 4/2/2019 8:41 PM, Jan Tosovsky wrote:
> >
> > my document ends with the index
> >
> > \startbackmatter
> > \chapter{Rejstřík jmenný}
> > \start
> > \switchtobodyfont[8pt]
> > \placeindexname
> > \stop
> > \stopbackmatter
> > \startbackmatter
> > \chapter{Rejstřík věcný}
> > \start
> > \switchtobodyfont[8pt]
> > \placeindexsubject
> > \stop
> > \stopbackmatter
> >
> > At the beginning there is a condition for one word (kind of manual column
> > balancing) - but according to the log, see below, this seems to be an issue:
> > \newconditional\IndexState
> > \define[1]\IndexInternalCommand
> >
> >
> {\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexSt
> a
> > te}#1}
> >
> > \define[1]\IndexCommand
> >    {\setfalse\IndexState
> >     \setbox\scratchbox\hbox{#1}%
> >     \ifconditional\IndexState
> >       \column
> >     \fi
> >     \box\nextbox}
> 
> does
> 
> \unexpanded\def\IndexCommand#1%
>    {....
> 
> work?

I've modified that block this way:

\newconditional\IndexState
%\define[1]\IndexInternalCommand
\unexpanded\def\IndexInternalCommand#1%
  {\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexState}#1}

%\define[1]\IndexCommand
\unexpanded\def\IndexCommand#1%
  {\setfalse\IndexState
   \setbox\scratchbox\hbox{#1}%
   \ifconditional\IndexState
     \column
   \fi
   \box\nextbox}


Is it what you propose? If so, I am still getting the same error.

Jan



More information about the ntg-context mailing list