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)
.
\usepackage{xstring}
\renewcommand{\tocappendix}[3]{%
\indentlabel{\IfStrEq{#3}{Bibliography}{}{#1}\@ifnotempty{#2}{ #2.\quad}}#3}
For LyX, this code can be inserted into the LaTeX Preamble ("Document > Settings...").
Background:
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
\newcommand{\tocappendix}[3]{%
\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
.
I fixed this by doing:
\usepackage{chngcntr}
\counterwithout{figure}{section}
This basically makes counters not label things as Section.## but just as ##.
Best Answer
Just change the line
\numberwithin{figure}{Chapter}
to\numberwithin{figure}{chapter}
(chapter without capital C) and it should be fine.