

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 [hidden email]503 King Farm Blvd #101 Home (240)2467240 Rockville, MD 208506667 Mobile (413)4275334
 Please Consult the Following Before Posting 
TeX FAQ: http://www.tex.ac.uk/faqList 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/macosxtex/TeX on Mac OS X Website: http://mactexwiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosxtex


> On Feb 10, 2020, at 12:35 PM, Murray Eisenberg < [hidden email]> 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 [hidden email]
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)
 Please Consult the Following Before Posting 
TeX FAQ: http://www.tex.ac.uk/faqList 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/macosxtex/TeX on Mac OS X Website: http://mactexwiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosxtex


In source:
\index{Urysohn Metrization Theorem}
in one location and
\index{Urysohn Metrization Theoremmainref}
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 Feb 10, 2020, at 12:35 PM, Murray Eisenberg <[hidden email]> 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 [hidden email]
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) Please Consult the Following Before Posting TeX FAQ: http://www.tex.ac.uk/faqList 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/macosxtex/TeX on Mac OS X Website: http://mactexwiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosxtex
 Murray Eisenberg [hidden email]503 King Farm Blvd #101 Home (240)2467240 Rockville, MD 208506667 Mobile (413)4275334
 Please Consult the Following Before Posting 
TeX FAQ: http://www.tex.ac.uk/faqList 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/macosxtex/TeX on Mac OS X Website: http://mactexwiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosxtex


> On Feb 10, 2020, at 2:55 PM, Murray Eisenberg < [hidden email]> wrote:
>
> In source:
>
> \index{Urysohn Metrization Theorem}
>
> in one location and
>
> \index{Urysohn Metrization Theoremmainref}
>
> 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 < [hidden email]> wrote:
>>
>>
>>
>>> On Feb 10, 2020, at 12:35 PM, Murray Eisenberg < [hidden email]> 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 [hidden email]
>>
>> 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/faqList 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/macosxtex/TeX on Mac OS X Website: http://mactexwiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosxtex


On Feb 10, 2020, at 2:55 PM, Murray Eisenberg <[hidden email]> wrote:
In source:
\index{Urysohn Metrization Theorem}
in one location and
\index{Urysohn Metrization Theoremmainref}
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 <[hidden email]> wrote:
On Feb 10, 2020, at 12:35 PM, Murray Eisenberg <[hidden email]> 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 [hidden email]
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.
Gladly…the log is attached — hope it’s not scrubbed..
(I forgot you’re a bottomreplier, not a topreplier!)
 Murray Eisenberg [hidden email]503 King Farm Blvd #101 Home (240)2467240 Rockville, MD 208506667 Mobile (413)4275334
 Please Consult the Following Before Posting 
TeX FAQ: http://www.tex.ac.uk/faqList 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/macosxtex/TeX on Mac OS X Website: http://mactexwiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosxtex


For a while I thought I had traced the source of the error to what _was_ an unmatched “$” in:
\renewcommand{\indexname}{Index} \renewcommand{\preindexhook}{% \emph{% For $d\text{\emph{ball}}$, $d\text{\emph{bounded set}}$, $d\text{\emph{open set}}$, $(d,\,d')\text{\emph{continuous map}}$, etc., see the corresponding entry \emph{ball, bounded set, open set, continuous map,} etc.% \vskip\onelineskip}% } \printindex
Alas, commenting that out still gives an error when writing the .idx, but now on an index SUBitem (new log file attached).
Here’s my complete .ist, to which the error is conceivably related.
% 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”
Recall from my original messge that \idxmark is defined by:
\newcommand{\idxmark}[1]{{\let\gobbleone\relax\markboth{\sffamily\bfseries#1}{\sffamily\bfseries#1}}#1} \providecommand\gobbleone[1]{}
I did manually go through the entire ..ind file to see if I could find an unmatched “$” in entries there, but I did not. Can any wizard with regex knowledge check that, too? So I’ve also attached the .ind file.
Murray
 Murray Eisenberg [hidden email]503 King Farm Blvd #101 Home (240)2467240 Rockville, MD 208506667 Mobile (413)4275334
 Please Consult the Following Before Posting 
TeX FAQ: http://www.tex.ac.uk/faqList 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/macosxtex/TeX on Mac OS X Website: http://mactexwiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosxtex


Right, the .idx is not being written into yet (zero bytes), due to the error.
The line numbers you mention seem to refer to the .ind, not the source files. (The root .tex file is rather short.)
Or am I misunderstanding the error message, which with all my chapters, etc., now included in the pdflatexmk run, now reads:
./topologybook.ind:1773: LaTeX Error: \mathit allowed only in math mode. . . . . l.1773 \item \idxmark{Urysohn Metrization Theorem} , \hyperpage{506} 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 16811683 in the root file which seems to be close to where that error is being generated.
 Murray Eisenberg [hidden email]503 King Farm Blvd #101 Home (240)2467240 Rockville, MD 208506667 Mobile (413)4275334
 Please Consult the Following Before Posting 
TeX FAQ: http://www.tex.ac.uk/faqList 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/macosxtex/TeX on Mac OS X Website: http://mactexwiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosxtex


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.
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.
 Murray Eisenberg [hidden email]503 King Farm Blvd #101 Home (240)2467240 Rockville, MD 208506667 Mobile (413)4275334
 Please Consult the Following Before Posting 
TeX FAQ: http://www.tex.ac.uk/faqList 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/macosxtex/TeX on Mac OS X Website: http://mactexwiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosxtex

