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

Herbert Schulz herbs at wideopenwest.com
Mon Feb 10 22:02:19 CET 2020



> On Feb 10, 2020, at 2:55 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
> 
> In source:
> 
> 	\index{Urysohn Metrization Theorem}
> 
> in one location and
> 
> 	\index{Urysohn Metrization Theorem|mainref}
> 
> in another location (with \mainref defined as specified in my original message).
> 
> I’m using memoir documentclass with 
> 
> 	\makeindex
> 	….
> 	\printindex
> 
> Indexing from:
> 
> 	\usepackage[pdftex]{hyperref}	
> 	\hypersetup{
>   	  plainpages=false,%pdfpagelabels,
>   	  bookmarksnumbered,
>   	  breaklinks=true,
>   	  colorlinks, citecolor=red, filecolor=black, linkcolor=blue, urlcolor=blue,
>  	 linktocpage=true,linktoc=all
> 	}
> 
> Is there anything else I can supply, short of the entire, approximately 2.5 MB, folder tree of files, that might help you help me? 
> 
>> On 10 Feb2020, at 3:20 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>> 
>> 
>> 
>>> On Feb 10, 2020, at 12:35 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>>> 
>>> I’m looking for any possible clues in trying to track down the error with pdflatex
>>> 
>>>  \mathit allowed only in math mode
>>> 
>>> encountered while latexmk is writing .idx.
>>> 
>>> This is occurring, in the first instance with .ind entry
>>> 
>>> 	\item \idxmark{Urysohn Metrization Theorem}, \hyperpage{506}, 
>>> 		\mainref{580}
>>> 
>>> The function \mainref is defined as:
>>> 
>>> 	\newcommand{\mainref}[1]{\textbf{\emph{\hyperpage{#1}}}}
>>> 
>>> But the error occurs even if I change \mainref to: \newcommand{\mainref}[1]{#1}
>>> 
>>> The document’s .ist file includes
>>> 
>>> 	item_0  "\n\\item \\idxmark{"
>>>   	delim_0 "}, "
>>> 
>>> where \idxmark is defined in my preamble by:
>>> 
>>> 	\providecommand\gobbleone[1]{}
>>> 	\newcommand{\idxmark}[1]{{\let\gobbleone\relax\markboth{\sffamily\bfseries#1}{\sffamily\bfseries#1}}#1}
>>> 
>>> If I comment out the \index entries for that “Urysohn Metrization Theorem”, then the same error occurs for other entries.
>>> 
>>> I APOLOGIZE for not providing a complete, minimal working example for reproducing the error, but I think some clue might help me devise such. The document in question is of book length, with a complex source structure that includes several style files constituting the preamble.
>>> 
>>> NOTE: This error did not occur a week or two ago, despite no change to my preamble. So I think something has changed in some latex package to cause this.
>>> ---
>>> Murray Eisenberg			murrayeisenberg at gmail.com
>> 
>> Howdy,
>> 
>> What does that entry look like in the source file? Are you using any particular indexing package? Not that I'm on to anything :-(.
>> 
>> Good Luck,
>> 
>> Herb Schulz
>> (herbs at wideopenwest dot com)
>> 

Howdy,

How about tge log file; maybe the error is really occurring before this.

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



More information about the macostex-archives mailing list.