summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/listbib/listbib.sty
blob: 3022e5bea97f820b85951d67386cfabd61d9f8e6 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
%%
%% This is file `listbib.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% listbib.dtx  (with options: `package')
%% 
%% File: listbib.dtx Copyright (C) 2000 Volker Kuhlmann
%%       (based on biblist.sty version 1.4 copyright 1991 Joachim Schrod)
%% All rights are reserved.
%%
\NeedsTeXFormat{LaTeX2e}[1998/06/01]
\ProvidesPackage{listbib}
       [2000/08/28 v2.2 list contents of bibtex files (VK)]
%%
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\chardef\uscode=\catcode`\_
\catcode`\_=11
\def\thebibliography#1{%
    \description
        \rightskip \z@ plus 2em
        \interlinepenalty\@M
        \sfcode`\.=\@m
    }
\let\endthebibliography=\enddescription
\def\@lbibitem[#1]{\@bibitem}
\def\@bibitem#1{%
    \item[\texttt{\lb_sanitize{#1}}]\leavevmode
    \null \dotfill
    \begingroup
        \obeylines
        \afterassignment\prepare_check_library
        \let\next               % gobble following ^^M
    }
\def\prepare_check_library{%
        \futurelet\next\check_library
    }
\def\check_library{%
        \ifx \next\library \else \break \fi
    \endgroup
    }
\def\lb_sanitize#1{{\escapechar=-1
    \expandafter\string\csname#1\endcsname}}
\def\library#1{%
    \quad\textsf{\small (#1)}\penalty -\@highpenalty
    }
\def\newblock{%
    \futurelet\next\@checkAnnote
    }
\def\@checkAnnote{%
    \ifx \next\annote \else \newline \fi
    }
\def\annote{%
    \endgraf
    \vskip -\parsep
    \begingroup
        \reset@font\footnotesize
        \rightskip\z@skip
        \advance\linewidth -\leftmargin
        \advance\@totalleftmargin \leftmargin
        \parshape \@ne \@totalleftmargin \linewidth
    }
\def\endannote.{%
        \endgraf
    \endgroup
    \parshape \@ne \@totalleftmargin \linewidth
    }
\def\@citex[#1]#2{\if@tempswa\def\@cxt{y}\else\let\@cxt\relax\fi
    \fbox{{\ttfamily\lb_sanitize{#2}}%
          \if y\@cxt , \ttfamily\lb_sanitize{#1}\fi}}
\let\@@nocite=\nocite
\let\@@bibliographystyle=\bibliographystyle
\let\@@bibliography=\bibliography
\def\AddNocite{\nocite{*}}
\def\AddBibliographystyle{\bibliographystyle{listbib}}
\def\nocite{%
    \let\AddNocite\relax
    \let\nocite\@@nocite
    \nocite
    }
\def\bibliographystyle{%
    \let\AddBibliographystyle\relax
    \let\bibliographystyle\@@bibliographystyle
    \bibliographystyle
    }
\def\bibliography#1{%
    \AddNocite
    \AddBibliographystyle
    \section*{\refname}%
    \mark_for_headline{#1}%
    \@@bibliography{#1}%
    }
\def\refname{\BibTeX{} Database Listing}
\providecommand\BibTeX{%
    \textrm{B\kern-.05em%
        {\@tempdima\f@size pt\fontsize{0.83333\@tempdima}\z@\selectfont
         I\kern-.025em B}%
        \kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}%
    }
\providecommand\BibTeX{% one of the 2...
    \textrm{B\kern-.05em\textsc{i\kern-.025em b}%
        \kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}%
    }
\def\mark_for_headline#1{%
    \def\bib_list{}%
    \@for \bib_file :=#1\do {\edef\bib_list{\bib_list, \bib_file}}%
    \edef\bib_list{\expandafter\@gobble\bib_list \relax}%
    \markboth{{\reset@font\ttfamily\bib_list}}{{\reset@font\ttfamily\bib_list}}%
    }
\def\@oddhead{\reset@font\rmfamily \hfil \leftmark \quad (\today)}
\def\@evenhead{\reset@font\rmfamily (\today)\quad \ignorespaces
    \rightmark \hfil}
\InputIfFileExists{listbib.cfg}{\typeout
    {*** listbib: site configuration file listbib.cfg found. ***}}{}
\catcode`\_=\uscode
\endinput
%%
%% End of file `listbib.sty'.