General"thebibliography" and TOC; how to remove it...?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Rendsvig
Posts: 4
Joined: Tue Dec 09, 2008 5:33 pm

"thebibliography" and TOC; how to remove it...?

Post by Rendsvig »

Hi!

I have a problem; I'm no good at TeX, so I use Scientif WorkPlace, and only consult code when strictly necessary. Now I have tried using the "*" the best I know how, but it doesn't work...

My problem is this:
I use the AMSbook document class, and one guy in this book I'm editing uses the \begin{thebibliography}{99} command in the end of his article. This look all nice and fine when compiled, but it occurs in toc, and I really don't want that, since only the article names occur there.

So, how do I get rid of it? Any ideas?

Best regards,
Rasmus

Here's code:

\documentclass{amsbook}
\usepackage{amssymb}
\usepackage{amsfonts}

\setcounter{MaxMatrixCols}{10}
%TCIDATA{OutputFilter=LATEX.DLL}
%TCIDATA{Version=5.50.0.2953}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Created=Friday, December 05, 2008 20:35:19}
%TCIDATA{LastRevised=Monday, December 08, 2008 21:40:06}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="DocumentShell" CONTENT="Books\SW\AMS Book or Monograph">}
%TCIDATA{CSTFile=amsbktci.cst}

\input{tcilatex}
\setcounter{tocdepth}{0}
\setlength{\textwidth}{10cm}
\setlength{\textheight}{18cm}
\setlength{\headsep}{0.4cm}
\setlength{\headheight}{0.6cm}
\setcounter{secnumdepth}{-1}

\begin{document}

....

\begin{thebibliography}{99}
\bibitem{Patrick et al} \noindent van Benthem, Johan, Patrick Girard \ \& \
Olivier Roy. To Appear. \textquotedblleft Everything else being equal: a
modal approach to ceteris paribus preferences.\textquotedblright\ \textit{%
Journal of philosophical logic}.\textbf{\medskip }

....

\end{thebibliography}

\chapter{Logical Determination and the Principle of Bivalence}

....

\end{document}
Rasmus K. Rendsvig

Recommended reading 2024:

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

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

daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

"thebibliography" and TOC; how to remove it...?

Post by daleif »

you will need to hack the amsbook internals. But remember that amsbook was never meant for customising.

The main problem here is that \chapter* actually writes to the ToC in amsbook, this seems to do the trick

Code: Select all

\documentclass{amsbook}

\makeatletter

\def\@schapterHACK#1{
  \if@openright\cleardoublepage\else\clearpage\fi
  \thispagestyle{plain}\global\@topnum\z@
  \@afterindenttrue
  \typeout{#1}%
  \let\@secnumber\@empty
  \def\@toclevel{0}%
%  \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#1}%
%  \else \@tocwriteb\tocchapter{chapter}{#1}\fi
  \chaptermark{#1}%
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
  \@makeschapterhead{#1}\@afterheading}


\renewcommand{\@bibtitlestyle}{%
  %\@xp\chapter\@xp*\@xp{\bibname}%
  \@xp\@schapterHACK\@xp{\bibname}
}



\makeatother

\begin{document}

\tableofcontents

\chapter{test}

sdf

\begin{thebibliography}{99}
\bibitem{df} sdfsf
\end{thebibliography}

\end{document}
Rendsvig
Posts: 4
Joined: Tue Dec 09, 2008 5:33 pm

Re: "thebibliography" and TOC; how to remove it...?

Post by Rendsvig »

You are the one who makes small boys like me Very, Very happy!
It worked like a charm, thank you so much!
Rasmus K. Rendsvig
Rendsvig
Posts: 4
Joined: Tue Dec 09, 2008 5:33 pm

Re: "thebibliography" and TOC; how to remove it...?

Post by Rendsvig »

Ah, this TOC keeps giving me problems! (well, no, mainly the guy I'm doing this book for, but I don't how to incorporate his changes...)

First of, the above solution (I believe) resulted in my preface being numbered with arabic numerals instead of roman -- this I would like to change back. I read through the above code, but I just don't know what to look for except maybe the word "arabic" somewhere, but I didn't find it...

Secondly, and this only happens when I use the above solution along with my the original preamble, not when I compile it alone, I have certain chapter-titles that are too long for one line, but when they break, the second line is indented. I tried myself with \linebreak[4]\noindent at the appropriate place, but that resulted in some kind of terminal illness...

[EDIT]: I did not only almost, but actually, forget: What about removing page-numbering on parts? The part titles should occur in the TOC, but they should not refer... Possible?

Does anyone of you guys have any suggestions, or is this just part of the price of the hack? Well, the first thing anyways, because the second point arises even when I do not use daleif's solution...

Best regards,
Rasmus
Rasmus K. Rendsvig
daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

Re: "thebibliography" and TOC; how to remove it...?

Post by daleif »

as mentioned amsbook is not meant to be hacked or reconfigured. Also I did not change anything else, so in your case the introduced new 'features' may have something to do with where exactly you place the code I posted.

As for the other questions: again needs internal hacking.

I would have been so much easier if you have been using memoir, since that class is configurable. But I don't know if memoir is supported in SWP.
Rendsvig
Posts: 4
Joined: Tue Dec 09, 2008 5:33 pm

"thebibliography" and TOC; how to remove it...?

Post by Rendsvig »

I must apologize.
I just checked older versions of my document, and the problem about the arabic/roman numeral had Nothing to do with your (daleif) solution. Sorry.

Now, I just tried out Memoir, and it works fine in SWP, but there I encounter the probles that made me switch to AMSbook in the first place: footnotes do not reset in each chapter, and more importantly, in the TOC I have added a line after each chapter with the author name, using

Code: Select all

\addtocontents{toc}{\medskip\textit{author name}}
,
but if this is followed by a Part, the title of the part is posted directly after the author name... This I didn't know how to change, so I tried my way around and found that amsbook solved both problems... But now it seems I have shot myself in the foot.

Since I have now set up the book in amsbook, can you aid me on how I should go about the hacking with respect to the two first points above? I might as well to ad hoc my way through the third, and play around with the \addtocontents{toc} some more.
Rasmus K. Rendsvig
Post Reply