LyXIndex disappeared

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
reachtaire
Posts: 2
Joined: Tue Aug 27, 2013 10:51 am

Index disappeared

Post by reachtaire »

Hi guys, I am new to both this forum and LaTeX/LyX. I have a problem with a book that I am typesetting with LyX.

The book is quite long (~600 pages), and includes copious footnotes and a long index. I have got through about half of the index (I am proceeding alphabetically, so I am currently on 'L'). I have regularly been "viewing" the output (i.e., compiling the document to a .pdf), and there have been no serious problems with this.

Yesterday, after adding some index entries, I pressed "view". The LaTeX Errors box popped up, containing a list of unfamiliar errors, including something about LyX no longer reading the document after line 'x' (I think the number was about 3,000). Thinking this to be an everyday malfunction, and not knowing how to deal with it, I tried saving the document, then restarting LyX and trying again.

When I did this, the document compiled perfectly, no error messages, but also no index. No matter what I try, I cannot get the index to appear. It seems as if the compiler is ignoring the \printindex command.

I can see that there is a document called myfile.idx, and that this document contains all of the index information that I have entered so far, so I can't see why the thing doesn't work all of a sudden.

When I changed the index "processor" (Document\Settings\Indexes) from "Default" to "makeindex", I get the following error:

Code: Select all

LaTeX Error: \begin{theindex} on input line 1 ended by \end{document}.
Then I inserted \end{theindex}, but it told me

Code: Select all

\begin{document} ended by \end{theindex}
and Extra \endgroup. When I then inserted \begin{theindex} before \printindex, and \end{document} after \end{theindex}, I got

Code: Select all

LaTeX Error: \begin{theindex} on input line 29395 ended by \end{document}.
My suspicion is that I have done something wrong with one of the index entries that I was inserting just before the trouble started (perhaps the problem was on the line mentioned in the initial error, around line 3,000), but the lack of error messages makes things very difficult. Can anyone shed light on this? Unfortunately, this issue is very urgent for me.
Last edited by cgnieder on Tue Aug 27, 2013 7:16 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

reachtaire
Posts: 2
Joined: Tue Aug 27, 2013 10:51 am

Index disappeared

Post by reachtaire »

Hi guys - just to let you know, I have fixed this issue. By absolute chance, I stumbled across an index entry which included an aberrant exclamation mark (i.e., it read \index{Word!}, rather than \index{Word} as it should have). This appears to have caused all the difficulty, and everything is working well now. Needle in a haystack, but good to know!
Last edited by cgnieder on Tue Aug 27, 2013 7:17 pm, edited 1 time in total.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Index disappeared

Post by cgnieder »

Hi reachtaire,

Welcome to the LaTeX community. Nice to here that you solved your issue. Also, thanks for reporting the solution here!

In case you wonder why nobody had answered your post: this may be due to two facts. First most actives here don't use LyX but use LateX directly so LyX questions tend not to be answered very fast. Second issues such as these are much easier answered if a Minimal Working Example is given. Without one most questions are very hard to answer.

The ! is a special marker for index entries used to indicate subentries

Code: Select all

\index{main!sub}
So I suspect the missing subentry has confused the parser.

Regards
site moderator & package author
Post Reply