[tex-eplain] turning off indexing

John Frampton j.frampton at neu.edu
Mon Nov 19 17:41:24 CET 2007


Thank you very much Oleg.  etex indeed does not produce loading 
messages for the .tmp file, which was the principal reason for 
wanting the ability to disable indexing.

I am in the process now of figuring out precisely how etex 
differs from tex.  After I use the patched eplain for a while, I 
will report any comments that I think might be worthwhile.

Thanks again,
John Frampton

Oleg Katsitadze wrote:
> On Thu, Nov 15, 2007 at 01:20:46PM -0500, John Frampton wrote:
>> I don't like all that writing to the index file going on every time I run 
>> Tex.
> 
> For each defined index (\defineindex{N}) I've added a \ifNdx switch
> which turns off any writing to the corresponding index file, see the
> attached patch.
> 
>> And I certainly don't want to see all the reports of reading the .tmp 
>> file.
> 
> As Karl suggested, using etex avoids .tmp file altogether.  However,
> making \Ndxfalse disable the processing which needs the .tmp file
> might be a bad idea, after all (see below), especially since it's easy
> to avoid the .tmp file problem with etex (etex is ubiquitous nowadays).
> 
>> To this point, I've just used \idx and \sidx, so the following hack 
>> kills the writing and .tmp file use (but does not stop opening the .idx 
>> file for writing).
>>
>> \def\noindex{%
>>    \let\idx\relax
>>    \def\sidx##1{\@getoptionalarg\relax}%
>> }
>>
>> Am I missing something?
> 
> All indexing commands take initial optional argument (the one which
> modifies index terms in some way), so in general redefinitions should
> take care of that, too.  Apart from this, I see several problems with
> this approach as a general solution.
> 
> First, indexing commands disabled in this way do not produce whatsits
> from the \write command, which can considerably affect page-breaking.
> This might or might not be important for a draft run, depending on a
> situation.
> 
> Second, it's not possible to disable index writing _and_ typeset the
> proof index terms in the margin, which I imagine might be useful.
> 
> Next, these redefinitions don't do any sanity checks of the arguments,
> especially important for the first optional argument.  (There is also
> much more involved when processing arguments with special symbols.)
> 
> So, I suggest that \Ndxfalse only disables opening the index file and
> writing of the indexing terms, and leaves all other processing in
> place.
> 
> The downside to this is that the .tmp file mess remains, but as I
> said, etex avoids this, and I have the impression that etex is now the
> standard.
> 
> Another note -- to compensate for the missing whatsits from `real'
> \write, I use `\write-1{}' which writes a newline to the log file.
> This makes the log untidy, but the line-breaking will be the same as
> with indexing enabled.
> 
> For testing, the patched eplain.tex can be downloaded from
> 
>   http://tug.org/eplain/misc/eplain.tex
> 
> Of course, any comments and suggestions are welcome.
> 
> Best,
> Oleg
> 
> P.S.  The patch also includes a minor bug fix -- in \@idxwrite when
> \indexproofingtrue, I was adding \allowhyphens in vertical mode, too,
> which could cause spurious whitespace.


More information about the tex-eplain mailing list