| 1 |
% \iffalse meta-comment |
| 2 |
% %%---------------------------------------------------------------------------- |
| 3 |
% |
| 4 |
%% File: listbib.dtx Copyright (C) 2000 Volker Kuhlmann |
| 5 |
%% (based on biblist.sty version 1.4 copyright 1991 Joachim Schrod) |
| 6 |
%% All rights are reserved. |
| 7 |
%% |
| 8 |
% |
| 9 |
%<*dtx> |
| 10 |
\NeedsTeXFormat{LaTeX2e}[1999/06/01] |
| 11 |
\ProvidesFile{listbib.dtx} |
| 12 |
%</dtx> |
| 13 |
%<package|maindoc>\NeedsTeXFormat{LaTeX2e}[1998/06/01] |
| 14 |
%<package>\ProvidesPackage{listbib} |
| 15 |
%<driver> \ProvidesFile{listbib.drv} |
| 16 |
%<maindoc>\ProvidesFile{listbib.tex} |
| 17 |
% |
| 18 |
% \fi |
| 19 |
% \ProvidesFile{listbib.dtx} |
| 20 |
[2000/08/28 v2.2 list contents of bibtex files (VK)] |
| 21 |
% |
| 22 |
%% |
| 23 |
%% \CharacterTable |
| 24 |
%% {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 |
| 25 |
%% 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 |
| 26 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 27 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 28 |
%% Dollar \$ Percent \% Ampersand \& |
| 29 |
%% Acute accent \' Left paren \( Right paren \) |
| 30 |
%% Asterisk \* Plus \+ Comma \, |
| 31 |
%% Minus \- Point \. Solidus \/ |
| 32 |
%% Colon \: Semicolon \; Less than \< |
| 33 |
%% Equals \= Greater than \> Question mark \? |
| 34 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 35 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 36 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 37 |
%% Right brace \} Tilde \~} |
| 38 |
%% |
| 39 |
% |
| 40 |
% \iffalse |
| 41 |
%<*driver> |
| 42 |
|
| 43 |
\NeedsTeXFormat{LaTeX2e}[1999/06/01] |
| 44 |
\documentclass{ltxdoc} |
| 45 |
%%\IfFileExists{ltxdoc.cfg}{}{\OnlyDescription\RecordChanges\CodelineIndex} |
| 46 |
|
| 47 |
%\OnlyDescription % uncomment to suppress code line listing |
| 48 |
\RecordChanges % uncomment for a change history |
| 49 |
%\CodelineIndex\EnableCrossrefs % uncomment for command index |
| 50 |
\GetFileInfo{listbib.dtx} |
| 51 |
|
| 52 |
\usepackage{listbib} |
| 53 |
|
| 54 |
\begin{document} |
| 55 |
\DocInput{listbib.dtx} |
| 56 |
%%\IfFileExists{ltxdoc.cfg}{}{\PrintChanges\PrintIndex} |
| 57 |
\PrintChanges % uncomment for a change history |
| 58 |
%\PrintIndex % uncomment for command index |
| 59 |
\end{document} |
| 60 |
|
| 61 |
%</driver> |
| 62 |
% \fi |
| 63 |
% |
| 64 |
% |
| 65 |
% \GetFileInfo{listbib.dtx} |
| 66 |
% \CheckSum{259} |
| 67 |
% |
| 68 |
% %^^A This command extracts all index entries: |
| 69 |
% %^^A sed < listbib.idx -e 's,indexentry{,,' -e 's,=.*$,,' |
| 70 |
% |
| 71 |
% \date{\filedate} |
| 72 |
% \title{The \textsf{listbib} Package\thanks |
| 73 |
% {This file has version number \fileversion, |
| 74 |
% last modified \filedate.}} |
| 75 |
% \author{Volker Kuhlmann\thanks{%^^A |
| 76 |
% Email:\ \url{[email protected]}. |
| 77 |
% For a postal address refer to the license section.}} |
| 78 |
% |
| 79 |
% |
| 80 |
% \let\package\textsf |
| 81 |
% \let\env\textsf |
| 82 |
% \let\url\texttt |
| 83 |
% \newcommand\optmeta[1]{[\meta{#1}]} |
| 84 |
% \providecommand\MF{\textsc{meta-font}} |
| 85 |
% \providecommand\fixendverbatim{\vspace{-\bigskipamount}} |
| 86 |
% \renewenvironment{quote}{% |
| 87 |
% \list{}{\leftmargin=0.5\leftmargin\rightmargin\leftmargin}\item\relax |
| 88 |
% }{% |
| 89 |
% \endlist |
| 90 |
% } |
| 91 |
% \makeatletter |
| 92 |
% \providecommand\DescribeWord[1]{% |
| 93 |
% \leavevmode\@bsphack |
| 94 |
% \marginpar{\raggedleft\PrintDescribeEnv{#1}}%^^A |
| 95 |
% \@bsphack\index{#1\actualchar{\protect\ttfamily#1}\encapchar usage}\@esphack |
| 96 |
% \@esphack\ignorespaces |
| 97 |
% } |
| 98 |
% \makeatother |
| 99 |
% |
| 100 |
% %^^A We need listbib for the examples and do therefore include it. But it |
| 101 |
% %^^A sets the headline (see below ;-). So we just reset it again to the |
| 102 |
% %^^A value it had before. Well, it's a kind of a kludge, but it works... |
| 103 |
% \pagestyle{plain} |
| 104 |
% |
| 105 |
% %^^A The examples will consist of framed pseudo-output. We'll need a |
| 106 |
% %^^A variable for the width of these examples. |
| 107 |
% \newdimen\examplewidth |
| 108 |
% |
| 109 |
% |
| 110 |
% \changes{v2.2}{2000/08/28} |
| 111 |
% {Enhancements to the listbib shell script. |
| 112 |
% Example listbib.cfg. |
| 113 |
% Support for entry fields `URL' and `totalpages' (custom-bib uses them).} |
| 114 |
% |
| 115 |
% \changes{v2.1}{2000/03/17} |
| 116 |
% {Fixed bug in \cs{@citex}. |
| 117 |
% Removed silly \cs{listbibpreamble}. |
| 118 |
% listbib.cfg. |
| 119 |
% No longer adding \emph{.bib} to filenames in header. |
| 120 |
% Adding period after annote in listbib.bst. |
| 121 |
% Inherited fields are now not printed! |
| 122 |
% Shell script listbib.} |
| 123 |
% |
| 124 |
% \changes{v2.0}{2000/03/13} |
| 125 |
% {Renamed listbib from biblist version 1.4 by Volker Kuhlmann. |
| 126 |
% Complete revamp: for \LaTeXe, docstrip, etc. |
| 127 |
% Released under GPL.} |
| 128 |
% |
| 129 |
% \changes{1.4}{1992/01/13} |
| 130 |
% {Last version by Joachim Schrod, TU Darmstadt, Darmstadt, Germany. |
| 131 |
% \mbox{\$Date: 1992/01/13 16:35:56\$} |
| 132 |
% Added examples, repaired headline. |
| 133 |
% Called \cs{reset@font} where appropriate. |
| 134 |
% October 91 version of LaTeX was delayed until December 91. Readers |
| 135 |
% might be disturbed if there is the notion of a nonexistant version. |
| 136 |
% } |
| 137 |
% |
| 138 |
% \changes{1.3}{1991/10/14 14:10:21 schrod} |
| 139 |
% {mentioned that this option is supported. |
| 140 |
% moved local guide section to separate file.} |
| 141 |
% |
| 142 |
% \changes{1.2}{1991/10/10 16:13:31 schrod} |
| 143 |
% {changed email address. |
| 144 |
% mentioned LaTeX 2.09 $<$Oct 91${}$ (just announced).} |
| 145 |
% |
| 146 |
% \changes{1.1}{1991/04/13 15:03:08 schrod} |
| 147 |
% {Initial revision.} |
| 148 |
% |
| 149 |
% |
| 150 |
% \maketitle |
| 151 |
% |
| 152 |
% \begin{abstract} |
| 153 |
% This package typesets a listing of a (possibly large) \BibTeX{} input |
| 154 |
% file. With old implementations of texmf the string space could easily be |
| 155 |
% exceeded when trying to typeset large bibliographic databases. Contemporary |
| 156 |
% implementations are usually big and have much higher limits. However, |
| 157 |
% \package{listbib} works with arbitrarily large \BibTeX\ database files. |
| 158 |
% |
| 159 |
% In addition to that, \package{listbib} tries to show the full content of a |
| 160 |
% \BibTeX\ file without alterations introduced by the bibliographic style used. |
| 161 |
% The entry fields ISBN, ISSN, annote, library, totalpages and URL are added to |
| 162 |
% the standard ones. |
| 163 |
% \end{abstract} |
| 164 |
% |
| 165 |
% \tableofcontents |
| 166 |
% |
| 167 |
% |
| 168 |
% \section{License} |
| 169 |
% |
| 170 |
% This package is copyright \textcopyright\ 2000 by: |
| 171 |
% |
| 172 |
% \begin{quote} |
| 173 |
% Volker Kuhlmann, |
| 174 |
% c/o University of Canterbury, |
| 175 |
% ELEC Dept, Creyke Road, |
| 176 |
% Christchurch, New Zealand\\ |
| 177 |
% E-Mail: \url{[email protected]} |
| 178 |
% \end{quote} |
| 179 |
% |
| 180 |
% This program is free software; you can redistribute it and/or modify |
| 181 |
% it under the terms of the GNU General Public License as published by |
| 182 |
% the Free Software Foundation; either version 2 of the License, or |
| 183 |
% (at your option) any later version. |
| 184 |
% |
| 185 |
% To obtain a copy of the license, write to the |
| 186 |
% Free Software Foundation, Inc., |
| 187 |
% 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA, |
| 188 |
% or browse \url{http://www.fsf.org/}. |
| 189 |
% |
| 190 |
% |
| 191 |
% \section{History} |
| 192 |
% |
| 193 |
% This package is derived from |biblist|, version 1.4, 1992/01/13 by Joachim |
| 194 |
% Schrod. J.\ Schrod's association with the university of Darmstadt seems to no |
| 195 |
% longer exist. biblist is available from CTAN and is under the GNU general |
| 196 |
% public license, version 1 or later. |
| 197 |
% |
| 198 |
% \package{listbib} is the successor and will only work with \LaTeXe. |
| 199 |
% It uses the docstrip format for literate programming. |
| 200 |
% The bibliography style was regenerated from btxbst.doc (unsrt), and |
| 201 |
% then enhanced to be suitable for listbib. The fully commented |.bst| file is |
| 202 |
% in the distribution (extension |.doc|). |
| 203 |
% |
| 204 |
% This documentation has little left of the original |biblist| documentation. |
| 205 |
% |
| 206 |
% |
| 207 |
% \section{User manual} |
| 208 |
% |
| 209 |
% \subsection{Introduction} |
| 210 |
% |
| 211 |
% This package facilitates printing of large \BibTeX\ files. With such |
| 212 |
% large files --- especially if the cite keys are long --- the needed string |
| 213 |
% space is often exceeded. Often a Big\TeX{} is available which pushes the |
| 214 |
% limits further out, but with this package any \TeX{} will do it. Printing |
| 215 |
% complete \BibTeX\ files as they are is useful for record-keeping. |
| 216 |
% |
| 217 |
% \DescribeEnv{thebibliography} |
| 218 |
% The |\nocite{*}| command and |thebibliography| environment from \LaTeX\ |
| 219 |
% are used to do the work. The |thebibliography| environment is modified |
| 220 |
% and eliminates huge |.aux| files and a second \LaTeX-run, although |
| 221 |
% cross-references used in the bibliography entries themselves may still |
| 222 |
% require a second \LaTeX-run. |
| 223 |
% |
| 224 |
% \DescribeMacro{\bibliography} |
| 225 |
% A minimal \LaTeX-document must be prepared which uses the article class, |
| 226 |
% loads the \package{listbib} package, and specifies the bibliography to be |
| 227 |
% printed with the |\bibliography| command. Other packages can be loaded as |
| 228 |
% well, for example to set margins or language-specific definitions. |
| 229 |
% |
| 230 |
% \DescribeMacro{\raggedbottom} |
| 231 |
% Other classes can perhaps be used, but \package{listbib} works on the |
| 232 |
% assumption that |\raggedbottom| is in effect, which is why it probably |
| 233 |
% won't work too well with |twocolumn| or |multicol|. A page break within |
| 234 |
% an entry is not allowed and the flexibility at the page bottom is needed. |
| 235 |
% |
| 236 |
% \DescribeMacro{\nocite} |
| 237 |
% \DescribeMacro{\bibliographystyle} |
| 238 |
% Unlike with normal \LaTeX\ documents, use of |\bibliographystyle| is not |
| 239 |
% required, although it is not prohibited. The default is the listbib.bst |
| 240 |
% bibliography style. It is also not necessary to use |\nocite{*}| as that is |
| 241 |
% the default. However |\nocite| can be used to select certain entries only to |
| 242 |
% be printed. |
| 243 |
% |
| 244 |
% A ``bug'' you may encounter is that |\cite| tags within \BibTeX{} entries will |
| 245 |
% not be processed. Instead the cite key itself will be printed. Note that this |
| 246 |
% is not a bug, this is a feature! You have to use |\nocite| for \emph{all} |
| 247 |
% entries that shall be included in the listing. If you do not give any |
| 248 |
% |\nocite| tag at all, a listing with all entries is created. |
| 249 |
% |
| 250 |
% \DescribeMacro{\BibTeX} |
| 251 |
% As a bonus, \package{listbib} defines the control sequence |\BibTeX| if it |
| 252 |
% is not already defined. The definition is copied from |btxdoc.tex|. |
| 253 |
% |
| 254 |
% |
| 255 |
% \subsection{Additional \BibTeX\ Entry Fields} |
| 256 |
% |
| 257 |
% In addition to the entry fields known by the standard \BibTeX\ styles, |
| 258 |
% \package{listbib} recognises these fields: |ISBN|, |ISSN|, |annote|, |
| 259 |
% |library|, |URL|, and |totalpages|. |
| 260 |
% |
| 261 |
% The use of |ISBN| and |ISSN| should be obvious. |
| 262 |
% |
| 263 |
% The |annote| field can be used for annotations or comments regarding this |
| 264 |
% particular entry. The standard \BibTeX\ styles do not make use of this |
| 265 |
% feature, however other styles might. With \package{listbib} it is useful to |
| 266 |
% store a short summary of the contents of this entry. As for |note|, the |
| 267 |
% first word should be capitalised. Punctuation at the end of the field |
| 268 |
% is added by the style if appropriate. |
| 269 |
% |
| 270 |
% The |library| field is not meant to be printed in final documents, and is |
| 271 |
% supplied to store e.g.\ the library location of a book. Useful for database |
| 272 |
% listings only. |
| 273 |
% |
| 274 |
% The |URL| field can be used to store a URL belonging to this bibliography |
| 275 |
% entry. It is also becoming more popular to have bibliography entries which |
| 276 |
% entirely consist of a URL. URLs are typeset as |\url{|\meta{URL}|}|, it is |
| 277 |
% recommended to use package \package{url} with documents referencing |
| 278 |
% bibliography entries which contain a URL. As an additional safeguard, the |
| 279 |
% listbib \BibTeX-style defines |\url| to exand to \meta{URL} if it is not |
| 280 |
% already defined. This field is supported by \package{custom-bib}. |
| 281 |
% |
| 282 |
% The |totalpages| field is meant to store the total number of pages of the |
| 283 |
% work. This field is supported by \package{custom-bib}. |
| 284 |
% |
| 285 |
% All 13 entry types take the |library|, |annote|, |totalpages| and |URL| |
| 286 |
% fields. They take the fields |ISBN| and |ISSN| as well, with these exceptions: |
| 287 |
% |article| only takes |ISSN|, and |unpublished| takes neither |ISBN| nor |ISSN|. |
| 288 |
% |
| 289 |
% |
| 290 |
% \subsection{Formatting of the entries in the resulting listing} |
| 291 |
% |
| 292 |
% \begin{description} |
| 293 |
% \item[\tt cite key] |
| 294 |
% \leavevmode \null \dotfill \quad {\sf\small (Library info)}\break |
| 295 |
% Author(s)/Editor(s).\\ |
| 296 |
% {\em Title.}\\ |
| 297 |
% Publication info.\\ |
| 298 |
% Notes.\\ |
| 299 |
% \null \qquad {\footnotesize Pages: 123 \ensuremath{\bullet} |
| 300 |
% URL: \texttt{http://my.url/file}}\\ |
| 301 |
% \null \qquad {\footnotesize Annotation} |
| 302 |
% \end{description} |
| 303 |
% |
| 304 |
% I.e., an open format is used. Although this needs more space I think the |
| 305 |
% enhanced legibility pays back. |
| 306 |
% |
| 307 |
% Note that you will not get the `Library info' and the `Annotation' in the |
| 308 |
% above format if you use a bibliography style other than |listbib| which |
| 309 |
% does not supply this information with the assumed markup. The parenthesis |
| 310 |
% around the library info are produced by this style option, not by \BibTeX. |
| 311 |
% |
| 312 |
% |
| 313 |
% \subsection{Example} |
| 314 |
% |
| 315 |
% Suppose, there is a file |typography.bib| with references on typography. |
| 316 |
% % |
| 317 |
% \begin{quote} |
| 318 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 319 |
% \begin{verbatim} |
| 320 |
% % typography.bib 13 Jan 92 |
| 321 |
% % References on Typography, Typesetting, and Book Design |
| 322 |
% % |
| 323 |
% |
| 324 |
% % make sure it's at least defined: |
| 325 |
% @preamble{"\providecommand\MF{\textsc{meta-font}}"} |
| 326 |
% |
| 327 |
% @book{typo:tschichold:selected, |
| 328 |
% author = {Jan Tschichold}, |
| 329 |
% title = {Ausgew\"ahlte Aufs\"atze \"uber Fragen der Gestalt des |
| 330 |
% Buches und der Typographie}, |
| 331 |
% publisher = {Birkh\"auser}, |
| 332 |
% address = {Basel}, |
| 333 |
% year = 1975, |
| 334 |
% isbn = {3-7643-1946-1}, |
| 335 |
% note = {A second, unchanged, edition appeared in~1987.}, |
| 336 |
% library = {}, |
| 337 |
% annote = {A collection of his ``classic'' papers. The best book on |
| 338 |
% typographic principles read so far. A definitive `\emph{must |
| 339 |
% read}' for everyone interested in typography, book design, |
| 340 |
% or typesetting.} |
| 341 |
% } |
| 342 |
% |
| 343 |
% @article{typo:blostein:music, |
| 344 |
% author = {Dorothea Blostein}, |
| 345 |
% title = {Justification of Printed Music}, |
| 346 |
% journal = cacm, |
| 347 |
% volume = 34, |
| 348 |
% number = 3, |
| 349 |
% month = mar, |
| 350 |
% year = 1991, |
| 351 |
% pages = {88--99}, |
| 352 |
% annote = {Presents problems and solutions of the task to create a |
| 353 |
% correct spacing while setting notes. The proposed method also |
| 354 |
% takes the temporal relationship of notes into account. |
| 355 |
% Handles two-dimensional layout, e.g., staffs and texts.} |
| 356 |
% } |
| 357 |
% |
| 358 |
% @book{typo:sta:zapf, |
| 359 |
% title = {Herrman Zapf and his Design Philosophy}, |
| 360 |
% publisher = {Society of Typographic Arts}, |
| 361 |
% address = {Chicago}, |
| 362 |
% year = 1987, |
| 363 |
% isbn = {0-941447-00-6}, |
| 364 |
% note = {}, |
| 365 |
% library = {Lib MQ .B77}, |
| 366 |
% annote = {A valuable book. A chapter on his work around \MF{} is |
| 367 |
% included. Was among the most beautiful books of the year.} |
| 368 |
% } |
| 369 |
% \end{verbatim}\fixendverbatim |
| 370 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 371 |
% \end{quote} |
| 372 |
% |
| 373 |
% Furthermore assume that the bibliography style |listbib| is |
| 374 |
% available. Then the \LaTeX{} file |
| 375 |
% |
| 376 |
% \begin{verbatim} |
| 377 |
% \documentclass{article} |
| 378 |
% \usepackage{listbib} |
| 379 |
% \begin{document} |
| 380 |
% \bibliography{typography} |
| 381 |
% \end{document} |
| 382 |
% \end{verbatim}\fixendverbatim |
| 383 |
% |
| 384 |
% may be used to create a listing with all entries. You have to run |
| 385 |
% \LaTeX{}, \BibTeX{}, and \LaTeX{}. (Careful readers will note that |
| 386 |
% there will be a \BibTeX{} warning about a missing author or editor in |
| 387 |
% the Zapf entry.) You do {\it not\/} need to run \LaTeX{} twice after |
| 388 |
% the \BibTeX{} run. The result looks like this: |
| 389 |
% % |
| 390 |
% \begingroup |
| 391 |
% \examplewidth=\linewidth |
| 392 |
% \advance\examplewidth by -2\fboxrule |
| 393 |
% \advance\examplewidth by -2\fboxsep |
| 394 |
% ~\par\noindent\fbox{\begin{minipage}{\examplewidth} |
| 395 |
% \section*{References} |
| 396 |
% |
| 397 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 398 |
% % |
| 399 |
% %^^A We must fake a little bit to include it here. \bibitem gobbles the |
| 400 |
% %^^A next character since it thinks it's a line end. (This might be a |
| 401 |
% %^^A problem for itself, but untill now all bibliography styles put |
| 402 |
% %^^A \bibitem on an own line.) We must supply a token which might be |
| 403 |
% %^^A eaten by \bibitem. Best to use a \relax for this. |
| 404 |
% % |
| 405 |
% \begin{thebibliography}{1} |
| 406 |
% |
| 407 |
% \bibitem{typo:tschichold:selected}\relax |
| 408 |
% Jan Tschichold. |
| 409 |
% \newblock {\it Ausgew\"ahlte Aufs\"atze \"uber Fragen der Gestalt des |
| 410 |
% Buches und der Typographie}. |
| 411 |
% \newblock Birkh\"auser, Basel, 1975. ISBN~3-7643-1946-1. |
| 412 |
% \newblock A second, unchanged, edition appeared in~1987. |
| 413 |
% \newblock |
| 414 |
% \annote A collection of his ``classic'' papers. The best book on |
| 415 |
% typographic principles read so far. A definitive `{\it must\/}' for |
| 416 |
% everyone interested in typography, book design, or typesetting. |
| 417 |
% \endannote. |
| 418 |
% |
| 419 |
% \bibitem{typo:blostein:music}\relax |
| 420 |
% Dorothea Blostein. |
| 421 |
% \newblock Justification of Printed Music. |
| 422 |
% \newblock {\it Communications of the ACM}, 34(3):88--99, March 1991. |
| 423 |
% \newblock |
| 424 |
% \annote Presents problems and solutions of the task to create a correct |
| 425 |
% spacing while setting notes. The proposed method also takes the |
| 426 |
% temporal relationship of notes into account. Handles two-dimensional |
| 427 |
% layout, e.g., staffs and texts. |
| 428 |
% \endannote. |
| 429 |
% |
| 430 |
% \bibitem{typo:sta:zapf}\relax |
| 431 |
% \library{Lib MQ .B77} |
| 432 |
% {\it Herrman Zapf and his Design Philosophy}. |
| 433 |
% \newblock Society of Typographic Arts, Chicago, 1987. ISBN~0-941447-00-6. |
| 434 |
% \newblock |
| 435 |
% \annote A valuable book. A chapter on his work around \MF{} is included. |
| 436 |
% Was among the most beautiful books of the year. |
| 437 |
% \endannote. |
| 438 |
% |
| 439 |
% \end{thebibliography} |
| 440 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 441 |
% \end{minipage}} |
| 442 |
% \endgroup |
| 443 |
% |
| 444 |
% \bigskip |
| 445 |
% |
| 446 |
% To use a bibliography style other than |listbib|, specify it in the usual way |
| 447 |
% with |\bibliographystyle|. For example, |unsrt| gives: |
| 448 |
% % |
| 449 |
% \begingroup |
| 450 |
% \examplewidth=\linewidth |
| 451 |
% \advance\examplewidth by -2\fboxrule |
| 452 |
% \advance\examplewidth by -2\fboxsep |
| 453 |
% ~\par\noindent\fbox{\begin{minipage}{\examplewidth} |
| 454 |
% \section*{References} |
| 455 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 456 |
% %^^A Here the same reason for inserting \relax'es as in the previous |
| 457 |
% %^^A example applies. |
| 458 |
% \begin{thebibliography}{1} |
| 459 |
% |
| 460 |
% \bibitem{typo:tschichold:selected}\relax |
| 461 |
% Jan Tschichold. |
| 462 |
% \newblock {\em Ausgew\"ahlte Aufs\"atze \"uber Fragen der Gestalt des |
| 463 |
% Buches und der Typographie}. |
| 464 |
% \newblock Birkh\"auser, Basel, 1975. |
| 465 |
% \newblock A second, unchanged, edition appeared in~1987. |
| 466 |
% |
| 467 |
% \bibitem{typo:blostein:music}\relax |
| 468 |
% Dorothea Blostein. |
| 469 |
% \newblock Justification of printed music. |
| 470 |
% \newblock {\em Communications of the ACM}, 34(3):88--99, March 1991. |
| 471 |
% |
| 472 |
% \bibitem{typo:sta:zapf}\relax |
| 473 |
% {\em Herrman Zapf and his Design Philosophy}. |
| 474 |
% \newblock Society of Typographic Arts, Chicago, 1987. |
| 475 |
% |
| 476 |
% \end{thebibliography} |
| 477 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 478 |
% \end{minipage}} |
| 479 |
% \endgroup |
| 480 |
% |
| 481 |
% \bigskip |
| 482 |
% |
| 483 |
% Of course, the ISBN/ISSN numbers, annotations, and library information is |
| 484 |
% missing, since |unsrt| does not extract them from the database. (Careful |
| 485 |
% readers will notice another difference: The |listbib| bibliography style does |
| 486 |
% not lower-case titles as the standard styles do.) |
| 487 |
% |
| 488 |
% |
| 489 |
% \subsection{Site Configuration File} |
| 490 |
% |
| 491 |
% The \package{listbib} package will input a site configuration file |
| 492 |
% \DescribeWord{listbib.cfg} |
| 493 |
% |listbib.cfg| if it exists. This is a good place for changing margins or the |
| 494 |
% document title, etc. The configuration file is |\input| at the end of the |
| 495 |
% \package{listbib} package. |
| 496 |
% Here is an example: |
| 497 |
% \begin{quote} |
| 498 |
% \begin{verbatim} |
| 499 |
% %% listbib.cfg VK 30 Jul 2000 |
| 500 |
% |
| 501 |
% % Date format: 99 Month 9999 |
| 502 |
% \newcommand\monthname{% |
| 503 |
% \ifcase \month \or |
| 504 |
% January\or February\or March\or April\or May\or June\or |
| 505 |
% July\or August\or September\or October\or November\or December\fi |
| 506 |
% } |
| 507 |
% \def\today{% |
| 508 |
% \number\day \space \monthname \space \number\year |
| 509 |
% } |
| 510 |
% |
| 511 |
% % Latin-1 input |
| 512 |
% % (There is currently no way to do this from within a .bib file.) |
| 513 |
% \usepackage[latin1]{inputenc} |
| 514 |
% \end{verbatim}\fixendverbatim |
| 515 |
% \end{quote} |
| 516 |
% |
| 517 |
% |
| 518 |
% \subsection{Inheriting Field Entries} |
| 519 |
% |
| 520 |
% As \BibTeX\ currently works, missing fields in all entries which |
| 521 |
% crossreference another entry are inherited from the crossreferenced entry. To |
| 522 |
% illustrate, in this .bib file |
| 523 |
% |
| 524 |
% \begin{quote} |
| 525 |
% \begin{verbatim} |
| 526 |
% @incollection{chapter, |
| 527 |
% crossref="book", |
| 528 |
% author="..", title=".." |
| 529 |
% } |
| 530 |
% @book{book, |
| 531 |
% editor="..", booktitle="..", note=".." |
| 532 |
% } |
| 533 |
% \end{verbatim}\fixendverbatim |
| 534 |
% \end{quote} |
| 535 |
% |
| 536 |
% the chapter entry inherits the |note| field from the |book| entry. The same is |
| 537 |
% true for all other fields which can possibly be inherited. \BibTeX\ does not |
| 538 |
% make the information of whether a field was inherited available in the style |
| 539 |
% file, so the inheritence can not be detected directly. |
| 540 |
% |
| 541 |
% \package{listbib} implements a workaround for this which can detect inherited |
| 542 |
% fields. A field is assumed to be inherited by a crossreferencing entry if its |
| 543 |
% value is identical to that of the crossreferenced entry. This assumption fails |
| 544 |
% when the field values are in fact identical. Please let me know of any cases |
| 545 |
% where that is a problem, and I will try and fix it or make a sepaarte style |
| 546 |
% which does not try to detect inherited fields. A quick fix might be to add |
| 547 |
% something like a |{}| at the end of the field. |
| 548 |
% |
| 549 |
% Currently inheritance is detected for the fields |note|, |annote|, |ISBN|, |
| 550 |
% |ISSN|, |library|, |totalpages| and |URL|. Inherited fields are not printed in |
| 551 |
% the listing. |
| 552 |
% |
| 553 |
% |
| 554 |
% \subsection{The listbib.tex Main Document Frame} |
| 555 |
% |
| 556 |
% \DescribeMacro{\listbibs} |
| 557 |
% The shortest way to to typeset a bibliography is to put something like this |
| 558 |
% into a \meta{file}|.tex| and to run it through \LaTeX, \BibTeX, and (possibly |
| 559 |
% more than once) \LaTeX\ again: |
| 560 |
% \begin{quote} |
| 561 |
% |\newcommand||\listbibs||{|\meta{bibliographies}|}|\\ |
| 562 |
% |\AtBeginDocument{|\meta{preamblematerial}|}|\\ |
| 563 |
% |\input||{||listbib||}| |
| 564 |
% \end{quote} |
| 565 |
% For \meta{bibliographies} list everything to be printed. Any \BibTeX\ |
| 566 |
% files containing string definitions must also be specified (first). |
| 567 |
% |
| 568 |
% \DescribeMacro{\AtBeginDocument} |
| 569 |
% The use of |\AtBeginDocument| is completely optional. If used, |
| 570 |
% \meta{preamblematerial} will be inserted into the preamble of |
| 571 |
% |listbib.tex|. |
| 572 |
% |
| 573 |
% |listbib.tex| also loads the packages |
| 574 |
% \DescribeWord{vmargin} |
| 575 |
% \DescribeWord{url} |
| 576 |
% \package{vmargin} and \package{url} if |
| 577 |
% it can find them. \package{vmargin} sets up the page margins, and |
| 578 |
% \package{url} provides a |\url| command for typesetting urls. |
| 579 |
% |
| 580 |
% A configuration file \meta{file}|.cfg| will be loaded within the preamble of |
| 581 |
% |listbib.tex|, if it exists. |
| 582 |
% |
| 583 |
% This short document selects a document font size of 10pt, and double-sided |
| 584 |
% printing. Unfortunately it is not possible to override that in any of the two |
| 585 |
% configuration files. |
| 586 |
% |
| 587 |
% |
| 588 |
% \subsection{The listbib Shell Script} |
| 589 |
% |
| 590 |
% The |listbib| program can be used to quickly generate a listing of the |
| 591 |
% bibliographies given on the command line. The program is a Unix shell script; |
| 592 |
% sorry if you don't use Unix. You may still be able to port it, send me a copy |
| 593 |
% if you do. |
| 594 |
% |
| 595 |
% Here is its usage: |
| 596 |
% \begin{verbatim} |
| 597 |
% Usage: listbib [OPTIONS] [BIBFILE[.bib] ..] BIBFILE_N[.bib] |
| 598 |
% Version VK 1.2.3, 28 Aug 2000 |
| 599 |
% |
| 600 |
% Options: |
| 601 |
% -h|--help shows help |
| 602 |
% -o|--output FILE generates FILE.dvi / FILE.ps (default listedbibs) |
| 603 |
% -O|--same as -o, but generate FILE.dvi and BIBFILE_N.ps |
| 604 |
% -p|--ps|--postscript generate PostScript as well as dvi |
| 605 |
% -d|--deltemp delete all generated files but .dvi |
| 606 |
% -P|--psonly generate only PostScript (delete all generated files |
| 607 |
% but .ps) |
| 608 |
% -- stop option processing; only .bib files remain |
| 609 |
% \end{verbatim}\fixendverbatim |
| 610 |
% A temporary .tex file is created which makes use of |listbib.tex|. latex, |
| 611 |
% bibtex, and possibly dvips are run on the .tex file to create the listing of |
| 612 |
% all .bib files specified. The .bib extension can be left out. Remember to |
| 613 |
% specify any .bib first which define any strings needed later. |
| 614 |
% |
| 615 |
% By default, the name of the .tex file is |listedbibs.tex|, this can be changed |
| 616 |
% with the |-o| option. Don't specify an extension here. |
| 617 |
% |
| 618 |
% To generate PostScript as well, use the |-p| option. This currently only |
| 619 |
% supports dvips. I can change that if there is demand. The |-d| option will |
| 620 |
% delete all temporary files when |listbib| is finished, and only leave the dvi |
| 621 |
% file. |-P| will create a PostScript file and then delete all others. |
| 622 |
% |
| 623 |
% To only generate a mybib.ps from mybib.bib, use |-P -O|. |
| 624 |
% |
| 625 |
% An error is displayed if the .tex file to be created already exists and is not |
| 626 |
% one generated by listbib. |
| 627 |
% |
| 628 |
% |
| 629 |
% \subsection{To Do and Bugs} |
| 630 |
% |
| 631 |
% Inheritance is currently only checked for the fields |note|, |annote|, |ISBN|, |
| 632 |
% |ISSN|, |library|, |totalpages| and |URL|. Printing of these fields is |
| 633 |
% suppressed for all entry types if inherited. Should printing of other |
| 634 |
% inherited fields be suppressed as well? I am less inclined to suppress |
| 635 |
% |volume|, and I am not sure about |year|, |month|, etc. Please let me know |
| 636 |
% what you think. |
| 637 |
% |
| 638 |
% As a future enhancement one could place a word from the starting and the |
| 639 |
% finishing entry on each page into the page header, like it is in a dictionary. |
| 640 |
% |
| 641 |
% Some kind of section title above each .bib file would be useful. |
| 642 |
% |
| 643 |
% |
| 644 |
% \DoNotIndex{\ ,\.,\_}%^^A DOES NOT WORK!! |
| 645 |
% \DoNotIndex{\@M,\@checkAnnote,\@citex,\@evenhead,\@for,\@gobble} |
| 646 |
% \DoNotIndex{\@highpenalty,\@m,\@ne,\@oddhead,\@tempdima,\@totalleftmargin} |
| 647 |
% \DoNotIndex{\AddBibliographystyle,\AddNocite,\IfFileExists} |
| 648 |
% \DoNotIndex{\InputIfFileExists,\advance,\afterassignment,\annote,\begin} |
| 649 |
% \DoNotIndex{\begingroup,\bib,\break,\catcode,\chardef,\check,\csname,\def} |
| 650 |
% \DoNotIndex{\do,\documentclass,\dotfill,\edef,\else,\end,\endannote} |
| 651 |
% \DoNotIndex{\endcsname,\enddescription,\endgraf,\endgroup,\endinput} |
| 652 |
% \DoNotIndex{\endthebibliography,\escapechar,\expandafter,\f@size,\fbox} |
| 653 |
% \DoNotIndex{\fboxsep,\fi,\fontsize,\footnotesize,\futurelet,\hbox,\hfil} |
| 654 |
% \DoNotIndex{\if@tempswa,\ifx,\ignorespaces,\interlinepenalty,\item,\jobname} |
| 655 |
% \DoNotIndex{\kern,\lb,\leavevmode,\leftmargin,\leftmark,\let,\linewidth} |
| 656 |
% \DoNotIndex{\lower,\mark,\markboth,\newblock,\newline,\next,\null,\obeylines} |
| 657 |
% \DoNotIndex{\parsep,\parshape,\penalty,\prepare,\providecommand,\quad,\relax} |
| 658 |
% \DoNotIndex{\reset@font,\rightmark,\rightskip,\rm,\section,\selectfont} |
| 659 |
% \DoNotIndex{\setmarginsrb,\sfcode,\small,\string,\textrm,\textsc,\textsf} |
| 660 |
% \DoNotIndex{\texttt,\today,\tt,\typeout,\uscode,\usepackage,\vmargin,\vskip} |
| 661 |
% \DoNotIndex{\z@,\z@skip} |
| 662 |
% \DoNotIndex{\thebibliography,\ttfamily} |
| 663 |
% |
| 664 |
% \StopEventually{} |
| 665 |
% |
| 666 |
% |
| 667 |
% |
| 668 |
% \section{Implementation} |
| 669 |
% |
| 670 |
% |
| 671 |
% \subsection{Main Document for Quick Use} |
| 672 |
% |
| 673 |
% %^^A NOTE: "latex listbib.ins" does not extract module <maindoc> if it |
| 674 |
% %^^A is after module <package> !! |
| 675 |
% |
| 676 |
% The intended usage is this: |
| 677 |
% \begin{quote} |
| 678 |
% |\newcommand||\listbibs||{|\meta{bibliographies}|}|\\ |
| 679 |
% |\input||{||listbib||}| |
| 680 |
% \end{quote} |
| 681 |
% |
| 682 |
% \begin{macrocode} |
| 683 |
%<*maindoc> |
| 684 |
% \end{macrocode} |
| 685 |
% |
| 686 |
% \begin{macrocode} |
| 687 |
\documentclass[10pt,twoside]{article} |
| 688 |
% \end{macrocode} |
| 689 |
% |
| 690 |
% Set document margins if package \package{vmargin} is installed. Load package |
| 691 |
% \package{url} if available; this package provides an excellent |\url| command |
| 692 |
% which can be used in bibliography entries. |
| 693 |
% |
| 694 |
% \begin{macrocode} |
| 695 |
%% Packages |
| 696 |
\IfFileExists{vmargin.sty}{% use if available |
| 697 |
\usepackage{vmargin}% |
| 698 |
\setmarginsrb{25mm}{12mm}{22mm}{8mm}{10pt}{8mm}{}{10mm}}{} |
| 699 |
\IfFileExists{url.sty}{\usepackage{url}}{} % load if installed |
| 700 |
% \end{macrocode} |
| 701 |
% |
| 702 |
% \begin{macrocode} |
| 703 |
%% Layout |
| 704 |
\fboxsep 0.8pt % normally 3pt |
| 705 |
% \end{macrocode} |
| 706 |
% |
| 707 |
% And yes, we want \package{listbib}\ldots |
| 708 |
% |
| 709 |
% \begin{macrocode} |
| 710 |
%% Package listbib |
| 711 |
\usepackage{listbib} |
| 712 |
% \end{macrocode} |
| 713 |
% |
| 714 |
% Further document setting can be placed into a per-job configuration file, |
| 715 |
% which will be loaded if found. |
| 716 |
% |
| 717 |
% \begin{macrocode} |
| 718 |
%% Load per-job configuration file if it exists |
| 719 |
\InputIfFileExists{\jobname.cfg}{\typeout |
| 720 |
{*** listbib: per-job configuration file \jobname.cfg found. ***}}{} |
| 721 |
% \end{macrocode} |
| 722 |
% |
| 723 |
% ^^A Or, simple settings can be inserted with this command. |
| 724 |
% ^^A This is stupid. Use |\AtBeginDocument|! |
| 725 |
% \begin{macrocode} |
| 726 |
%\csname listbibpreamble\endcsname % call it if it is defined |
| 727 |
% \end{macrocode} |
| 728 |
% |
| 729 |
% \begin{macro}{\listbibs} |
| 730 |
% Main document part. The bibliographies to typeset are taken from |\listbibs|. |
| 731 |
% |
| 732 |
% \begin{macrocode} |
| 733 |
%% Main |
| 734 |
\begin{document} |
| 735 |
\bibliography{\listbibs} |
| 736 |
\end{document} |
| 737 |
% \end{macrocode} |
| 738 |
% \end{macro} |
| 739 |
% |
| 740 |
% \begin{macrocode} |
| 741 |
%</maindoc> |
| 742 |
% \end{macrocode} |
| 743 |
% |
| 744 |
% |
| 745 |
% \subsection{Preliminary} |
| 746 |
% |
| 747 |
% \begin{macrocode} |
| 748 |
%<*package> |
| 749 |
% \end{macrocode} |
| 750 |
% |
| 751 |
% The main work is to supply the environment |thebibliography|; in |
| 752 |
% fact, we implement it as a |description| environment. The environment |
| 753 |
% has an unused argument. In addition we have to supply a correct |
| 754 |
% definition for the |\bibitem| command which takes the cite key as its |
| 755 |
% argument. Of course, this will result in an |\item|. After the |
| 756 |
% |\bibitem| a |\library| tag may follow, with one parameter followed |
| 757 |
% by a period. Then comes the reference, the (optional) annotation is |
| 758 |
% a block of its own, enclosed in |\annote| and |\endannote|. After |
| 759 |
% |\endannote| comes a period which should be discarded. (This should |
| 760 |
% be done in the \BibTeX{} style, but nevertheless\dots) |
| 761 |
% |
| 762 |
% Before we start we declare some shorthands for category codes. |
| 763 |
% By declaring the underscore~`(|_|)' as letter we can use it in our |
| 764 |
% macros. (I agree with {\sc D.~Knuth} that |
| 765 |
% |\identifier_several_words_long| is more readable than |
| 766 |
% |\IdentifierSeveralWordsLong| and in every case better than |
| 767 |
% |\p@@@s|.) As this is a \LaTeX{} style option the at sign is a letter |
| 768 |
% anyhow; so we can use the ``private'' Plain and \LaTeX{} macros; and |
| 769 |
% with the underscore we can make our own macros more readable. But as |
| 770 |
% we have to restore this category code at the end of this macro file |
| 771 |
% we store its former value in the control sequence |\uscode|. This |
| 772 |
% method is better than using a group because not all macros have to |
| 773 |
% be defined global this way. |
| 774 |
% |
| 775 |
% \begin{macrocode} |
| 776 |
\chardef\uscode=\catcode`\_ |
| 777 |
\catcode`\_=11 |
| 778 |
% \end{macrocode} |
| 779 |
% |
| 780 |
% |
| 781 |
% \subsection{The Bibliography} |
| 782 |
% |
| 783 |
% \begin{environment}{thebibliography} |
| 784 |
% Within an entry we use a ragged right margin. To break within an |
| 785 |
% entry is always difficult and is made easier in this way. After all, |
| 786 |
% the open format we use gives a ragged impression anyhow. Within an |
| 787 |
% entry we dissallow page breaks and we do not treat periods as full |
| 788 |
% stops. |
| 789 |
% |
| 790 |
% \begin{macrocode} |
| 791 |
\def\thebibliography#1{% |
| 792 |
\description |
| 793 |
\rightskip \z@ plus 2em |
| 794 |
\interlinepenalty\@M |
| 795 |
\sfcode`\.=\@m |
| 796 |
} |
| 797 |
\let\endthebibliography=\enddescription |
| 798 |
% \end{macrocode} |
| 799 |
% \end{environment} |
| 800 |
% |
| 801 |
% |\bibitem| should look for the next token: If a library info |
| 802 |
% exists it must go in the same line, otherwise a line break must be |
| 803 |
% issued. |
| 804 |
% |
| 805 |
% \begin{macro}{\@lbibitem} |
| 806 |
% \begin{macro}{\@bibitem} |
| 807 |
% But |\bibitem| itself is not of interest, it looks only for the |
| 808 |
% optional argument. We have to redefine |\@bibitem|. If a |
| 809 |
% bibliography style like |alpha| is used, |\bibitem| will be supplied with |
| 810 |
% an optional argument. We ignore this optional argument. |
| 811 |
% |
| 812 |
% After the argument(s) of |\bibitem| a line end occurs in any case. The |
| 813 |
% optional |\library| tag will follow on the next line. This means we |
| 814 |
% first have to gobble the line end char |^^M|, and have to check the |
| 815 |
% next token afterwards. If this next token is |\library| we will do |
| 816 |
% nothing since |\library| will itself end the line. Otherwise we do a |
| 817 |
% line break. Experiments have shown that the dotted line at the start |
| 818 |
% of every entry helps with finding the different entries. |
| 819 |
% |
| 820 |
% \begin{macrocode} |
| 821 |
\def\@lbibitem[#1]{\@bibitem} |
| 822 |
\def\@bibitem#1{% |
| 823 |
\item[\texttt{\lb_sanitize{#1}}]\leavevmode |
| 824 |
\null \dotfill |
| 825 |
\begingroup |
| 826 |
\obeylines |
| 827 |
\afterassignment\prepare_check_library |
| 828 |
\let\next % gobble following ^^M |
| 829 |
} |
| 830 |
\def\prepare_check_library{% |
| 831 |
\futurelet\next\check_library |
| 832 |
} |
| 833 |
\def\check_library{% |
| 834 |
\ifx \next\library \else \break \fi |
| 835 |
\endgroup |
| 836 |
} |
| 837 |
\def\lb_sanitize#1{{\escapechar=-1 |
| 838 |
\expandafter\string\csname#1\endcsname}} |
| 839 |
% \end{macrocode} |
| 840 |
% \end{macro} |
| 841 |
% \end{macro} |
| 842 |
% |
| 843 |
% |
| 844 |
% \subsection{Library} |
| 845 |
% |
| 846 |
% \begin{macro}{\library} |
| 847 |
% We assume that the library info and the cite key will fit into |
| 848 |
% one line. If this is not true, a two line solution would have to be set up. |
| 849 |
% |
| 850 |
% We add |\@highpenalty| instead of |\@M| after the library part to avoid |
| 851 |
% an underfull hbox warning and an empty line if both author and editor are |
| 852 |
% empty (in which case there is a |\newblock| immediately following the |
| 853 |
% |\library{..}|. Alternativelly, we could implement more |\futurelet| |
| 854 |
% trickery. |
| 855 |
% |
| 856 |
% \begin{macrocode} |
| 857 |
\def\library#1{% |
| 858 |
\quad\textsf{\small (#1)}\penalty -\@highpenalty |
| 859 |
} |
| 860 |
% \end{macrocode} |
| 861 |
% \end{macro} |
| 862 |
% |
| 863 |
% |
| 864 |
% \subsection{Annotation} |
| 865 |
% |
| 866 |
% \begin{macro}{\newblock} |
| 867 |
% A reference is divided into blocks starting with |\newblock|. |
| 868 |
% Each block shall start a new line. We use |\newline| for this. A |
| 869 |
% special block is the one with an annotation in it. Since we want to |
| 870 |
% indent this block once more we must change the parshape. But then we |
| 871 |
% have to finish the paragraph first. The annotation block starts with |
| 872 |
% |\annote| and may be easily recognized in this way. |
| 873 |
% |
| 874 |
% \begin{macrocode} |
| 875 |
\def\newblock{% |
| 876 |
\futurelet\next\@checkAnnote |
| 877 |
} |
| 878 |
\def\@checkAnnote{% |
| 879 |
\ifx \next\annote \else \newline \fi |
| 880 |
} |
| 881 |
% \end{macrocode} |
| 882 |
% \end{macro} |
| 883 |
% |
| 884 |
% \begin{macro}{\annote} |
| 885 |
% The annotation is a paragraph on its own and indented by |\leftmargin|. |
| 886 |
% Since it is not a paragraph in the logical sense we do not insert |
| 887 |
% vertical glue (i.e., |\parskip|) at the top. The annotation is typeset |
| 888 |
% in a smaller size. We assume that it consists of full sentences which |
| 889 |
% might be made up in a proper way. Therefore we don't use a ragged |
| 890 |
% margin here. |
| 891 |
% |
| 892 |
% The change of |\parshape| has to be reset after the group --- these |
| 893 |
% changes are not local. |
| 894 |
% |
| 895 |
% \begin{macrocode} |
| 896 |
\def\annote{% |
| 897 |
\endgraf |
| 898 |
\vskip -\parsep |
| 899 |
\begingroup |
| 900 |
\reset@font\footnotesize |
| 901 |
\rightskip\z@skip |
| 902 |
\advance\linewidth -\leftmargin |
| 903 |
\advance\@totalleftmargin \leftmargin |
| 904 |
\parshape \@ne \@totalleftmargin \linewidth |
| 905 |
} |
| 906 |
% \end{macrocode} |
| 907 |
% \end{macro} |
| 908 |
% \begin{macro}{\endannote} |
| 909 |
% The period in the definition is used to gobble the period placed by \BibTeX. |
| 910 |
% \begin{macrocode} |
| 911 |
\def\endannote.{% |
| 912 |
\endgraf |
| 913 |
\endgroup |
| 914 |
\parshape \@ne \@totalleftmargin \linewidth |
| 915 |
} |
| 916 |
% \end{macrocode} |
| 917 |
% \end{macro} |
| 918 |
% |
| 919 |
% |
| 920 |
% \subsection{Citation Key} |
| 921 |
% |
| 922 |
% \begin{macro}{\@citex} |
| 923 |
% In our documents |\cite| will print the cite key in typewriter with a framed |
| 924 |
% box around. In fact, |\cite| expands to |\@citex|, which has an optional |
| 925 |
% argument. The flag |\if@tempswa| shows if this optional argument is there. |
| 926 |
% |\texttt{..}| will alter |\if@tempswa|. So might |\fbox| and |\ttfamily| in |
| 927 |
% the future. |\fbox| does not work inside |\if|, and |\lb_sanitize| |
| 928 |
% does not work inside a |\def|, so we save the flag in |\@cxt|. |
| 929 |
% |
| 930 |
% ^^A > \cite=macro: |
| 931 |
% ^^A ->\protect \cite . |
| 932 |
% ^^A > \cite =\long macro: |
| 933 |
% ^^A ->\@ifnextchar [{\@tempswatrue \@citex }{\@tempswafalse \@citex []}. |
| 934 |
% |
| 935 |
% \begin{macrocode} |
| 936 |
\def\@citex[#1]#2{\if@tempswa\def\@cxt{y}\else\let\@cxt\relax\fi |
| 937 |
\fbox{{\ttfamily\lb_sanitize{#2}}% |
| 938 |
\if y\@cxt , \ttfamily\lb_sanitize{#1}\fi}} |
| 939 |
% \end{macrocode} |
| 940 |
% \end{macro} |
| 941 |
% |
| 942 |
% |
| 943 |
% \subsection{Defaults for $\backslash$nocite and $\backslash$bibliographystyle} |
| 944 |
% |
| 945 |
% \begin{macro}{\@@nocite} |
| 946 |
% \begin{macro}{\@@bibliographystyle} |
| 947 |
% \begin{macro}{\@@bibliography} |
| 948 |
% First the original definitions of the to-be-redefined control sequences are |
| 949 |
% saved. We define two macros which will issue the default given above. |
| 950 |
% These macros are not private, but protected; a knowing user may redefine the |
| 951 |
% `default bibliography style' in this way. |
| 952 |
% |
| 953 |
% \begin{macrocode} |
| 954 |
\let\@@nocite=\nocite |
| 955 |
\let\@@bibliographystyle=\bibliographystyle |
| 956 |
\let\@@bibliography=\bibliography |
| 957 |
% \end{macrocode} |
| 958 |
% \end{macro} |
| 959 |
% \end{macro} |
| 960 |
% \end{macro} |
| 961 |
% |
| 962 |
% ^^A\DescribeMacro{\nocite} |
| 963 |
% ^^A\DescribeMacro{\bibliographystyle} |
| 964 |
% \begin{macro}{\nocite} |
| 965 |
% \begin{macro}{\bibliographystyle} |
| 966 |
% If |\nocite| or |\bibliographystyle| is issued, the default |
| 967 |
% tags are discarded, the original meaning is restored, and the control |
| 968 |
% sequence is reissued again. |
| 969 |
% |
| 970 |
% \begin{macrocode} |
| 971 |
\def\AddNocite{\nocite{*}} |
| 972 |
\def\AddBibliographystyle{\bibliographystyle{listbib}} |
| 973 |
\def\nocite{% |
| 974 |
\let\AddNocite\relax |
| 975 |
\let\nocite\@@nocite |
| 976 |
\nocite |
| 977 |
} |
| 978 |
\def\bibliographystyle{% |
| 979 |
\let\AddBibliographystyle\relax |
| 980 |
\let\bibliographystyle\@@bibliographystyle |
| 981 |
\bibliographystyle |
| 982 |
} |
| 983 |
% \end{macrocode} |
| 984 |
% \end{macro} |
| 985 |
% \end{macro} |
| 986 |
% |
| 987 |
% |
| 988 |
% \subsection{Bibliographies and Title} |
| 989 |
% |
| 990 |
% \begin{macro}{\bibliography} |
| 991 |
% The |\bibliography| command will first issue the missing default |
| 992 |
% tags, will produce a heading afterwards, will setup the headline, and |
| 993 |
% will create the bibliography itself. |
| 994 |
% \begin{macrocode} |
| 995 |
\def\bibliography#1{% |
| 996 |
\AddNocite |
| 997 |
\AddBibliographystyle |
| 998 |
\section*{\refname}% |
| 999 |
\mark_for_headline{#1}% |
| 1000 |
\@@bibliography{#1}% |
| 1001 |
} |
| 1002 |
% \end{macrocode} |
| 1003 |
% \end{macro} |
| 1004 |
% |
| 1005 |
% \begin{macro}{\refname} |
| 1006 |
% The section heading text comes from |\refname|, which we give a new default. |
| 1007 |
% ^^A using "\ " after "\BibTeX" causes the space command to be indexed, |
| 1008 |
% ^^A even if it is listed with \DoNotIndex{}. |
| 1009 |
% \begin{macrocode} |
| 1010 |
\def\refname{\BibTeX{} Database Listing} |
| 1011 |
% \end{macrocode} |
| 1012 |
% \end{macro} |
| 1013 |
% |
| 1014 |
% \begin{macro}{\BibTeX} |
| 1015 |
% Provide |\BibTeX| if it has not yet been defined. |
| 1016 |
% This definition is taken from btxdoc.tex (compared with \LaTeX's definition |
| 1017 |
% of |\TeX|, this one has the ``E'' not touch the ``T'' and ``X''. |
| 1018 |
% Unfortunately the standard computer modern fonts do not supply a small caps |
| 1019 |
% bold, so we expect a NFSS warning when |\BibTeX| appears in the bold-faced |
| 1020 |
% section heading. That is, unless we do some trickery\ldots |
| 1021 |
% |
| 1022 |
% \begin{macrocode} |
| 1023 |
\providecommand\BibTeX{% |
| 1024 |
\textrm{B\kern-.05em% |
| 1025 |
{\@tempdima\f@size pt\fontsize{0.83333\@tempdima}\z@\selectfont |
| 1026 |
I\kern-.025em B}% |
| 1027 |
\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}% |
| 1028 |
} |
| 1029 |
\providecommand\BibTeX{% one of the 2... |
| 1030 |
\textrm{B\kern-.05em\textsc{i\kern-.025em b}% |
| 1031 |
\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}% |
| 1032 |
} |
| 1033 |
% \end{macrocode} |
| 1034 |
% \end{macro} |
| 1035 |
% |
| 1036 |
% |
| 1037 |
% \subsection{Page header} |
| 1038 |
% |
| 1039 |
% The page header shows the database names given with the |
| 1040 |
% |\bibliography| command and the current date. |
| 1041 |
% We do not issue a warning if no file name is given; this will be |
| 1042 |
% done by |\@@bibliography|. When a file name exists a comma and a |
| 1043 |
% space will be prepended at the very beginning of |\bib_list|. The |
| 1044 |
% comma is removed after the loop. When there was no file name |
| 1045 |
% |\bib_list| will expand to an empty list, the |\relax| serves as a |
| 1046 |
% catch-argument for |\@gobble|. |
| 1047 |
% |
| 1048 |
% A |.bib| is no longer added to each bibliography filename to make the line |
| 1049 |
% shorter. If there are too many names the header won't fit on the page. This |
| 1050 |
% should be fixed somehow. |
| 1051 |
% |
| 1052 |
% ^^A \@for \bib_file :=#1\do {\edef\bib_list{\bib_list, \bib_file.bib}}% |
| 1053 |
% \begin{macrocode} |
| 1054 |
\def\mark_for_headline#1{% |
| 1055 |
\def\bib_list{}% |
| 1056 |
\@for \bib_file :=#1\do {\edef\bib_list{\bib_list, \bib_file}}% |
| 1057 |
\edef\bib_list{\expandafter\@gobble\bib_list \relax}% |
| 1058 |
\markboth{{\reset@font\ttfamily\bib_list}}{{\reset@font\ttfamily\bib_list}}% |
| 1059 |
} |
| 1060 |
\def\@oddhead{\reset@font\rmfamily \hfil \leftmark \quad (\today)} |
| 1061 |
\def\@evenhead{\reset@font\rmfamily (\today)\quad \ignorespaces |
| 1062 |
\rightmark \hfil} |
| 1063 |
% \end{macrocode} |
| 1064 |
% |
| 1065 |
% |
| 1066 |
% \subsection{Site Configuration File} |
| 1067 |
% |
| 1068 |
% Further document settings can be placed into a site configuration file, |
| 1069 |
% \DescribeWord{listbib.cfg} |
| 1070 |
% which will be loaded if found. This is a good place to put some |
| 1071 |
% default margin settings, for example. |
| 1072 |
% |
| 1073 |
% \begin{macrocode} |
| 1074 |
\InputIfFileExists{listbib.cfg}{\typeout |
| 1075 |
{*** listbib: site configuration file listbib.cfg found. ***}}{} |
| 1076 |
% \end{macrocode} |
| 1077 |
% |
| 1078 |
% |
| 1079 |
% \subsection{Finish} |
| 1080 |
% |
| 1081 |
% We must restore our catcode and are finished. |
| 1082 |
% |
| 1083 |
% \begin{macrocode} |
| 1084 |
\catcode`\_=\uscode |
| 1085 |
\endinput |
| 1086 |
% \end{macrocode} |
| 1087 |
% |
| 1088 |
% |
| 1089 |
% \begin{macrocode} |
| 1090 |
%</package> |
| 1091 |
% \end{macrocode} |
| 1092 |
% |
| 1093 |
% |
| 1094 |
% \Finale |
| 1095 |
% |
| 1096 |
% \iffalse |
| 1097 |
% %% EOF listbib.dtx |
| 1098 |
% %%---------------------------------------------------------------------------- |
| 1099 |
% \fi |