I want to place the Bibliography after the appendices. So in LyX I mark "Start Appendix Here", insert the appendices, and after that the Bibliography. Now, all appendices appear in the Table of Contents like "Appendix A. ...", or "Appendix B. ...". The problem is that the Bibliography also appears like "Appendix. Bibliography", which obviously isn't what I want. How do I fix this?

Instructions to reproduce issue:

  1. Create new Lyx document with Document Class: book (AMS).
  2. Add a TOC (Insert -> List / TOC -> Table of Contents).
  3. With the cursor placed after the Table of Contents, start the appendix (Document -> Start Appendix Here)
  4. Below the Appendix red line, insert a Bibliography (Insert -> List / TOC -> BibTeX Bibliography).
  5. Compile.
  6. Tell me what happens.

The following code will remove the phrase "Appendix. " in front of "Bibliography" in the table of contents when using the LaTeX amsbook class or the LyX document class book (AMS).

  \indentlabel{\IfStrEq{#3}{Bibliography}{}{#1}\@ifnotempty{#2}{ #2.\quad}}#3}

For LyX, this code can be inserted into the LaTeX Preamble ("Document > Settings...").


For typesetting the table of contents, the ".toc" file is used (it can be found in the "tmpdir" / "tmpbuf" directory of LyX). It contains lines like

\contentsline {chapter}{\tocappendix {Appendix}{A}{My First Appendix}}{3}
\contentsline {chapter}{\tocappendix {Appendix}{}{Bibliography}}{3}{appendix*.1}

Furthermore, the class file amsbook.cls defines

  \indentlabel{#1\@ifnotempty{#2}{ #2}.\quad}#3}

By redefining the command \tocappendix we can omit the printing of the first argument (e.g., "Appendix") if the third argument is "Bibliography". For string comparison, the xstring package is used. Furthermore, the bracket } in front of .\quad was moved behind \quad.

| improve this answer | |
  • It works! Sorry about the delay... I had to interrupt what I was doing in LaTeX to work on something else, but now I am back at it. This is very helpful. And thanks also for the explanation! – becko Apr 20 '13 at 0:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.