alexande@grover.cs.unc.edu (Geoffrey D. Alexander) (04/17/91)
\bibliography gives a default section heading of "References". How do I change the section heading? Also, how do I get the section heading in the table of contents? Thanks, Geoff Alexander alexande@cs.unc.edu
wilson@cerc.utexas.edu (Linda Wilson) (04/17/91)
In article <3247@borg.cs.unc.edu> alexande@grover.cs.unc.edu (Geoffrey D. Alexander) writes: >\bibliography gives a default section heading of "References". How do I change >the section heading? Also, how do I get the section heading in the table of >contents? > >Thanks, >Geoff Alexander >alexande@cs.unc.edu \bibliography is defined in the article.sty file. Look for \def\thebibliography After that, you'll see several versions of: References, REFERENCES, etc. Just change those words to whatever you want. I think a similar tactic will work for the Table of Contents as well. Good Luck, Linda Wilson wilson@cerc.utexas.edu
alexande@fillmore.cs.unc.edu (Geoffrey D. Alexander) (04/18/91)
Here's an answer I received via mail.
===============================================================================
Date: Wed, 17 Apr 91 13:31:17 EDT
From: fritzz@lamont.ldgo.columbia.edu (fritz zaucker)
To: alexande@cs.unc.edu
Subject: Re: section heading with \bibliography
Ok, got it. Try the following:
\documentstyle{article}
\makeatletter
\def\thebibliography#1{\protect\section[New Header]{New Header\@mkboth{left page header}{right page header}}
\list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumi}}
\def\newblock{\hskip .11em plus .33em minus .07em}
\sloppy\clubpenalty4000\widowpenalty4000
\sfcode`\.=1000\relax}
\let\endthebibliography=\endlist
\makeatother
\pagestyle{headings}
\begin{document}
\tableofcontents
\clearpage
\begin{thebibliography}{1}
\bibitem[1]{test1} blub
\bibitem[2]{test2} blub2
\end{thebibliography}
\end{document}
The \makeatletter and \makeatother allow/disallow the usage of @ in a
macro name. Usually it is not allowed, except in style files. This is
to protect internal macros ... You need it hear because of \@mkboth,
although one probably could get around that.
There is another trick. The optional argument in \section[]{} is
needed for some reason. I tried it without it and it doesn't work.
May be, you should post that (I can't, we have a problem with posting
news here).
Does that solve your problem?
Fritz
===============================================================================
One can also simply create a .sty file with the appropriate changes to
\thebibliography.
Geoff Alexander
alexande@cs.unc.edu