summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/misc/thebib-plus.sty
blob: ecd0865e68f8c4754edb918f02658b7930d65e1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%  This style-option file, thebib-plus.sty, is based on code taken from
%  article.doc and report.doc/book.doc.
%
%  It differs from the standard code in that:
%  - a command \bibtitle is defined, to generate the bibliography title
%  - a command \bibheadtitle is defined, to generate the text to be used
%    by \pagestyle{headings}
%  - \bibtitle and \bibheadtitle are set to generate "References" and
%    "REFERENCES" respectively.
%  - an \addcontentsline{toc}{...}{\bibtitle} command is issued.
%  Thus:
%  - the default bibliography title is "References", but can be changed by
%    having \renewcommand{\bibtitle}{...} before \begin{thebibliography}
%    or \bibliography
%  - the default page header text is "REFERENCES", but can be changed by
%    \renewcommand{\bibheadtitle}{...}
%  - \tableofcontents will give a table of contents that mentions the
%    bibliography.
%
%                                                     David Rhead
%                                                     Cripps Computing Centre
%                                                     February 1990
                                                                
%  Define default title and page-head text.
%
\def\bibtitle{References}
\def\bibheadtitle{REFERENCES}

\@ifundefined{chapter}{\def\thebibliography#1{\section*{\bibtitle\@mkboth
  {\bibheadtitle}{\bibheadtitle}}
  \addcontentsline{toc}{section}{\bibtitle}\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}}%
{\def\thebibliography#1{\chapter*{\bibtitle\@mkboth
  {\bibheadtitle}{\bibheadtitle}}
  \addcontentsline{toc}{chapter}{\bibtitle}\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}}