[OS X TeX] ``\mathit allowed only in math mode'' error while writing .idx

Murray Eisenberg murrayeisenberg at gmail.com
Sat Feb 15 18:22:25 CET 2020


The error has been traced to a “RTFM” cause: I failed to use the repeatindex package properly, by suitably modifying my .ist to satisfy repeatindex.

I also posted my question to tex.stackexchange (https://tex.stackexchange.com/questions/528504/indexing-error-mathit-allowed-only-in-math-mode <https://tex.stackexchange.com/questions/528504/indexing-error-mathit-allowed-only-in-math-mode>), where Ulrike Fischer pointed me to the source of the error.

In a new post, https://tex.stackexchange.com/questions/528520/how-modify-custom-ist-to-incorporate-repeatindex <https://tex.stackexchange.com/questions/528520/how-modify-custom-ist-to-incorporate-repeatindex>, I asked how to modify the .ist to satisfy repeatindex.

Here’s the crux of the problem, as indicated there…

My .ist is currently:

% MakeIndex style file
% output main entry <entry> as: \item \idxmark{<entry>}, 
item_0  "\n\\item \\idxmark{"
delim_0 "}, "
% not forgetting the subitem case
item_x1 "} \n \\subitem "
headings_flag 1
heading_prefix "{\\medskip\\hfill\\large\\textsf{\\textbf{"
heading_suffix "}}\\hfill}\\medskip\\nopagebreak\n”

The command \idxmark used in the .ist is defined in my preamble by:

\newcommand{\idxmark}[1]{{\let\gobbleone\relax\markboth{\sffamily\bfseries#1}{\sffamily\bfseries#1}}#1}
\providecommand\gobbleone[1]{}

In order to use repeatindex property, index items need to be enclosed in square brackets, and this can be accomplished by invoking makeindex in the form...

makeindex -s repeatindex file

… where repeatindex.ist, supplied as part of the repeatindex package, is:

item_0 "\n  \\item ["
delim_0 "], “

—> So the remaining issue is how to reconcile my own .ist, which incorporates \idxmark, with what repeatindex wants in the way of square brackets, as repeatindex.ist accomplishes.

At https://tex.stackexchange.com/questions/528520/how-modify-custom-ist-to-incorporate-repeatindex <https://tex.stackexchange.com/questions/528520/how-modify-custom-ist-to-incorporate-repeatindex> I’ve included a minimal working example to simulate the error and to use in testing a modified .ist.

> On 10 Feb2020, at 7:24 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:
> 
> 
> 
>> On Feb 10, 2020, at 3:17 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>> 
>> Gladly…the log is attached — hope it’s not scrubbed..
>> 
>> (I forgot you’re a bottom-replier, not a top-replier!)
>> 
>> Murray
>> <topologybook.log>
>> 
>> 
>> 
> 
> Howdy,
> 
> It appears that the problem is in the .ind file or a write to it not .idx. Also, take a look at the paragraph at lines 1681--1683 in the root file which seems to be close to where that error is being generated.
> 
> Good Luck,
> 
> Herb Schulz
> (herbs at wideopenwest dot com)
> 
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
> List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
>                https://email.esm.psu.edu/pipermail/macosx-tex/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

---
Murray Eisenberg			murrayeisenberg at gmail.com
503 King Farm Blvd #101	Home (240)-246-7240
Rockville, MD 20850-6667	Mobile (413)-427-5334


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/macostex-archives/attachments/20200215/39ddca62/attachment.html>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


More information about the macostex-archives mailing list.