summaryrefslogtreecommitdiff
path: root/macros/lamstex/inputs/bibtex.tex
blob: 52a9af0174b69e3b321c3ad4503b4eec62167d74 (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
51
52
53
54
55
56
57
58
59
% BIBTEX.TEX  VERSION 2.0
% COPYRIGHT (C) 1991 BY THE TEXPLORATORS CORPORATION
% ALL RIGHTS RESERVED

% THIS FILE SHOULD NOT BE CHANGED IN ANY WAY. 

%\input cd.tox
%\input islands.tox
%\input bib.tox
%\input alignat.tox
%\input lists.tox
%\input cardord.tox
%\input anynum.tox
%\input dblacc.tox
%\input literal.tox
\catcode`\@=11
\let\alloc@\alloc@@
\def\args@#1{\count@\@ne\toks@{}\loop
 \edef\next@{\toks@{\the\toks@########\number\count@}}%
 \next@\ifnum\count@<#1 \advance\count@\@ne\repeat}
\def\newcommand#1{\def\nextiv@{#1}%
 \def\nextii@[##1]{\args@{##1}%
  \edef\next@{\noexpand\define\expandafter\noexpand\nextiv@\the\toks@}%
   \next@}%
 \def\nextiii@{\edef\next@{\noexpand\define
  \expandafter\noexpand\nextiv@}\next@}%
 \def\next@{\ifx\next[\expandafter\nextii@\else\expandafter\nextiii@\fi}%
 \futurelet\next\next@}
\def\em{\ifdim\fontdimen\@ne\the\font>\z@\rm\else\it\fi}
\def\mbox{\leavevmode\hbox}
\newcount\bibitemcount@
\newdimen\bibindent@
\def\bibitem{%
 \def\nextii@[##1]##2{\bibitem@{##1}{##2}}%
 \def\nextiii@##1{\global\advance\bibitemcount@\@ne
  \bibitem@{\number\bibitemcount@}{##1}}%
 \def\next@{\ifx\next[\expandafter\nextii@\else
  \expandafter\nextiii@\fi}%
 \futurelet\next\next@}%
\def\bibitem@#1#2{{\def\thelabel@{#1}%
 \let\thelabel@@\empty\let\thelabel@@@\empty\let\thelabel@@@@\empty
 \label{#2}}%
 \par
 \hangafter\@ne\hangindent\bibindent@
 \noindent@\hbox to\bibindent@{#1\hfil}%
 \ignorespaces}
\def\begin#1#2{%
 \def\next@{#1}\def\nextii@{thebibliography}%
 \ifx\next@\nextii@
 \beginthebibliography@{#2}%
 \else\Err@{I can't deal with \string\begin{#1}}\fi}
\def\end#1{\def\next@{#1}\def\nextii@{thebibliography}%
 \ifx\next@\nextii@\else\Err@{I can deal with \string\end{#1}}\fi}
\def\alloc@#1#2#3#4#5{\global\advance\count1#1by\@ne
  \ch@ck#1#4#2%
  \allocationnumber=\count1#1%
  \global#3#5=\allocationnumber
  \wlog{\string#5=\string#2\the\allocationnumber}}
\catcode`\@=\active