summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ncclatex/nccbiblist.sty
blob: 758293992a7c534dd832391f47eb054f2886f384 (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
47
48
49
50
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{nccbiblist}
         [2005/12/24 v1.00 Bibliography list (NCC)]
%
% \changes{v1.00}{2005/12/24}{This version is uploaded to CTAN}
%
\RequirePackage{topsection}
%
% Bibliography without header. It is possible to set starting number
% for the bibliography counter. If starting number is less that zero,
% the numbering will be continued from the previous biblist.
%
% \begin{biblist}[starting number]{prototype} ... \end{biblist}
%
% The biblist style is specified in the \bibliststyle macro.
% It is equal to \small by default.
%
\newcommand{\bibliststyle}{\small}
\providecommand*\@openbib@code{}
\def\NCC@bibliststart{0}
\def\NCC@biblisthook{}
\newenvironment*{biblist}[2][0]{
  \bibliststyle
  \list{\@biblabel{\@arabic\c@enumiv}}{%
    \settowidth\labelwidth{\@biblabel{#2}}%
    \leftmargin\labelwidth \advance\leftmargin\labelsep
    \@openbib@code
    \usecounter{enumiv}\let\p@enumiv\@empty
    \renewcommand\theenumiv{\@arabic\c@enumiv}%
    \NCC@biblisthook
  }%
  \setcounter{enumiv}{#1}%
  \ifnum \c@enumiv <\z@ \setcounter{enumiv}{\NCC@bibliststart}\fi
  \sloppy \widowpenalty 4000
  \clubpenalty 4000 \@clubpenalty \clubpenalty
  \sfcode`\.\@m
}{\def\@noitemerr{\@latex@warning{Empty `biblist' environment}}%
  \xdef\NCC@bibliststart{\the\c@enumiv}
  \endlist
}
%
% We also redefine |thebibliography| environment to be based on the
% biblist environment.
%
\def\thebibliography{%
  \@iftopchapter{\topsection{\bibname}}{\topsection{\refname}}%
  \biblist[0]%
}
\let\endthebibliography=\endbiblist
\endinput