% \iffalse % % Copyright (C) 1996-98 by Jochen R"utschlin. All rights reserved. % % This file is part of the `jrbib' package. % % IMPORTANT NOTICE: % % You are not allowed to change this file. % % You are NOT ALLOWED to distribute this file alone. You are NOT % ALLOWED to take money for the distribution or use of this file (or % a changed version). % % If you receive only some of these files from someone, complain! % % \fi % % \CheckSum{100} % % \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 \~} % % \iffalse %<*driver> \documentclass[a4paper,11pt]{ltxdoc} \pagestyle{empty} \DisableCrossrefs \OnlyDescription \usepackage[german]{babel} \usepackage{typearea} \typearea{15} \usepackage{multicol} \renewcommand{\meta}[1]{{\normalfont\textit{#1}}} \renewcommand{\DescribeMacro}[1]{\relax} \renewcommand{\DescribeEnv}[1]{\relax} \newcommand*{\Describe}[1]{% \bigskip\noindent\fbox{\footnotesize\texttt{\bslash{}#1}}\par\smallskip} \newcommand{\Descriptionlabel}[1]{$\triangleright$ \texttt{#1}:\hfill} \newenvironment{Description}% {% \begin{list}{}{% \settowidth{\labelwidth}{$\triangleright$ :}% \setlength{\leftmargin}{\labelwidth}% \addtolength{\leftmargin}{\labelsep} \renewcommand{\makelabel}{\Descriptionlabel}% }% }% {\end{list}} \renewcommand*\descriptionlabel[1]{% \hspace\labelsep\normalfont$\bullet$ \texttt{#1}:} \begin{document} \DocInput{jrbib.dtx} \end{document} % % \fi % % \title{Das \textsf{jrbib} Paket v2.0d} % \author{Jochen R"utschlin} % \date{16.\ Dezember 1998} % \maketitle % % \thispagestyle{empty} % \enlargethispage{.5\baselineskip} % % \begin{abstract} % Zwei Gr"unde haben mich zum Schreiben dieses Pakets veranla"st. Der % eine war, da"s mir die Darstellung der Standard-\textsc{Bib}\TeX-Stile % im Flie"stext nicht gefallen hat (die nicht sonderlich aussagekr"aften % Zahlen in eckigen Klammern bzw.\ die zerst"uckelten Autorennamen). Der % andere Beweggrund war, da"s ich eine Basis f"ur ein mehrsprachiges % \textsc{Bib}\TeX-System schaffen wollte, bei dem die % sprachspezifischen Einstellungen nicht in der \texttt{.bst}-Datei % vollzogen werden, sondern innerhalb von \LaTeX\ (von wo sie auch % einfacher abge"andert und erweitert werden k"onnen). Als Grundlage f"ur % meine Arbeit habe ich das \textsf{chicago}-Paket verwendet, welches % meinen Vorstellungen schon sehr nahe kommt. % \end{abstract} % % \noindent\rule{\hsize}{.4pt} % % \begin{multicols}{2} % \Describe{usepackage\oarg{Optionen}\{jrbib\}} % Bisher werden folgende Optionen f"ur das Paket unterst"utzt % (unterstrichene Werte stellen die Voreinstellungen dar): % % \begin{Description}\itemsep 0pt % \item[\underbar{sort}] sortiert die Eintr"age im Literaturverzeichnis % nach Autor und Jahr. % \item[unsort] "ubernimmt die Eintr"age in der Reihenfolge in das % Literaturverzeichnis, in der sie im Text erscheinen. % \item[american] w"ahlt die Namensparameter f"ur die amerika"-ni"-sche % Sprache. % \item[\underbar{english}] w"ahlt die Namensparameter f"ur die englische % Sprache. % \item[german] w"ahlt die Namensparameter f"ur die deutsche Sprache. % \item[abstract] erzeugt zu jedem Literatureintrag eine kurze % Zusammenfassung (sofern angegeben). % \item[\underbar{noabstract}] unterdr"uckt die Ausgabe der % Zusammenfassung eines Literatureintrages. % \item[isbn] f"ugt bei Eintr"agen f"ur B"ucher die ISBN hinzu (sofern % vorhanden). % \item[\underbar{noisbn}] unterdr"uckt die Ausgabe der ISBN. % \item[site] f"ugt ggf.\ den Standort des Buches hinzu. % \item[\underbar{nosite}] unterdr"uckt die Ausgabe des Standortes. % \end{Description} % % \smallskip\noindent Mit den nun folgenden Makros kann innerhalb eines % Textes auf verschiedene Arten ein Literatureintrag referenziert werden. % Dabei steht \meta{Schl"ussel} f"ur den Referenzschl"ussel des % Literatureintrages (kann auch eine Liste von Schl"usseln sein, deren % Elemente durch Komma getrennt werden). Allgemein erzeugt die % um \texttt{np} erweiterte Form eines Befehls den gleichen Text wie der % Befehl ohne das Anh"angsel, % nur da"s die umschlie"senden Klammern weggelassen werden. Die % Kurzversionen (|\short|\ldots) der Befehle k"urzen die Namensliste % eines Titels mit mehr als zwei Namen durch das Anh"angsel % \glqq{}et~al.\grqq{} ab. % % % % \Describe{cite\marg{Schl"ussel}} % \DescribeMacro{\cite}% % Erzeugt die vollst"andige Angabe des/der Autor(en) und des Jahres zur % Verwendung im Text, z.\,B.\ \emph{Schneidermann (1978) erkl"art, da"s % \ldots} % % % % \Describe{citeAY\marg{Schl"ussel} \textmd{bzw.}\ \bslash{}citeAYnp\marg{Schl"ussel}} % \DescribeMacro{\citeAY}% % \DescribeMacro{\citeAYnp}% % Erzeugt die volle Angabe des/der Autor(en) und des Jahres, z.\,B.\ % \emph{(Brown 1978; Jarke, Turner und Stohl 1985)} bzw.\ das Ganze % ohne die umschlie"senden Klammern. % % % % \Describe{citeA\marg{Schl"ussel} \textmd{bzw.}\ \bslash{}citeAnp\marg{Schl"ussel}} % \DescribeMacro{\citeA}% % \DescribeMacro{\citeAnp}% % Erzeugt die vollst"andige Angabe des/der Autor(en) (ohne das Jahr) % z.\,B.\ \emph{(Brown; Jarke, Turner und Stohl)} bzw.\ das Ganze ohne % die umschlie"senden Klammern. % % % % \Describe{citeA\marg{Schl"ussel} \textmd{bzw.}\ \bslash{}citeYnp\marg{Schl"ussel}} % \DescribeMacro{\citeY}% % \DescribeMacro{\citeYnp}% % Erzeugt nur die Jahresangabe mit bzw.\ ohne Klammern. % % % % \Describe{shortcite\marg{Schl"ussel}} % \DescribeMacro{\shortcite}% % Erzeugt die abgek"urzte Angabe des/der Autor(en) und des Jahres zur % Verwendung im Text. % % % % \Describe{shortciteAY\marg{Schl"ussel} \textmd{bzw.}\ \bslash{}shortciteAYnp} % \DescribeMacro{\shortciteAY}% % \DescribeMacro{\shortciteAYnp}% % Erzeugt die abgek"urzte Angabe des/der Autor(en) und des Jahres mit % bzw.\ ohne Klammerung. % % % % \Describe{shortciteA\marg{Schl"ussel} \textmd{bzw.}\ \bslash{}shortciteAnp} % \DescribeMacro{\shortciteA}% % \DescribeMacro{\shortciteAnp}% % Erzeugt die abgek"urzte Angabe des/der Autor(en) (ohne Jahr) mit bzw.\ % ohne Klammerung. % % % % \bigskip\noindent Bisher werden folgende Klassifikationen von % Literatureintr"agen unterst"utzt (bei allen Typen sind die Felder % \texttt{key}, \texttt{site}, \texttt{note} und \texttt{abstract} % optional verf"ugbar, sofern sie nicht zwingende erforderlich sind): % % \begin{Description}\itemsep 0pt\parsep 0pt % \item[article] ein Artikel aus einem wissenschaftlichen Journal oder % einer Zeitschrift.\\ % \emph{zwingend:} % \texttt{author}, % \texttt{title}, % \texttt{journal}, % \texttt{year}\\ % \emph{optional:} % \texttt{volume}, % \texttt{number} % \texttt{pages}, % \texttt{month} % % % \item[book] ein Buch, in dem expilzit der Verlag angegeben wird.\\ % \emph{zwingend:} % \texttt{author} oder \texttt{editor}, % \texttt{title}, % \texttt{publisher}, % \texttt{year}\\ % \emph{optional:} % \texttt{volume} oder \texttt{number}, % \texttt{series}, % \texttt{address}, % \texttt{edition}, % \texttt{isbn}, % \texttt{month} % % % \item[booklet] ein gedrucktes und gebundenes Werk, aber ohne Angabe % eines Verlages oder einer finanzierenden Institution.\\ % \emph{zwingend:} % \texttt{author}, % \texttt{title}, % \texttt{year}\\ % \emph{optional:} % \texttt{howpublished}, % \texttt{address}, % \texttt{month} % % % \item[conference] (siehe \texttt{inproceedings}) % % % \item[inbook] Teil eines Buches (z.\,B.\ Kapitel, Abschnitt oder % "ahnliches) und/oder ein Seitenbereich.\\ % \emph{zwingend:} % \texttt{author} oder \texttt{editor}, % \texttt{title}, % \texttt{chapter} und/oder \texttt{pages}, % \texttt{publisher}, % \texttt{year}\\ % \emph{optional:} % \texttt{volume} oder \texttt{number}, % \texttt{series}, % \texttt{type}, % \texttt{address}, % \texttt{edition}, % \texttt{month}, % \texttt{isbn} % % % \item[incollection] Ein Teil eines Buches mit eigenem Titel.\\ % \emph{zwingend:} % \texttt{author}, % \texttt{title}, % \texttt{booktitle}, % \texttt{pub"-lisher}, % \texttt{year}\\ % \emph{optional:} % \texttt{editor}, % \texttt{volume} oder \texttt{number}, % \texttt{series}, % \texttt{type}, % \texttt{chapter}, % \texttt{pages}, % \texttt{address}, % \texttt{edition}, % \texttt{month}, % \texttt{isbn} % % % \item[inproceedings] ein Artikel in einem Konferenzband.\\ % \emph{zwingend:} % \texttt{author}, % \texttt{title}, % \texttt{booktitle}, % \texttt{year}\\ % \emph{optional:} % \texttt{editor}, % \texttt{volume} oder \texttt{number}, % \texttt{pages}, % \texttt{series}, % \texttt{address}, % \texttt{month}, % \texttt{or"-gan"-i"-za"-tion}, % \texttt{publisher} % % % \item[internet] ein HTML-Dokument aus dem Internet.\\ % \emph{zwingend:} % \texttt{author} o.\ \texttt{organization}, % \texttt{title}, % \texttt{year}, % \texttt{site}\\ % \emph{optional:} % \texttt{month}, % \texttt{organization} % % % \item[manual] technische Dokumentation\\ % \emph{zwingend:} % \texttt{author} oder \texttt{editor} order \texttt{or"-gan"-i"-za"-tion}, % \texttt{title}, % \texttt{year}\\ % \emph{optional:} % \texttt{address}, % \texttt{edition}, % \texttt{month}, % \texttt{or"-gan"-i"-za"-tion} % % % \item[mastersthesis] Diplomarbeit\\ % \emph{zwingend:} % \texttt{author}, % \texttt{title}, % \texttt{school}, % \texttt{year}\\ % \emph{optional:} % \texttt{type}, % \texttt{month}, % \texttt{address} % % % \item[misc] dieser Eintragstyp kann verwendet werden, wenn kein anderer % pa"st. Eine Warnung wird nur ausgegeben, wenn alle optionalen Felder % leer sind.\\ % \emph{zwingend:} keine.\\ % \emph{optional:} % \texttt{author}, % \texttt{title}, % \texttt{howpublished}, % \texttt{month}, % \texttt{year} % % % \item[phdthesis] Doktorarbeit\\ % (siehe \texttt{mastersthesis}) % % % \item[proceedings] Konferenzbericht\\ % \emph{zwingend:} % \texttt{title}, % \texttt{year}\\ % \emph{optional:} % \texttt{editor}, % \texttt{volume} oder \texttt{number}, % \texttt{series}, % \texttt{pages}, % \texttt{address}, % \texttt{publisher}, % \texttt{month}, % \texttt{organization} % % % \item[scriptum] Skript, Seminar, Praktikum\\ % \emph{zwingend:} % \texttt{author}, % \texttt{title}, % \texttt{school}, % \texttt{year}\\ % \emph{optional:} % \texttt{type}, % \texttt{term}, % \texttt{month}, % \texttt{address} % % % \item[techreport] ein Bericht, ver"offentlicht von einer Hochschule % oder einer anderen Institution; normalerweise eine numerierte Ausgabe % in einer Reihe.\\ % \emph{zwingend:} % \texttt{author}, % \texttt{title}, % \texttt{institution}, % \texttt{year}\\ % \emph{optional:} % \texttt{type}, % \texttt{number}, % \texttt{address}, % \texttt{month} % % % \item[unpublished] ein Dokument, das Autor und Titel hat, aber nicht % ver"offentlicht wurde.\\ % \emph{zwingend:} % \texttt{author}, % \texttt{title}, % \texttt{year}, % \texttt{note}\\ % \emph{optional:} % \texttt{month} % \end{Description} % \end{multicols} % \StopEventually{\Finale} % % \iffalse %<*package> % \fi % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{jrbib} [1998/12/16 v2.0d my special bibtex package (jr)] % \end{macrocode} % % \begin{macrocode} \def\jrbib@addto#1#2{% \ifx#1\@undefined \def#1{#2} \else \ifx#1\relax \def#1{#2} \else {\toks@\expandafter{#1#2}% \xdef#1{\the\toks@}}% \fi \fi } % \end{macrocode} % % \begin{macrocode} \DeclareOption{american}{% \PassOptionsToPackage{american}{babel} \jrbib@addto\extrasamerican{% \def\andname{and} % und \def\beforeand{,} % und in Aufzaehlung > 2 \def\editorsname{Editors.} % Herausgeber (plur.) \def\editorname{Editor} % Herausgeber \def\inname{in} % in der Zeitschrift \def\volumename{volume} % Band \def\numbername{number} % Nummer \def\outofname{of} % aus der Serie \def\editionname{ed.} % Auflage \def\pagesname{pp.} % Seite \def\mastersthesisname{Master's thesis} % Diplomarbeit \def\phdthesisname{Ph.\ D. thesis} % Doktorarbeit \def\scriptumname{Scriptum} % Skript \def\technicalreportname{Technical Report} % Technischer Bericht % \def\january{January} \def\february{February} \def\march{March} \def\april{April} \def\may{Mai} \def\june{June} \def\july{July} \def\august{August} \def\september{September} \def\october{October} \def\november{November} \def\december{December} }} \DeclareOption{english}{% \PassOptionsToPackage{english}{babel} \jrbib@addto\extrasenglish{% \def\andname{and} \def\beforeand{,} \def\editorsname{Editors.} \def\editorname{Editor} \def\inname{in} \def\volumename{volume} \def\numbername{number} \def\outofname{of} \def\editionname{ed.} \def\pagesname{pp.} \def\mastersthesisname{Master's thesis} \def\phdthesisname{Ph.\ D. thesis} \def\scriptumname{Scriptum} \def\technicalreportname{Technical Report} % \def\january{January} \def\february{February} \def\march{March} \def\april{April} \def\may{Mai} \def\june{June} \def\july{July} \def\august{August} \def\september{September} \def\october{October} \def\november{November} \def\december{December} }} \DeclareOption{german}{% \PassOptionsToPackage{german}{babel} \jrbib@addto\extrasgerman{% \def\andname{und} \def\beforeand{} \def\editorsname{Hrsg.} \def\editorname{Hrsg.} \def\inname{in} \def\volumename{Band} \def\numbername{Nummer} \def\outofname{aus} \def\editionname{Auf\/lage} \def\pagesname{Seiten} \def\mastersthesisname{Diplomarbeit} \def\phdthesisname{Doktorarbeit} \def\scriptumname{Vorlesungsskript} \def\technicalreportname{Technischer Bericht} % \def\january{Januar} \def\february{Februar} \def\march{M\"arz} \def\april{April} \def\may{Mai} \def\june{Juni} \def\july{Juli} \def\august{August} \def\september{September} \def\october{Oktober} \def\november{November} \def\december{Dezember} }} \DeclareOption{germanb}{% \typeout{Please use `german' instead of `germanb'}% \ExecuteOptions{german}} % % \begin{macrocode} \newif\if@abstract \newif\if@isbn \newif\if@site \DeclareOption{abstract}{\@abstracttrue} \DeclareOption{noabstract}{\@abstractfalse} \DeclareOption{isbn}{\@isbntrue} \DeclareOption{noisbn}{\@isbnfalse} \DeclareOption{site}{\@sitetrue} \DeclareOption{nosite}{\@sitefalse} \DeclareOption{sort}{\def\bibstyle@file{jrplain}} \DeclareOption{unsort}{\def\bibstyle@file{jrunsrt}} % \end{macrocode} \ExecuteOptions{english,sort,noisbn,noabstract,nosite} \ProcessOptions* \bibliographystyle{\bibstyle@file} \RequirePackage{babel} % \end{macrocode} % % \begin{macro}{\abstractfield} % \begin{macrocode} \newcommand{\abstractfield}[1]{% \if@abstract\begin{trivlist}\item\small #1\end{trivlist}\fi} % \end{macrocode} % \end{macro} % % \begin{macro}{\isbn} % \begin{macrocode} \newcommand{\isbn}[1]{% \if@isbn ISBN #1\fi} % \end{macrocode} % \end{macro} % % \begin{macro}{\note} % \begin{macrocode} \newcommand{\note}[1]{\par#1} % \end{macrocode} % \end{macro} % % \begin{macro}{\Site} % \begin{macrocode} \newcommand{\site}[1]{\if@site\\#1\fi} % \end{macrocode} % \end{macro} % % \begin{macro}{\cite} % \begin{macrocode} \let\@internalcite\cite % \end{macrocode} % \end{macro} % % \begin{macro}{\cite} % \begin{macrocode} \def\cite{% \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}% \def\citeauthoryear##1##2##3{##1 (##3}\@citedata} % \end{macrocode} % \end{macro} % % \begin{macro}{\citeAY} % \begin{macrocode} \def\citeAY{% \def\@cite##1##2{(##1\if@tempswa ; ##2\fi)}% \def\citeauthoryear##1##2##3{##1, ##3}\@internalcite} \def\citeAYnp{% \def\@cite##1##2{##1\if@tempswa , ##2\fi}% \def\citeauthoryear##1##2##3{##1, ##3}\@internalcite} % \end{macrocode} % \end{macro} % % \begin{macro}{\citeA} % \begin{macrocode} \def\citeA{% \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% \def\citeauthoryear##1##2##3{##1}\@internalcite} \def\citeAnp{% \def\@cite##1##2{##1\if@tempswa , ##2\fi}% \def\citeauthoryear##1##2##3{##1}\@internalcite} % \end{macrocode} % \end{macro} % % \begin{macro}{\citeY} % \begin{macrocode} \def\citeY{% \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% \def\citeauthoryear##1##2##3{##3}\@citedata} \def\citeYnp{% \def\@cite##1##2{##1\if@tempswa , ##2\fi}% \def\citeauthoryear##1##2##3{##3}\@citedata} % \end{macrocode} % \end{macro} % % \begin{macro}{\shortcite} % \begin{macrocode} \def\shortcite{% \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}% \def\citeauthoryear##1##2##3{##2 (##3}\@citedata} % \end{macrocode} % \end{macro} % % \begin{macro}{\shortciteAY} % \begin{macrocode} \def\shortciteAY{% \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% \def\citeauthoryear##1##2##3{##2, ##3}\@internalcite} \def\shortciteAYnp{% \def\@cite##1##2{##1\if@tempswa , ##2\fi}% \def\citeauthoryear##1##2##3{##2, ##3}\@internalcite} % \end{macrocode} % \end{macro} % % \begin{macro}{\citeA} % \begin{macrocode} \def\shortciteA{% \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% \def\citeauthoryear##1##2##3{##2}\@internalcite} \def\shortciteAnp{% \def\@cite##1##2{##1\if@tempswa , ##2\fi}% \def\citeauthoryear##1##2##3{##2}\@internalcite} % \end{macrocode} % \end{macro} % % Place commas in-between citations in the same |\citeY|, |\citeYnp|, % |\cite|, or |\shortcite| command. % Use something like |\citeN|\marg{ref1,ref2,ref3} and |\cite|\marg{ref4} % for a list. % \begin{macrocode} \def\@citedata{% \@ifnextchar [{\@tempswatrue\@citedatax}% {\@tempswafalse\@citedatax[]}} \def\@citedatax[#1]#2{% \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi% \def\@citea{}% \@cite{\@for\@citeb:=#2\do% {\@citea\def\@citea{, }\@ifundefined% {b@\@citeb}{\textbf{?}% \@warning{Citation `\@citeb' on page \thepage \space undefined}}% {\csname b@\@citeb\endcsname}}}{#1}}% % \end{macrocode} % % don't box citations, separate with ; and a space % also, make the penalty between citations negative: a good place to break. % \begin{macrocode} \def\@citex[#1]#2{% \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi% \def\@citea{}% \@cite{\@for\@citeb:=#2\do% {\@citea\def\@citea{; }\@ifundefined% by Young {b@\@citeb}{\textbf{?}% \@warning{Citation `\@citeb' on page \thepage \space undefined}}% {\csname b@\@citeb\endcsname}}}{#1}}% % \end{macrocode} % % (from apalike.sty) % No labels in the bibliography. % \begin{macrocode} \def\@biblabel#1{} % \end{macrocode} % % (from apalike.sty) % Set length of hanging indentation for bibliography entries. % \begin{macrocode} \newlength{\bibhang} \setlength{\bibhang}{2em} % \end{macrocode} % % Indent second and subsequent lines of bibliographic entries. Stolen % from openbib.sty: \newblock is set to {}. % \begin{macrocode} \newdimen\bibindent \bibindent=1.5em \@ifundefined{chapter}% {\def\thebibliography#1{% \section*{\refname\@mkboth{\refname}% {\refname}}% \list{}{% \leftmargin \bibindent \itemindent -\bibindent \labelwidth \z@ \labelsep \z@ \parsep \z@} \def\newblock{} \sloppy \sfcode`\.=1000\relax}} {\def\thebibliography#1{% \chapter*{\bibname\@mkboth{\bibname}% {\bibname}}% \list{}{% \leftmargin \bibindent \itemindent -\bibindent \labelwidth \z@ \labelsep \z@ \parsep \z@} \def\newblock{} \sloppy \sfcode`\.=1000\relax}} % \end{macrocode} % \iffalse % %<*base> % \fi % % ENTRY{ Feld-Liste }{ Zahl-Variablen-Liste }{ String-Variablen-Liste } % % \begin{macrocode} ENTRY { abstract % jr spezial address author booktitle chapter edition editor howpublished institution isbn % jr spezial journal key month note number organization pages publisher school series site % jr spezial term % jr spezial title type volume year } {} { label.year extra.label sort.year sort.label } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% VARIABLEN %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Deklaration der globalen Variablen vom Typ Integer. % % \begin{macrocode} INTEGERS { output.state before.all mid.sentence after.sentence after.block } % \end{macrocode} % % Initialisierung der Status-Variablen % % \begin{macrocode} FUNCTION {init.state.consts} { #0 'before.all := #1 'mid.sentence := #2 'after.sentence := #3 'after.block := } % \end{macrocode} % % Fuer die Namensbearbeitung in: % format.label.names % format.label.full.names % format.names % format.names.fml % sort.format.names % % \begin{macrocode} INTEGERS { nameptr namesleft numnames } % \end{macrocode} % % Fuer die Funktion "chop.word": % % \begin{macrocode} INTEGERS { len } % \end{macrocode} % % Fuer die Funktion "initialize.extra.label.stuff" und "forward.pass": % % \begin{macrocode} INTEGERS { last.extra.num } % \end{macrocode} % % Deklarartion der globalen Variablen vom Typ String. % % Allgemeine Zeichenketten: % % \begin{macrocode} STRINGS { s t seperator } % \end{macrocode} % % Fuer die Funktion "multi.page.check": % % \begin{macrocode} INTEGERS { multiresult } % \end{macrocode} % % Fuer die Funktionen "initialize.extra.label.stuff" und "forward.pass": % % \begin{macrocode} STRINGS { last.label } % \end{macrocode} % % Fuer die Funktionen "initialize.extra.label.stuff" und "reverse.pass': % % \begin{macrocode} STRINGS { next.extra } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% HILFSFUNKTIONEN %% % %% not and or %% % %% field.or.null %% % %% emphasize %% % %% n.dashify %% % %% tie.or.space.connect %% % %% either.or.check %% % %% multi.page.check %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {not} { { #0 } { #1 } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {and} { 'skip$ { pop$ #0 } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {or} { { pop$ #1 } 'skip$ if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {field.or.null} { duplicate$ empty$ { pop$ "" } 'skip$ if$ } % \end{macrocode} % % Hervorheben des Strings auf dem Stack % % \begin{macrocode} FUNCTION {emphasize} { duplicate$ empty$ { pop$ "" } { "\emph{" swap$ * "}" * } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {n.dashify} { 't := "" { t empty$ not } { t #1 #1 substring$ "-" = { t #1 #2 substring$ "--" = not { "--" * t #2 global.max$ substring$ 't := } { { t #1 #1 substring$ "-" = } { "-" * t #2 global.max$ substring$ 't := } while$ } if$ } { t #1 #1 substring$ * t #2 global.max$ substring$ 't := } if$ } while$ } % \end{macrocode} % % Verbindet zwei auf dem Stack liegende Strings mit einem "~", falls die % Laenge vom oberen kleiner als 3 ist (ansonsten mit " ". % % \begin{macrocode} FUNCTION {tie.or.space.connect} { duplicate$ text.length$ #3 < { "~" } { " " } if$ swap$ * * } % \end{macrocode} % % \begin{macrocode} FUNCTION {either.or.check} { empty$ 'pop$ { "can't use both " swap$ * " fields in " * cite$ * warning$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {multi.page.check} { 't := #0 'multiresult := { multiresult not t empty$ not and } { t #1 #1 substring$ duplicate$ "-" = swap$ duplicate$ "," = swap$ "+" = or or { #1 'multiresult := } { t #2 global.max$ substring$ 't := } if$ } while$ multiresult } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% LABELS %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format.label.names: % % determines "short" names for the abbreviated author information. % "Long" labels are created in calc.label, using the routine format.label.full.names % to format author and editor fields. % % There are 4 cases for labels. (n=3 in the example) % a) one author Foo % b) one to n Foo, Bar and Baz % c) use of "and others" Foo, Bar et al. % d) more than n Foo et al. % \begin{macrocode} FUNCTION {format.label.names} { 's := s num.names$ 'numnames := numnames #2 > % change number to number of others allowed before % forcing "et al". { s #1 "{vv~}{ll}" format.name$ " et~al." * } { numnames #1 - 'namesleft := #2 'nameptr := s #1 "{vv~}{ll}" format.name$ { namesleft #0 > } { nameptr numnames = { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" = { " et~al." * } { " \andname\ " * s nameptr "{vv~}{ll}" format.name$ * } if$ } { ", " * s nameptr "{vv~}{ll}" format.name$ * } if$ nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := } while$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.label.full.names} { 's := #1 'nameptr := % nameptr = 1; s num.names$ 'numnames := % numnames = num.name$(s); numnames 'namesleft := { namesleft #0 > } { s nameptr "{vv~}{ll}" format.name$ 't := nameptr #1 > { namesleft #1 > { ", " * t * } { numnames #2 > { "\beforeand{}" * } 'skip$ if$ t "others" = { " et~al." * } { " \andname\ " * t * } if$ } if$ } 't if$ nameptr #1 + 'nameptr := % nameptr += 1; namesleft #1 - 'namesleft := % namesleft =- 1; } while$ } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% LABELS: key...label %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {key.author.label} { key empty$ { author empty$ { "no key or author in " cite$ * warning$ cite$ #1 #3 substring$ "\textbf{??}" } { author format.label.names author format.label.full.names } if$ } { key duplicate$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {key.author.editor.label} { key empty$ { author empty$ { editor empty$ { "no key, author, or editor in " cite$ * warning$ cite$ #1 #3 substring$ "\textbf{??}" } { editor format.label.names editor format.label.full.names } if$ } { author format.label.names author format.label.full.names } if$ } { key duplicate$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {key.author.organization.label} { key empty$ { author empty$ { organization empty$ { "no key, author or organizatione in " cite$ * warning$ cite$ #1 #3 substring$ "\textbf{??}" } { organization duplicate$ } if$ } { author format.label.names author format.label.full.names } if$ } { key duplicate$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {key.editor.organization.label} { key empty$ { editor empty$ { organization empty$ { "no key, editor or organization in " cite$ * warning$ cite$ #1 #3 substring$ "\textbf{??}" } { organization duplicate$ } if$ } { editor format.label.names editor format.label.full.names } if$ } { key duplicate$ } if$ } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% LABELS: calc.label %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {calc.label} { type$ "book" = type$ "inbook" = or 'key.author.editor.label { type$ "proceedings" = 'key.editor.organization.label { type$ "internet" = type$ "manual" = or 'key.author.organization.label 'key.author.label if$ } if$ } if$ "}{" * swap$ * "}{" * year field.or.null purify$ #-1 #4 substring$ 'label.year := } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% output... %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {output.bibitem} { newline$ "\bibitem[\protect\citeauthoryear{" calc.label * sort.year * "}]{" * cite$ * "}" * write$ newline$ "" before.all 'output.state := } % \end{macrocode} % %FUNCTION {output.year.check} %{ year empty$ % { "empty year in " cite$ * warning$ } % { write$ % " (" year * extra.label * % month empty$ % { ")" * } % { ", " * month * ")" * } % if$ % mid.sentence 'output.state := % } % if$ %} % % \begin{macrocode} FUNCTION {output.year.check} { year empty$ { "empty year in " cite$ * warning$ } { write$ " (" month empty$ 'skip$ { month * "\ " * } if$ year * extra.label * ")" * mid.sentence 'output.state := } if$ } % \end{macrocode} % %FUNCTION {output.nonnull} %{ 's := % output.state mid.sentence = % { ", " * write$ } % { output.state after.block = % { add.period$ write$ % newline$ % "\newblock " write$ % } % { output.state before.all = % 'write$ % { add.period$ " " * write$ } % if$ % } % if$ % mid.sentence 'output.state := % } % if$ % s %} % % \begin{macrocode} FUNCTION {output.nonnull} { 't := % Seperator sichern 's := % formatierte Ausgabe sichern output.state mid.sentence = { t * write$ } { output.state after.block = { add.period$ write$ newline$ "\newblock " write$ } { output.state before.all = 'write$ { add.period$ " " * write$ } % output.state == after.sentence if$ } if$ mid.sentence 'output.state := } if$ s } % \end{macrocode} % % \begin{macrocode} FUNCTION {output} { duplicate$ empty$ 'pop$ { ", " output.nonnull } if$ } % % \begin{macrocode} FUNCTION {output.colon} { duplicate$ empty$ 'pop$ { ": " output.nonnull } if$ } % % \begin{macrocode} FUNCTION {output.triangle} { duplicate$ empty$ 'pop$ { " \raise .25ex\hbox{$\triangleright$} " output.nonnull } if$ } % % \begin{macrocode} FUNCTION {output.check} { 's := % Leeres-Feld-Bezeichner sichern duplicate$ empty$ { pop$ "empty " s * " in " * cite$ * warning$ } { ", " output.nonnull } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {output.check.colon} { 's := % Leeres-Feld-Bezeichner sichern duplicate$ empty$ { pop$ "empty " s * " in " * cite$ * warning$ } { ": " output.nonnull } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {output.check.triangle} { 's := % Leeres-Feld-Bezeichner sichern duplicate$ empty$ { pop$ "empty " s * " in " * cite$ * warning$ } { " \raise .25ex\hbox{$\triangleright$} " output.nonnull } if$ } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% new.block %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {new.block} { output.state before.all = 'skip$ { after.block 'output.state := } if$ } % \end{macrocode} % % \begin{macrocode} %FUNCTION {new.block.checka} %{ empty$ % 'skip$ % 'new.block % if$ %} % \end{macrocode} % % \begin{macrocode} FUNCTION {new.block.checkb} { empty$ swap$ empty$ and 'skip$ 'new.block if$ } % \end{macrocode} % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% new.sentence %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {new.sentence} { output.state after.block = 'skip$ { output.state before.all = 'skip$ { after.sentence 'output.state := } if$ } if$ } % \end{macrocode} % % \begin{macrocode} %FUNCTION {new.sentence.checka} %{ empty$ % 'skip$ % 'new.sentence % if$ %} % \end{macrocode} % % \begin{macrocode} %FUNCTION {new.sentence.checkb} %{ empty$ % swap$ empty$ % and % 'skip$ % 'new.sentence % if$ %} % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% format... %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % %FUNCTION {format.key} %{ empty$ % { key field.or.null } % { "" } % if$ %} % \begin{macrocode} FUNCTION {format.key} { key empty$ { "" } { key author empty$ organization empty$ and not { " \raise .25ex\hbox{$\triangleright$} " } { "" } if$ 'seperator := } if$ } % \end{macrocode} % % Format bibliographical entries with the first author last name first, % and subsequent authors with initials followed by last name. % All names are formatted in this routine. % % \begin{macrocode} FUNCTION {format.names} { 's := #1 'nameptr := % nameptr = 1; s num.names$ 'numnames := % numnames = num.name$(s); numnames 'namesleft := { namesleft #0 > } { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := nameptr #1 > { namesleft #1 > { ", " * t * } { numnames #2 > { "\beforeand{}" * } 'skip$ if$ t "others" = { " et~al." * } { " \andname\ " * t * } if$ } if$ } 't if$ nameptr #1 + 'nameptr := % nameptr += 1; namesleft #1 - 'namesleft := % namesleft =- 1; } while$ } % \end{macrocode} % % Format names in "familiar" format, with first initial followed by % last name. Like format.names, ALL names are formatted. % % \begin{macrocode} FUNCTION {format.names.fml} { 's := #1 'nameptr := % nameptr = 1; s num.names$ 'numnames := % numnames = num.name$(s); numnames 'namesleft := { namesleft #0 > } { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := nameptr #1 > { namesleft #1 > { ", " * t * } { numnames #2 > { "," * } 'skip$ if$ t "others" = { " et~al." * } { " \andname\ " * t * } if$ } if$ } 't if$ nameptr #1 + 'nameptr := % nameptr += 1; namesleft #1 - 'namesleft := % namesleft =- 1; } while$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.authors} { author empty$ { "" } { author format.names } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.editors} { editor empty$ { "" } { editor format.names editor num.names$ #1 > { ", \editorsname{}" * } { ", \editorname{}" * } if$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.editors.fml} { editor empty$ { "" } { editor format.names.fml editor num.names$ #1 > { " (\editorsname)" * } { " (\editorname)" * } if$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.title} { title empty$ { "" } { title } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.btitle} { edition empty$ { title emphasize } { title empty$ { title emphasize } { volume empty$ { "\emph{" title * "} (" * edition * " \editionname)." * } { "\emph{" title * "} (" * edition * " \editionname)" * } if$ } if$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.emphasize.booktitle} { edition empty$ { booktitle emphasize } { booktitle empty$ { booktitle emphasize } { volume empty$ % gnp - extra period an error if book has a volume { "\emph{" booktitle * "} (" * edition * " \editionname)" * "." *} { "\emph{" booktitle * "} (" * edition * " \editionname)" * } if$ } if$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.bvolume} { volume empty$ { "" } { "\volumename{}" volume tie.or.space.connect series empty$ 'skip$ { " \outofname\ " * series emphasize * } if$ "volume and number" number either.or.check } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.number.series} { volume empty$ { number empty$ { series field.or.null } { output.state mid.sentence = { "\numbername{}" } { "\numbername{}" } if$ number tie.or.space.connect series empty$ { "there's a number but no series in " cite$ * warning$ } { " \inname\ " * series * } if$ } if$ } { "" } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.pages} { pages empty$ { "" } { pages multi.page.check { "\pagesname\ " pages n.dashify tie.or.space.connect } { "\pagesname\ " pages tie.or.space.connect } if$ } if$ } % \end{macrocode} % % Format journal, volume, number, pages for article types. % % \begin{macrocode} FUNCTION {format.jour.vol} { journal empty$ { "no journal in " cite$ * warning$ "" } { journal } if$ number empty$ { volume empty$ { "no number and no volume in " cite$ * warning$ "" * } { "~" * Volume * } if$ } { volume empty$ {"no volume for " cite$ * warning$ "~(" * number * ")" * } { "~" * volume "(" * number * ")" * * } if$ } if$ pages empty$ {"page numbers missing in " cite$ * warning$ "" * } % gnp - place a null string on the stack for output { duplicate$ empty$ { pop$ format.pages } { ", " * pages n.dashify * } % gnp - removed pp. for articles if$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.chapter.pages} { chapter empty$ 'format.pages { type empty$ { "\chaptername{}" } % gnp - changed to mixed case { type "t" change.case$ } if$ chapter tie.or.space.connect pages empty$ {"page numbers missing in " cite$ * warning$} % gnp - added check { ", " * format.pages * } if$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.in.ed.booktitle} { booktitle empty$ { "" } { editor empty$ { "\expandafter\MakeUppercase \inname\ " format.emphasize.booktitle * } { "\expandafter\MakeUppercase \inname:\ " format.editors.fml * ", " * format.emphasize.booktitle * } if$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.tr.number} { type empty$ { "\technicalreportname{}" } 'type if$ number empty$ { "t" change.case$ } { number tie.or.space.connect } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.isbn} { isbn empty$ { "" } { "\isbn{" isbn * add.period$ "}" * } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.site} { site empty$ { "" } { type$ "internet" = { " [Internet, WWW] \texttt{" site * "}" * } { new.block "\site{" site * add.period$ "}" * } if$ } if$ } % \end{macrocode} % % %FUNCTION {format.thesis.type} %{ type empty$ % 'skip$ % { pop$ % type "t" change.case$ % } % if$ %} % % \begin{macrocode} FUNCTION {format.thesis.type} { type empty$ { "\expandafter" type$ "scriptum" = { "\scriptumname{}" } { type$ "mastersthesis" = { "\mastersthesisname{}" } { "\phdthesisname{}" } if$ } if$ * } { type } if$ type$ "scriptum" = { term empty$ 'skip$ { " " * term * } if$ } 'skip$ if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.article.crossref} { "\expandafter\MakeUppercase \seename{}" "\cite{" * crossref * "}" * } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.crossref.editor} { editor #1 "{vv~}{ll}" format.name$ editor num.names$ duplicate$ #2 > { pop$ " et~al." * } { #2 < 'skip$ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = { " et~al." * } { " \andname\ " * editor #2 "{vv~}{ll}" format.name$ * } if$ } if$ } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.book.crossref} { volume empty$ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ "\expandafter\MakeUppercase \inname\ " } { "\volumename{}" volume tie.or.space.connect " \outofname\ " * } if$ editor empty$ editor field.or.null author field.or.null = or { key empty$ { series empty$ { "need editor, key, or series for " cite$ * " to crossref " * crossref * warning$ "" * } { "\emph{" * series * "}" * } if$ } { key * } if$ } { format.crossref.editor * } if$ " \cite{" * crossref * "}" * } % \end{macrocode} % % \begin{macrocode} FUNCTION {format.incoll.inproc.crossref} { "\expandafter\MakeUppercase \seename{}" " \cite{" * crossref * "}" * } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% fin.entry, final.entry %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {fin.entry} { note empty$ 'skip$ { new.block newline$ "\note{" note add.period$ * "}" * output } if$ abstract empty$ 'skip$ { new.block newline$ "\abstractfield{" abstract add.period$ * "}" * output } if$ add.period$ write$ newline$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {final.entry} { format.site output fin.entry } % \end{macrocode} % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% EINTRAGSTYPEN %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {article} { output.bibitem key output format.authors "author" output.check.triangle output.year.check new.block format.title "title" output.check new.block crossref missing$ { format.jour.vol output } { format.article.crossref "" output.nonnull format.pages output } if$ final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {book} { output.bibitem key output author empty$ { format.editors "author and editor" output.check.triangle } { format.authors output.triangle crossref missing$ { "author and editor" editor either.or.check } 'skip$ if$ } if$ output.year.check new.block format.btitle "title" output.check crossref missing$ { format.bvolume output new.block format.number.series output new.sentence address output publisher "publisher" output.check.colon new.block format.isbn output } { new.block format.book.crossref "" output.nonnull } if$ final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {booklet} { output.bibitem key output format.authors output.triangle output.year.check new.block format.title "title" output.check new.block howpublished output address output final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {inbook} { output.bibitem key output author empty$ { format.editors "author and editor" output.check.triangle } { format.authors output.triangle crossref missing$ { "author and editor" editor either.or.check } 'skip$ if$ } if$ output.year.check new.block format.btitle "title" output.check crossref missing$ { format.bvolume output format.chapter.pages "chapter and pages" output.check new.block format.number.series output new.sentence address output publisher "publisher" output.check.colon new.block format.isbn output } { format.chapter.pages "chapter and pages" output.check new.block format.book.crossref "" output.nonnull } if$ final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {incollection} { output.bibitem key output format.authors "author" output.check.triangle output.year.check new.block format.title "title" output.check new.block crossref missing$ { format.in.ed.booktitle "booktitle" output.check format.bvolume output format.number.series output format.chapter.pages output new.sentence address output publisher "publisher" output.check.colon new.block format.isbn output } { format.incoll.inproc.crossref "" output.nonnull format.chapter.pages output } if$ final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {inproceedings} { output.bibitem key output format.authors "author" output.check.triangle output.year.check new.block format.title "title" output.check new.block crossref missing$ { format.in.ed.booktitle "booktitle" output.check new.sentence format.bvolume output format.number.series output format.pages output new.sentence organization output address output publisher output.colon new.block format.isbn output } { format.incoll.inproc.crossref "" output.nonnull format.pages output } if$ final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {conference} { inproceedings } % \end{macrocode} % % \begin{macrocode} FUNCTION {internet} { output.bibitem key output author empty$ { organization output.triangle } { format.authors output.triangle } if$ output.year.check new.block format.title emphasize "title" output.check author empty$ % falls der Autor leer war, wurde ggf. die organization empty$ % Organisation bereits oben ausgegeben, d.h. or % hier erfolgt die Ausgabe der Organisation 'skip$ % nur, wenn ein Autor vorhanden ist und die { new.block % Organisation nicht leer ist. organization output } if$ new.block format.site "site" output.check fin.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {manual} { output.bibitem key output author empty$ { editor empty$ { organization "key, author, editor and organization" output.check.triangle } { format.editors output.triangle } if$ } { format.authors output.triangle } if$ output.year.check new.block format.btitle "title" output.check organization address new.block.checkb address output author empty$ editor empty$ and organization empty$ or 'skip$ { organization "organization" output.check.colon } if$ final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {mastersthesis} { output.bibitem key output format.authors "author" output.check.triangle output.year.check new.block format.title emphasize "title" output.check new.block format.thesis.type output new.block address output school "school" output.check.colon final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {misc} { output.bibitem key output format.authors output.triangle output.year.check title howpublished new.block.checkb format.title output new.block howpublished output final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {phdthesis} { mastersthesis } % \end{macrocode} % % \begin{macrocode} FUNCTION {proceedings} { output.bibitem key output editor empty$ { organization output.triangle } { format.editors output.triangle } if$ output.year.check new.block format.btitle "title" output.check new.sentence format.bvolume output format.number.series output new.sentence editor empty$ organization empty$ or 'skip$ { new.block organization output } if$ address output publisher output.colon new.block format.isbn output final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {scriptum} { mastersthesis } % \end{macrocode} % % \begin{macrocode} FUNCTION {techreport} { output.bibitem key output format.authors "author" output.check.triangle output.year.check new.block format.title "title" output.check new.block format.tr.number "" output.nonnull institution "institution" output.check address output final.entry } % \end{macrocode} % % \begin{macrocode} FUNCTION {unpublished} { output.bibitem key output format.authors "author" output.check.triangle output.year.check new.block format.title "title" output.check format.site output % final.entry % hier Makroexpansion und entsprechendee Anpassung note empty$ { "note missing in " cite$ * warning$ } { new.block newline$ "\note{" note add.period$ * "}" * output } if$ abstract empty$ 'skip$ { new.block newline$ "\abstractfield{" abstract add.period$ * "}" * output } if$ add.period$ write$ newline$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {default.type} { misc } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% MACROS %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} MACRO {jan} {"\january"} MACRO {feb} {"\february"} MACRO {mar} {"\march"} MACRO {apr} {"\april"} MACRO {may} {"\may"} MACRO {jun} {"\june"} MACRO {jul} {"\july"} MACRO {aug} {"\august"} MACRO {sep} {"\september"} MACRO {oct} {"\october"} MACRO {nov} {"\november"} MACRO {dec} {"\december"} % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% SORTIERUNG %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% SORTIERUNG: Hilfsfunktionen %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {sortify} { purify$ "l" change.case$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {chop.word} { 's := 'len := s #1 len substring$ = { s len #1 + global.max$ substring$ } 's if$ } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% SORTIERUNG: sort.format... %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {sort.format.names} { 's := #1 'nameptr := "" s num.names$ 'numnames := numnames 'namesleft := { namesleft #0 > } { nameptr #1 > { " " * } 'skip$ if$ s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := nameptr numnames = t "others" = and { " et~al" * } { t sortify * } if$ nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := } while$ } % \end{macrocode} % % Formatiert den Titel fuer die Sortierung. (A, An und The werden vom % Anfang weggeschnitten; entfernt, weil nur auf Englisch zugeschnitten). % % \begin{macrocode} FUNCTION {sort.format.title} { 't := % "A " #2 % "An " #3 % "The " #4 t % chop.word % chop.word % chop.word sortify #1 global.max$ substring$ } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% SORTIERUNG: ...sort %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {author.sort} { key empty$ { author empty$ { "to sort, need key or author in " cite$ * warning$ "" } { author sort.format.names } if$ } { key sortify } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {author.editor.sort} { key empty$ { author empty$ { editor empty$ { "to sort, need key, author or editor in " cite$ * warning$ "" } { editor sort.format.names } if$ } { author sort.format.names } if$ } { key sortify } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {author.organization.sort} { key empty$ { author empty$ { organization empty$ { "to sort, need key, author or organization in " cite$ * warning$ "" } { organization sortify } if$ } { author sort.format.names } if$ } { key sortify } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {editor.organization.sort} { key empty$ { editor empty$ { organization empty$ { "to sort, need key, editor or organization in " cite$ * warning$ "" } { organization sortify } if$ } { editor sort.format.names } if$ } { key sortify } if$ } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% SORTIERUNG: Hauptfunktionen %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} FUNCTION {presort} { calc.label sortify year field.or.null purify$ #-1 #4 substring$ * " " * type$ "book" = type$ "inbook" = or 'author.editor.sort { type$ "proceedings" = 'editor.organization.sort { type$ "manual" = type$ "internet" = or 'author.organization.sort 'author.sort if$ } if$ } if$ #1 entry.max$ substring$ 'sort.label := sort.label * " " * title field.or.null sort.format.title * #1 entry.max$ substring$ 'sort.key$ := } % \end{macrocode} % % \begin{macrocode} FUNCTION {initialize.extra.label.stuff} { #0 int.to.chr$ 'last.label := "" 'next.extra := #0 'last.extra.num := } % \end{macrocode} % % \begin{macrocode} FUNCTION {forward.pass} { last.label calc.label year field.or.null purify$ #-1 #4 substring$ * #1 entry.max$ substring$ = % are they equal? { last.extra.num #1 + 'last.extra.num := last.extra.num int.to.chr$ 'extra.label := } { "a" chr.to.int$ 'last.extra.num := "" 'extra.label := calc.label year field.or.null purify$ #-1 #4 substring$ * #1 entry.max$ substring$ 'last.label := } if$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {reverse.pass} { next.extra "b" = { "a" 'extra.label := } 'skip$ if$ label.year extra.label * 'sort.year := extra.label 'next.extra := } % % \begin{macrocode} FUNCTION {bib.sort.order} { sort.label " " * year field.or.null sortify * " " * title field.or.null sort.format.title * #1 entry.max$ substring$ 'sort.key$ := } % \end{macrocode} % % \begin{macrocode} FUNCTION {begin.bib} { preamble$ empty$ 'skip$ { preamble$ write$ newline$ } if$ "\begin{thebibliography}{}" write$ newline$ } % \end{macrocode} % % \begin{macrocode} FUNCTION {end.bib} { newline$ "\end{thebibliography}" write$ newline$ } % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% %% % %% HAUPTPROGRAMM %% % %% %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{macrocode} READ ITERATE {presort} % \end{macrocode} % \iffalse % %<*sort> % \fi % \begin{macrocode} SORT % by label, year, author/organization/key, title % \end{macrocode} % \iffalse % %<*base> % \fi EXECUTE {initialize.extra.label.stuff} ITERATE {forward.pass} REVERSE {reverse.pass} % \end{macrocode} % \iffalse % %<*sort> % \fi % \begin{macrocode} ITERATE {bib.sort.order} SORT % by sort.label, year, title --- giving final bib. order. % \end{macrocode} % \iffalse % %<*base> % \fi % \begin{macrocode} EXECUTE {begin.bib} EXECUTE {init.state.consts} ITERATE {call.type$} EXECUTE {end.bib} % \end{macrocode} % \iffalse % % \fi % \Finale