summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/multibib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/multibib
Initial commit
Diffstat (limited to 'macros/latex/contrib/multibib')
-rw-r--r--macros/latex/contrib/multibib/README54
-rwxr-xr-xmacros/latex/contrib/multibib/bibtexall21
-rw-r--r--macros/latex/contrib/multibib/mbgglo.ist135
-rw-r--r--macros/latex/contrib/multibib/mbgind.ist133
-rw-r--r--macros/latex/contrib/multibib/mbplain.bst1107
-rw-r--r--macros/latex/contrib/multibib/mbunsrtdin.bst1333
-rw-r--r--macros/latex/contrib/multibib/multibib.dtx1217
-rw-r--r--macros/latex/contrib/multibib/multibib.ins58
-rw-r--r--macros/latex/contrib/multibib/multibib.pdfbin0 -> 215343 bytes
9 files changed, 4058 insertions, 0 deletions
diff --git a/macros/latex/contrib/multibib/README b/macros/latex/contrib/multibib/README
new file mode 100644
index 0000000000..3239ef9991
--- /dev/null
+++ b/macros/latex/contrib/multibib/README
@@ -0,0 +1,54 @@
+
+Abstract
+
+ The `multibib' package allows to create references to multiple
+ bibliographies within one document. It thus provides a complementary
+ functionality to packages like `bibunits' or `chapterbib', which allow
+ to create one bibliography for multiple, but different parts of the
+ document.
+
+
+To produce the style
+
+ latex multibib.ins
+
+
+To produce the documentation
+
+ latex multibib.dtx
+
+ If you do not want to exclude the macro section from the documentation,
+ remove the comment sign before \OnlyDescription.
+
+ To produce an index for the documentation:
+
+ makeindex -s mbgind.ist multibib
+
+ To produce a change history for the documentation:
+
+ makeindex -s mbgglo.ist -o multibib.gls multibib.glo
+
+
+Contents:
+
+ README this file ;-)
+
+ multibib.dtx documented source file for the multibib package
+ multibib.ins installation file
+ multibib.pdf documentation
+
+ mbgglo.ist modification of gglo.ist to produce a change history for
+ the documentation of multibib
+ mbgind.ist modification of gind.ist to produce an index for
+ the documentation of multibib
+
+ bibtexall shell script to run bibtex on each .aux file in the
+ present directory
+ mbplain.bst modification of plain.bst to be used together with multibib
+ mbunsrtdin.bst modification of unsrtdin.bst to be used together with multibib
+
+
+
+Happy TeXing
+
+ Thorsten Hansen, Thorsten.Hansen@psychol.uni-giessen.de
diff --git a/macros/latex/contrib/multibib/bibtexall b/macros/latex/contrib/multibib/bibtexall
new file mode 100755
index 0000000000..3b2849486a
--- /dev/null
+++ b/macros/latex/contrib/multibib/bibtexall
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# Evoke bibtex for each .aux file in the present directory.
+#
+# Usage:
+# Change to the directory where you want to bibtex all .aux files which
+# have a citation command and type
+#
+# bibtexall
+#
+# Thorsten Hansen, 2003-03-24 (first entry)
+# 2005-10-26 do not evoke bibtex on .aux files w/o \citation's
+# 2008-11-06 no message for files w/o citations
+for file in *.aux ; do
+ if grep -c -q '\\citation' $file; then
+ echo "process $file"
+ bibtex `basename $file .aux`
+# else
+# echo "ignore file $file which has no \citation command"
+ fi
+done
diff --git a/macros/latex/contrib/multibib/mbgglo.ist b/macros/latex/contrib/multibib/mbgglo.ist
new file mode 100644
index 0000000000..d3547737d9
--- /dev/null
+++ b/macros/latex/contrib/multibib/mbgglo.ist
@@ -0,0 +1,135 @@
+%
+% This is file `mbgglo.ist', modified from file `gglo.ist'
+% to be used with package multibib.
+%
+% 1999/12/14 Thorsten Hansen, hansen@neuro.informatik.uni-ulm.de
+%
+% Changes:
+% . Level char changed from > to -, because > is used for variable suffixes in
+% macro names of package multibib.
+%
+%%
+%% The original source files were:
+%%
+%% doc.dtx (with options: `gglo')
+%%
+%% This is a generated file.
+%%
+%% Copyright 1993 1994 1995 1996 1997
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% For further copyright information, and conditions for modification
+%% and distribution, see the file legal.txt, and any other copyright
+%% notices in this file.
+%%
+%% This file is part of the LaTeX2e system.
+%% ----------------------------------------
+%% This system is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see bugs.txt.
+%%
+%% Please do not request updates from us directly. Primary
+%% distribution is through the CTAN archives.
+%%
+%%
+%% IMPORTANT COPYRIGHT NOTICE:
+%%
+%% You are NOT ALLOWED to distribute this file alone.
+%%
+%% You are allowed to distribute this file under the condition that it
+%% is distributed together with all the files listed in manifest.txt.
+%%
+%% If you receive only some of these files from someone, complain!
+%%
+%%
+%% Permission is granted to copy this file to another file with a
+%% clearly different name and to customize the declarations in that
+%% copy to serve the needs of your installation, provided that you
+%% comply with the conditions in the file legal.txt.
+%%
+%% However, NO PERMISSION is granted to generate or to distribute a
+%% modified version of this file under its original name.
+%%
+%% You are NOT ALLOWED to change this file.
+%%
+%%
+%% MODIFICATION ADVICE:
+%%
+%% If you want to customize this file, it is best to make a copy of
+%% the source file(s) from which it was produced. Use a different
+%% name for your copy(ies) and modify the copy(ies); this will ensure
+%% that your modifications do not get overwritten when you install a
+%% new release of the standard system. You should also ensure that
+%% your modified source file does not generate any modified file with
+%% the same name as a standard file.
+%%
+%% You can then easily distribute your modifications by distributing
+%% the modified and renamed copy of the source file, taking care to
+%% observe the conditions in legal.txt; this will ensure that other
+%% users can safely use your modifications.
+%%
+%% You will also need to produce your own, suitably named, .ins file to
+%% control the generation of files from your source file; this file
+%% should contain your own preambles for the files it generates, not
+%% those in the standard .ins files.
+%%
+%% The names of the source files used are shown above.
+%%
+%%
+%%
+%% \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 \~}
+%%
+%% Package `doc' to use with LaTeX 2e
+%% Copyright (C) 1989-1996 Frank Mittelbach, all rights reserved.
+%% This is a MAKEINDEX style file which should be used to
+%% generate the formatted change history for use with the doc
+%% package. The TeX commands used below are defined in
+%% doc.sty. The commands for MAKEINDEX like `level'
+%% `item_x1' are described in `` Makeindex, A General
+%% Purpose, Formatter-Independent Index Processor'' by
+%% Pehong Chen.
+
+actual '='
+quote '!'
+level '-'
+item_x1 "\\efill \n \\subitem "
+item_x2 "\\ "
+delim_0 "\\pfill "
+delim_1 "\\pfill "
+delim_2 "\\pfill "
+% The next lines will produce some warnings when
+% running Makeindex as they try to cover two different
+% versions of the program:
+lethead_prefix "{\\bfseries\\hfil "
+lethead_suffix "\\hfil}\\nopagebreak\n"
+lethead_flag 0
+heading_prefix "{\\bfseries\\hfil "
+heading_suffix "\\hfil}\\nopagebreak\n"
+headings_flag 0
+preamble
+"\n \\begin{theglossary} \n
+ \\makeatletter\\scan@allowedfalse\n"
+postamble
+"\n\n \\end{theglossary}\n"
+keyword "\\glossaryentry"
+%%
+%%
+%% End of file `mbgglo.ist'.
diff --git a/macros/latex/contrib/multibib/mbgind.ist b/macros/latex/contrib/multibib/mbgind.ist
new file mode 100644
index 0000000000..f054bfe3cf
--- /dev/null
+++ b/macros/latex/contrib/multibib/mbgind.ist
@@ -0,0 +1,133 @@
+%
+% This is file `mbgind.ist', modified from file `gind.ist'
+% to be used with package multibib.
+%
+% 1999/12/14 Thorsten Hansen, hansen@neuro.informatik.uni-ulm.de
+%
+% Changes:
+% . Level char changed from > to -, because > is used for variable suffixes in
+% macro names of package multibib.
+%
+%%
+%% The original source files were:
+%%
+%% doc.dtx (with options: `gind')
+%%
+%% This is a generated file.
+%%
+%% Copyright 1993 1994 1995 1996 1997
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% For further copyright information, and conditions for modification
+%% and distribution, see the file legal.txt, and any other copyright
+%% notices in this file.
+%%
+%% This file is part of the LaTeX2e system.
+%% ----------------------------------------
+%% This system is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see bugs.txt.
+%%
+%% Please do not request updates from us directly. Primary
+%% distribution is through the CTAN archives.
+%%
+%%
+%% IMPORTANT COPYRIGHT NOTICE:
+%%
+%% You are NOT ALLOWED to distribute this file alone.
+%%
+%% You are allowed to distribute this file under the condition that it
+%% is distributed together with all the files listed in manifest.txt.
+%%
+%% If you receive only some of these files from someone, complain!
+%%
+%%
+%% Permission is granted to copy this file to another file with a
+%% clearly different name and to customize the declarations in that
+%% copy to serve the needs of your installation, provided that you
+%% comply with the conditions in the file legal.txt.
+%%
+%% However, NO PERMISSION is granted to generate or to distribute a
+%% modified version of this file under its original name.
+%%
+%% You are NOT ALLOWED to change this file.
+%%
+%%
+%% MODIFICATION ADVICE:
+%%
+%% If you want to customize this file, it is best to make a copy of
+%% the source file(s) from which it was produced. Use a different
+%% name for your copy(ies) and modify the copy(ies); this will ensure
+%% that your modifications do not get overwritten when you install a
+%% new release of the standard system. You should also ensure that
+%% your modified source file does not generate any modified file with
+%% the same name as a standard file.
+%%
+%% You can then easily distribute your modifications by distributing
+%% the modified and renamed copy of the source file, taking care to
+%% observe the conditions in legal.txt; this will ensure that other
+%% users can safely use your modifications.
+%%
+%% You will also need to produce your own, suitably named, .ins file to
+%% control the generation of files from your source file; this file
+%% should contain your own preambles for the files it generates, not
+%% those in the standard .ins files.
+%%
+%% The names of the source files used are shown above.
+%%
+%%
+%%
+%% \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 \~}
+%%
+%% Package `doc' to use with LaTeX 2e
+%% Copyright (C) 1989-1996 Frank Mittelbach, all rights reserved.
+%% This is a MAKEINDEX style file which should be used to
+%% generate the formatted index for use with the doc
+%% package. The TeX commands used below are defined in
+%% doc.sty. The commands for MAKEINDEX like `level'
+%% `item_x1' are described in `` Makeindex, A General
+%% Purpose, Formatter-Independent Index Processor'' by
+%% Pehong Chen.
+
+actual '='
+quote '!'
+level '-'
+preamble
+"\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n"
+postamble
+"\n\n \\end{theindex}\n"
+item_x1 "\\efill \n \\subitem "
+item_x2 "\\efill \n \\subsubitem "
+delim_0 "\\pfill "
+delim_1 "\\pfill "
+delim_2 "\\pfill "
+% The next lines will produce some warnings when
+% running Makeindex as they try to cover two different
+% versions of the program:
+lethead_prefix "{\\bfseries\\hfil "
+lethead_suffix "\\hfil}\\nopagebreak\n"
+lethead_flag 1
+heading_prefix "{\\bfseries\\hfil "
+heading_suffix "\\hfil}\\nopagebreak\n"
+headings_flag 1
+%%
+%%
+%% End of file `mbgind.ist'.
diff --git a/macros/latex/contrib/multibib/mbplain.bst b/macros/latex/contrib/multibib/mbplain.bst
new file mode 100644
index 0000000000..7fddc45dba
--- /dev/null
+++ b/macros/latex/contrib/multibib/mbplain.bst
@@ -0,0 +1,1107 @@
+%
+% This is file `mbplain.bst', modified from file `plain.bst'
+% to be used with package multibib.
+%
+% 1999/12/28 Thorsten Hansen, hansen@neuro.informatik.uni-ulm.de
+%
+% Changes:
+% . Function longest.label.pass modified to count the labels.
+%
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+ % Copyright (C) 1985, all rights reserved.
+ % Copying of this file is authorized only if either
+ % (1) you make absolutely no changes to your copy, including name, or
+ % (2) if you do make changes, you name it something other than
+ % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+ % This restriction helps ensure that all standard styles are identical.
+ % The file btxbst.doc has the documentation for this style.
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+STRINGS { s t }
+
+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
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et~al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { ", editors" * }
+ { ", editor" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+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$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { "volume" volume tie.or.space.connect
+ series empty$
+ 'skip$
+ { " of " * series emphasize * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { output.state mid.sentence =
+ { "number" }
+ { "Number" }
+ if$
+ number tie.or.space.connect
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { " in " * series * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { edition "l" change.case$ " edition" * }
+ { edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+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
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { "pages" pages n.dashify tie.or.space.connect }
+ { "page" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ number empty$
+ 'skip$
+ { "(" number * ")" * *
+ volume empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { "In " booktitle emphasize * }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+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." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ 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$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In {\em " booktitle * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ format.date "year" output.check
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ new.block
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ address output
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ new.block
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ address output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ 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
+ publisher "publisher" output.check
+ address output
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.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
+ publisher "publisher" output.check
+ address output
+ format.edition output
+ format.date "year" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.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.pages output
+ address empty$
+ { organization publisher new.sentence.checkb
+ organization output
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ organization output
+ publisher output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ address output
+ }
+ if$
+ format.edition output
+ format.date output
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ "Master's thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.date output
+ new.block
+ note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization output }
+ { format.editors output.nonnull }
+ if$
+ new.block
+ format.btitle "title" output.check
+ format.bvolume output
+ format.number.series output
+ address empty$
+ { editor empty$
+ { publisher new.sentence.checka }
+ { organization publisher new.sentence.checkb
+ organization output
+ }
+ if$
+ publisher output
+ format.date "year" output.check
+ }
+ { address output.nonnull
+ format.date "year" output.check
+ new.sentence
+ editor empty$
+ 'skip$
+ { organization output }
+ if$
+ publisher output
+ }
+ if$
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" output.check
+ address output
+ format.date "year" output.check
+ new.block
+ note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ new.block
+ format.title "title" output.check
+ new.block
+ note "note" output.check
+ format.date output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+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"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { nameptr #1 >
+ { " " * }
+ 'skip$
+ if$
+ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
+ nameptr numnames = t "others" = and
+ { "et al" * }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ label width$ longest.label.width = %% added to count the labels
+ or %% added to count the labels
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/macros/latex/contrib/multibib/mbunsrtdin.bst b/macros/latex/contrib/multibib/mbunsrtdin.bst
new file mode 100644
index 0000000000..8d5a3fb289
--- /dev/null
+++ b/macros/latex/contrib/multibib/mbunsrtdin.bst
@@ -0,0 +1,1333 @@
+%% UNSRTDIN.BST Ausgabe [8] 10/10/00
+%% (C) Klaus F. Lorenzen, Hamburg email: lorenzen.marxen@t-online.de
+%% ersetzt UNSRTDIN.BST Ausgabe [7,1] 23/11/99
+%% ersetzt DINUNSRT.BST
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% UNSRTDIN.BST wurde entwickelt aus BibTeX standard bibliography style
+%% `unsrt'.Mit UNSRTDIN.BST werden Literaturverzeichnisse gemaess der deutschen
+%% Zitiernorm DIN 1505 Teil 2 formatiert.
+%% Analog zu den 4 US standard styles wird ein vollstaendiger Satz von
+%% 4 DIN-gerechten bst-style Dateien veroeffentlicht (alphadin.bst,
+%% plaindin.bst, unsrtdin.bst, abbrvdin.bst). Die gueltige Version
+%% ist am schnellsten aus dem WWW ueber folgende URL zu beziehen
+%% http://www.fh-hamburg.de/pers/Lorenzen/bibtex/
+%% Stand: 16/6/99
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%% WAS IST UNSRTDIN.BST ?
+%% Dieser style produziert Literaturzitate in Literaturverzeichnissen
+%% gemaess der deutschen Norm DIN 1505, Teil 2 vom Jan. 1984.
+%% Die Reihenfolge der Zitate im Literaturverzeichnis entspricht der Zitierung
+%% im Text. Form und Gestaltung entsprechen der von plaindin.bst.
+%% Es gibt Unterschiede zwischen der US- und der deutschen Zitierkonvention,
+%% was die bibliographischen Typen und die verschiedenen Trennzeichen zwischen
+%% den Feldern angeht. Daher ist auch keine 100%ige Abbildung der beiden
+%% Regelwerke aufeinander moeglich. Dies ist aber immer durch eine achtsame
+%% Erfassung beherrschbar! Die vorliegenden DIN-styles versuchen einige
+%% bibliographische Beschraenkungen der Originalstyles zu ueberwinden.
+%% Es laesst sich in fast allen Faellen problemlos ein Original-bib-file
+%% (d.i. die Datenbank, die die bibliographischen Informationen enthaelt)
+%% wahlweise nach US-Norm oder deutscher DIN-Norm verarbeiten.
+%% [Beispiel: Produzieren Sie mit der XAMPL.bib-Datenbank aus dem Original-
+%% paket 2 verschiedene Literaturverzeichnisse.] Zu Gunsten
+%% der Allgemeingueltigkeit von bib-files ist bei den Publikationstypen
+%% (entry-types) und den bibliographischen Kategorien (fields) in Zweifels-
+%% faellen immer (ja, mit endlichen Ausnahmen) die originale US-Bedeutung
+%% beibehalten worden. Bei der Erfassung von Literaturquellen in bib-files
+%% gelten folglich die in der TEX-Literatur veroeffentlichten Regeln.
+%% Kommt es dennoch zu kleineren "Schoenheitsfehlern" im fertig gesetzten
+%% output, so koennen diese so gut wie immer durch eine leicht veraenderte
+%% Erfassung im bib-inputfile beseitigt werden. Last but not least koennen
+%% Sie im output-file < *.bbl > noch letzte Hand zur Korrektur ansetzen.
+%
+%% UMGANG MIT FEHLERMELDUNGEN
+%% Noch nicht alle ueberfluessigen Fehlermeldungen des Original-style sind
+%% ausgemerzt. Die meisten Warnmeldungen beruhen auf
+%% den andersartigen bibliographischen Regeln nach DIN 1505 und dem damit
+%% verbundenen Ermessensspielraum, sind also in Wahrheit keine "Fehler".
+%% Dennoch sollten Sie diese Warnungen beachten, um heraus zu finden, ob
+%% evtl. eine unzulaessige Kombination von Publikationstyp (=entry-type) und
+%% "fields" vorgenommen worden ist. Das fuehrt mitunter zu Wasserfallartigen
+%% Fehlermeldungen: meistens duerfen Sie das einfach ignorieren.
+%%
+%% DANKSAGUNG
+%% Hartmut Lueddecke, FH Hamburg habe ich fuer viele Verbesserungsvorschlaege
+%% und stete Unterstuetzung zu danken. Vielen an dieser Stelle ungenannt
+%% bleibenden Anwendern gilt mein Dank, die in den vergangenen Jahren durch
+%% ihre Aufmerksamkeit dazu beigetragen haben, Fehler auszumerzen und
+%% Verbesserungen vorzunehmen.
+%%
+%% HINWEIS: es gibt eine Kombination von ALPHADIN.BST mit dem NATBIB-Stil
+%% von Patrick W.Daly), womit Literaturverzeichnisse komplett nach
+%% DIN 1505 Teil 2 UND Teil 3 formatiert werden koennen. Naeheres
+%% per URL http://www.fh-hamburg.de/pers/Lorenzen/bibtex/
+%%
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% Eine ausfuehrliches Internet-Tutorial mit Beispielen ist in Vorbereitung.
+%% Fuer den Anfang ist diese Datei schon etwas kommentiert!
+%% Kritik, Vorschlaege usw. bitte an :
+%% FH Hamburg, Klaus F. Lorenzen, Grindelhof 30, 20146 Hamburg
+%% e-mail: lorenzen.marxen@t-online.de
+%% 16/6/99
+%% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% version 0.99c for BibTeX versions 0.99c or later, LaTeX2e
+% Copyright (C) 1985, all rights reserved.
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name, or
+% (2) if you do make changes, you name it something other than
+% bstdin.doc, plaindin.bst, unsrtdin.bst, alphadin.bst, and abbrvdin.bst.
+% This restriction helps ensure that all standard styles are identical.
+%% ==> The file btxbst.doc has the original documentation for style 'alpha'.
+%%
+
+ENTRY
+ { address %% Verlagsort
+ author %% persoenlicher Urheber eines Werkes
+ booktitle %% a) Gesamttitel eines mehrbaendigen Werkes
+% %% b) Titel des Sammelwerks, das einzelne selbstaendige
+% %% Beitraege mit eigenem Titel enthaelt (->incollection)
+ chapter %% Kapitel in einem Buch (Monographie)
+ edition %% Auflagevermerk
+ editor %% Persoenl.Herausgeber oder Koerperschaftlicher Herausgeber
+ howpublished %% beliebiger Verlegervermerk: von wem, wo
+ institution %% Institution, die e.Verlagsfreie Veroeffentlichung betreibt
+ isbn %% Standardnr fuer Buecher
+ issn %% - " - : Zeitschriften u. Serien
+ journal %% Titel einer Zeitschrift
+ key %% Zusaetzlich vergebener Sortierschluessel, mitunter notwend.
+ month %% naehere Bestimmung des Erscheinungsjahres (-> macro 's)
+ note %% freies Eingabefeld fuer zusaetzliche Informationen
+ number %% Mehrfachbedeutung in Abhaengigkeit vom Eingabetyp
+ organization %% a) Name der Organisation/des Organisators e. Tagung,Konferenz
+% %% b) Name einer Firma/Gesellschaft, die ein ->manual herausgab
+ pages %% Umfangsangaben, meist Seitenzahlen
+ publisher %% Verlag
+ school %% Hochschule/Universitaet, die eine Dipl.-Arb./Dissertation veroeff.
+ series %% Titel e.Reihe, in der ein best. Buchtitel erschienen ist
+ title %% Titel einer (namentlich gekennzeichneten) Veroeffentlichung
+ type %% Zusatzfeld z.Kennzeichnung e.besonderen Publikationstyps
+ volume %% a) Zaehlung bei einem mehrbaendigen Werk (-> book)
+% %% b) Jahrgang einer Zeitschrift (-> article
+ year %% Erscheinungsjahr
+ }
+ {}
+ { label extra.label sort.label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+%% die folg. BOOLE'sche VAR steuern d. Ausg. ": " nach Urheber-Feldern
+%% und ". - " vor ISBN oder Anmerkungen (NOTE)
+
+INTEGERS { colon.after period.dash }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+ #4 'colon.after :=
+ #5 'period.dash :=
+}
+INTEGERS { zahl lang }
+
+STRINGS { h s t u v }
+
+%% neue DIN-Funktion, 16/2/94
+
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ { write$ }
+ { output.state colon.after =
+ { ": " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state period.dash =
+ { ". -- " * write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state mid.sentence =
+ { ", " * write$ }
+ { write$
+ newline$
+ "\newblock " write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ after.block 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+% Do no write label; incompatible with multibib and continous labels TH 2008-11-05
+% "\bibitem[" write$
+% label write$
+% "]{" write$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry} %%$$$ nach DIN neu 16/2/94
+{ write$
+ newline$
+}
+
+FUNCTION {set.period.dash} %% Wenn ein ". - " die Satzteile trennen soll.!
+{ output.state before.all =
+ 'skip$
+ { period.dash 'output.state := }
+ if$
+}
+
+%% neu 16/2/94
+%% prueft, ob PAGES, ISBN- oder NOTE-Feld vh. ist und setzt dann ". - " davor.
+
+FUNCTION {set.period.dash.check}
+{ empty$
+ 'skip$
+ 'set.period.dash
+ if$
+}
+
+FUNCTION {set.colon.after} %%$$$ Wenn ein ": " d. Satzteile trennen soll!
+{ output.state before.all =
+ 'skip$
+ { colon.after 'output.state := }
+ if$
+}
+
+%% neu / alt 17/2/94 Wenn ein " " die Satzteile trennen soll.!
+FUNCTION {new.sentence}
+{ output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+}
+
+%% neu 17/2/94 Wenn ein ", " die Satzteile trennen soll.!
+FUNCTION { part.of.sentence }
+{ output.state before.all =
+ 'skip$
+ { mid.sentence 'output.state := }
+ if$
+}
+
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+STRINGS { fkt }
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+
+%% neu, setzt Autor/Hrsg. in Kapitaelchen 9/3/94
+FUNCTION { capitalize }
+ { duplicate$ empty$
+ { pop$ "" }
+ { "\textsc{" swap$ * "}" * }
+ if$
+}
+
+%%$$$ DIN-Quellenangabe : spezieller unselbst. Teil ist erschienen "In: "
+%% dem bibliogr. selbst. Werk, z.B. Zeitschrift, Buch
+
+%% 1/4/96
+FUNCTION {article.in.journal}
+{ duplicate$ empty$
+ { pop$ "" }
+ { author missing$
+ { title missing$
+ { emphasize " " * * }%% wenn ein Zs-Heft als ganzes zitiert wird
+ { emphasize "{In: }" swap$ " " * * }
+ if$
+ }
+ { emphasize "{In: }" swap$ " " * * }
+ if$
+ }
+ if$
+}
+
+%% nach Vorschlag von H.Lueddecke, um Adelspraedikate beim Sortieren
+%% nach den(m) Vornamen aufzufuehren. Lo, 2/11/94
+FUNCTION {format.names}
+{ 's :=
+ "" 'u :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv~}{ll}" format.name$ 't :=%% das ergibt DIN-Ansetzung
+ %% Lue's Vorschlag s nameptr "{ll}" format.name$ 't :=
+ t capitalize 't :=
+ s nameptr "{, ff}" format.name$ 'u :=
+ %% Lue's Vorschlag s nameptr "{, ff}{ vv}" format.name$ 'u :=
+ u text.length$ 'lang :=
+ #1 'zahl :=
+ "" 'v :=
+ { zahl lang < }
+ { u zahl #1 substring$ "~" =
+ { v "" =
+ { u #1 zahl #1 - substring$ 'v := }
+ 'skip$
+ if$
+ v u zahl #2 substring$ * "." * 'v := }
+ 'skip$
+ if$
+ zahl #1 + 'zahl := }
+ while$
+ v "" =
+ { u 'v := }
+ 'skip$
+ if$
+%% der string fkt enthaelt " (Hrsg.)", wenn Editorfeld nicht leer ist
+ t v * fkt * 't := %% Komma nach Nachnamen wird oben erledigt!
+ %% t enthaelt nun d. formatierten Nnamen, Vnamen
+ nameptr #1 >
+ { namesleft #1 >
+ { " ; " * t * }
+ { numnames #2 >
+ { " " * }
+ 'skip$
+ if$
+%% %% n. schindle's hinweis 12/1/96 erweitert
+ t "\textsc{others}" = t "\textsc{others} (Hrsg.)" = or
+ { " [u.~a.]" * }%% 13/2/94
+%%%% { "et~al." * } %% Geschmackssache, waehle eins von beiden
+ { " ; " * t * }
+ if$
+ }
+ if$ %% Ende der namesleft-Pruefung
+ }
+ 't
+ %% hierdurch wird bei jed. Schleifendurchgang das sich komplet-
+ %% tierende Zwischen-Namensergebnis wieder auf den stack gelegt
+
+ if$ %% Ende der nameptr-Pruefung
+
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$ %% Ende von { namesleft #0 > } ganz oben
+ "" 'fkt := %% fkt wird zurueckgesetzt
+}
+
+%%$$$ geaendert 14/2/94
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+%%$$$ geaend. 20/2/94 Anpassung an DIN, wonach Autor + Hrsg. zusammen vorkom-
+%% men duerfen.!!
+
+FUNCTION {format.editors}
+{ editor empty$
+ { author empty$
+ { "Weder Verfasser noch Hrsg. in " cite$ * warning$ }
+ 'skip$
+ if$
+ }
+ { author empty$
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ }
+ { " (Hrsg.)" 'fkt :=
+ " ; " * editor format.names *
+ }
+ if$
+ }
+ if$
+ }
+
+%% Lo, 12/5/99 neue Funktion fuer proceedings, misc usw.
+
+FUNCTION { format.editors.organization }
+{ organization empty$
+ 'skip$
+ { type$ "misc" =
+ { organization }
+ { " ; " * organization " (Veranst.)" *}
+ if$
+ }
+ if$
+}
+
+%%$$$ Sonderfall: Herausgeber bei Typ incollection, 21/2/94
+FUNCTION {format.ed.incoll}
+{ editor empty$
+ { "" }
+ { " (Hrsg.)" 'fkt :=
+ editor format.names
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title } %% Text so wie er dasteht im Feld title
+ if$
+}
+
+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$
+}
+
+%% geaendert 24/2/94
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$ %% b. Buechern nur Jahr, ohne Monat ausgeb. im Impressum
+ 'year
+ { month " " * year * }
+ if$
+ }
+ if$
+}
+
+%%
+%%$$$ neue Fkt., 16/2/94 u. 14/3/94 das sog. Impressum
+FUNCTION {format.address.publisher.year}
+{ publisher empty$
+ { address empty$
+ { year empty$
+ { "" }
+ { year }
+ if$
+ }
+ { "Es gibt einen Verlagsort, aber keinen Verlag in " cite$ * warning$
+ address ", " * format.date *
+ }
+ if$
+ }
+ { address empty$
+ { year empty$
+ { "Es gibt nur eine Verlagsangabe in " cite$ * warning$
+ publisher
+ }
+ { publisher ", " * format.date * }
+ if$
+ }
+ { year empty$
+ { address " : " * publisher * }
+ { address " : " * publisher * ", " * format.date * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+%% neu 8/3/94 in dieser Funkt. steckt im volume empty-Teil noch ein bug, der
+%% aber ignoriert werden kann; das Ergebnis ist ok.
+FUNCTION {format.btitle.vol}
+{ number empty$
+ { series empty$
+ { volume empty$
+ { title emphasize }
+ { title emphasize ". Bd." * volume tie.or.space.connect }
+ if$
+ }
+ { volume empty$
+ { title emphasize }%% ein Buch, das zusaetzl. SERIES=Reihentitel besitzt
+ %% jetzt kommt d. Fall des mehrbaendigen Werkes mit Gesamttitel=SERIES
+ %% Zaehlung=VOLUME und Bandtitel=TITLE;
+ { series emphasize ". Bd." * volume tie.or.space.connect
+ ": " * "{\emph{" * title * "}}" * }
+ if$
+ }
+ if$%% series-test
+ }
+ { title emphasize }%% wenn number ex., dann immer title-Feld
+ if$%% Ende number-test
+}
+
+%%$$$ neu 16/2/94
+%% Serien- / Reihentitel werden im Feld series gespeichert. Weist die
+%% Serie eine Zaehlung der Einzeltitel auf, gibt man entweder nach DIN alles
+%% in das Feld series so ein: ---> TITEL DER SERIE NR. (der Vorlage) <---
+%% z. B. SERIES= { Mensch und Computer 12 }.
+%% [ Die Nummer der Vorlage darf auch durch " ; " abgesetzt werden. ]
+%% oder:
+%% man gibt die Zaehlung in das Feld NUMBER ein, z.B. NUMBER = {12}.
+%% Achtung!!
+%% Bei mehrbaendigen Werken steht d. Gesamttitel im Feld SERIES und die
+%% Bandzaehlung im Feld VOLUME; NUMBER darf dann nicht besetzt sein!
+%% Anderenfalls liegt ein Erfassungsfehler vor, da sich Reihe u. mehrbd.
+%% Werk gegenseitig ausschliessen.
+
+FUNCTION {format.series.number.din}
+{ volume empty$
+ { number empty$
+ { series empty$
+ { "" }%% Ausstieg mit Nullstring
+ { "(" series * ")" * } %% d. Seriennr koennte auch gleich hier
+ %% im SERIES-Feld miterfasst werden
+ if$
+ }
+ { series empty$
+ { "(" number tie.or.space.connect ")" *
+ "there's a number but no series in " cite$ * warning$
+ }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ if$
+ }
+ { series empty$
+ { "" }
+ { type$ "proceedings" = %% Sonderfall, es darf VOLUME und NUMBER ex. !
+ { number empty$
+ { "(" series * ")" * }
+ { "(" series * number tie.or.space.connect ")" * }
+ if$
+ }
+ { "" }%% Ausstieg mit Nullstring, s. Kommentar
+ if$
+ }%% bei gezaehlten Reihen MUSS die Reihennr. im Feld NUMBER stehen!
+ if$ %% wenn also d. Feld VOLUME nicht leer ist, dann liegt ausser bei
+ %% Typ PROCEEDINGS falsche
+ } %% Erfassung vor und es erfolgt d. Ausstieg mit d. Nullstring!
+ if$
+}
+
+%% seltener Fall bei MISC: Ausgabe einer Serie; die Nummer der Serie muss
+%% in SERIES miterfasst werden 16/6/99
+
+FUNCTION {format.misc.series}
+{ series empty$
+ { "" }
+ { "(" series * ")" * }
+ if$
+}
+
+
+%%$$$ 16/2/94
+%% Auflagenvermerke gibt man komplett, einschliesslich Abkuerzungen in
+%% das Feld edition ein: ---> EDITION= { 3., erw. und verb. Aufl. }
+%% oder fremdsprachlich: EDITION= { 2nd edition }
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { edition }
+ if$
+}
+
+%%$$$ neu, 18/3/94
+FUNCTION { format.isbn.issn }
+{ isbn empty$
+ { issn empty$
+ { "" }
+ { "ISSN" issn n.dashify tie.or.space.connect }
+ if$
+ }
+ { "ISBN" isbn n.dashify tie.or.space.connect }
+ if$
+}
+
+%%$$$ geaendert, 21/2/94 gibt Seitenzahl bei BOOK-Typ und verwandten T. aus
+FUNCTION {format.pages.book}
+{ pages empty$
+ { "" }
+ { "" pages n.dashify tie.or.space.connect " S" *} %% 17/12/95
+ if$
+}
+
+%%$$$ alle anderen Seitenang. zB. Zeitschrft., INBOOK usw. a la Orig., 9/3/94
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { "S." pages n.dashify tie.or.space.connect }
+ if$
+}
+
+%% Angaben v. Jahrgang, Jahr, Heftnr., Seiten bei Artikel-Typ
+%% 14/3/94, 26/2/97
+
+FUNCTION {format.vol.year.num.pages}
+{ volume field.or.null
+ year empty$
+ { "Es gibt einen Jahrgang, aber kein Jahr in " cite$ * warning$ }
+ { " (" year * ")" * * }
+ if$
+ month empty$
+ 'skip$
+ { ", " month * * }
+ if$
+ number empty$
+ 'skip$
+ { ", Nr. " number * * }
+ if$
+ pages empty$%% Lo, 26/2/97
+ 'skip$
+ { ", " format.pages * *}%%
+ if$
+
+%% pages empty$%% das war die Fass. Nov. 96, die auch ging
+%% 'skip$
+%% { duplicate$ empty$
+%% { pop$ format.pages }%% da pages leer, wird nur "" auf stack gelegt
+%% { ", " format.pages * *}
+%% if$
+%% }
+%% if$
+
+}
+
+%% geaendert 21/2/94
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "Kapitel " }
+ { type }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+%%$$$ geaendert 21/2/94
+FUNCTION {format.in.ed.booktitle.din}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+ { volume empty$
+ { "{In: }" booktitle emphasize * }%% n. Belieben fettes In:
+ { "{In: }" booktitle emphasize * %% - " -
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ { volume empty$
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize * }
+ { "{In: }" format.ed.incoll * ": " * booktitle emphasize *
+ " Bd." volume tie.or.space.connect *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%% geaendert 1/3/94
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type
+ }
+ if$
+}
+
+%% geaendert 23/2/94 i.Orig. wird zuerst die number, dann der type getestet
+FUNCTION {format.tr.number.din}
+{ type empty$
+ { number empty$
+ { " -- Forschungsbericht" } %% bei Minimalangaben besser ohne "."!
+ { "(" number tie.or.space.connect "). -- Forschungsbericht" * }
+ if$
+ }
+ { number empty$
+ { " -- " type * } %% bei Minimalangaben besser ohne "."!
+ { "(" number tie.or.space.connect "). -- " * type * }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "{In: }{\em " journal * "\/}" * }%%
+ if$
+ }
+ { "{In: }" key * }%%
+ if$
+ "{\cite{" * crossref * "}" * "}" * ", " * format.pages *
+%% " (siehe \cite{" * crossref * "}" * "), " * format.pages *
+}
+
+%%geaendert 7/3/94 und noch einmal nach Lueddecke, s.o.
+FUNCTION {format.crossref.editor}
+%vorher,Lue { editor #1 "{vv~}{ll}" format.name$ " (Hrsg.)" *
+ { editor #1 "{ll}" format.name$ " (Hrsg.)" *
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " [u.~a.]" * }
+%% { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " [u.~a.]" }
+%% { " et~al." * }
+ { " ; " * editor #2 "{vv~}{ll}" format.name$ * " (Hrsg.)" * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "{\texttt{siehe}} "
+%% "(siehe "
+ }
+ { ". -- Bd." volume tie.or.space.connect
+ " von " *
+ }
+ 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$
+ "" *
+ }
+ { "" * }%% dadurch kommt nach der Bandzaehl. gleich das label 2/6/99
+%% { "{\emph{" * series * "}} {\texttt{siehe}}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { "" * }%% nach der Bandzaehlung kommt gleich das label; Lo 2/6/99
+%% { format.crossref.editor * }
+ if$
+ "{\cite{" * crossref * "}" * "}" *
+%% "{\cite{" * crossref * "}" * "}" * %%"), " * format.pages *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "{In: }{\emph " booktitle * "}" * }%% fettes In: n. Belieben
+ if$
+ }
+ { "{In: }" }%% 26/5/99
+%% { "{In: }" key * }
+ if$
+ }
+%% { "{In: }{\em " booktitle * "\/}" * }%%
+ { "{In: }" }%% Lo, 10/2/99 es sieht der reine Bezug (Referenz) besser aus!
+ if$
+%% " (siehe \cite{" * crossref * "}" * "), " * format.pages *
+ "{\cite{" * crossref * "}" * "}" * ", " * format.pages *%% das fette label, Lo 23/2/99
+%% alte Vers. bis 27/2/97 " (siehe \cite{" * crossref * "}" * ")" *
+}
+
+%%geaendert
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { journal article.in.journal output.nonnull % 26/2/97
+ new.sentence
+ format.vol.year.num.pages output
+ }
+ { format.article.crossref output.nonnull }
+ if$
+ note set.period.dash.check
+ note output
+ issn set.period.dash.check
+ format.isbn.issn output
+ fin.entry
+}
+
+%%$$$ geaendert, 20/2/94
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ crossref missing$
+ { format.btitle.vol "title" output.check }
+ { format.btitle "title" output.check }
+ if$
+ format.edition "edition" output.check
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ crossref missing$
+ { format.series.number.din output
+ pages set.period.dash.check%% 19/5/99 wie bei adinat.bst
+ format.pages.book output
+ }
+ { format.book.crossref output.nonnull
+ pages set.period.dash.check
+ format.pages.book output
+ }
+ if$
+ note set.period.dash.check
+ note output
+ isbn set.period.dash.check
+ format.isbn.issn output
+ fin.entry
+}
+
+%% geaendert 23/2/94
+FUNCTION {inbook}
+{ output.bibitem
+%% unselbst. Teile eines Buches werden am Anf. genannt, dann d selbst. Quelle
+ chapter empty$
+ { "Es fehlen die Kapitelangaben in " cite$ * warning$ }
+ { type empty$
+ { "Kap. " }%% d.i. die Standardvorgabe
+ { type }%% wenn man keine bes. Typform angeben will, koennte ein kl.
+%% Zwischenraum gewaehlt werden, z.B. " \, "
+ if$
+ chapter tie.or.space.connect " {In: }" * *%% n. Belieben fettes "In:"
+ %% diese Plazierung und der 2. * stammt v. N. Zacharias, Oldenburg, Juli 2000
+ }
+ if$
+
+%% -------- jetzt kommt der bibliogr. selbst. Teil
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ }
+ if$
+ set.colon.after
+ format.btitle.vol "title" output.check
+ crossref missing$
+ { format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output
+%% vorher note ...
+ part.of.sentence
+ format.pages "pages" output.check
+ note set.period.dash.check
+ note output
+ }
+ { format.book.crossref output.nonnull
+ note set.period.dash.check
+ note output
+ }
+ if$
+ isbn set.period.dash.check
+ format.isbn.issn output
+ fin.entry
+}
+
+%% geaenderte Seitenzahlausgabe, wenn crossref-Feld benutzt wird, 27/2/97
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ format.edition output
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output
+ note set.period.dash.check
+ note output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ part.of.sentence
+ format.chapter.pages "pages" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ note set.period.dash.check
+ note output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ if$
+ fin.entry
+}
+
+%% geaendert 22/2/94, 15/11/96 (Hinweis v. Alin Shindun, Uni Siegen)
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.title "title" output.check
+ crossref missing$
+ { format.in.ed.booktitle.din "booktitle" output.check
+ address empty$
+ { organization new.sentence.checka
+ organization output
+ part.of.sentence
+ format.address.publisher.year output
+ }
+ { format.address.publisher.year "publisher" output.check }
+ if$
+ new.sentence
+ series empty$ %%neu nach Hinweis v. Alin Shindun, 15/11/96
+ 'skip$
+ { format.series.number.din output }
+ if$
+ note set.period.dash.check
+ note output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ part.of.sentence
+ format.pages output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ note set.period.dash.check
+ note output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {conference} { inproceedings }%% nach Patashnik, wg US-Kompatibilitaet
+
+%% geaendert, 11/6/99
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization empty$
+ { title empty$
+ 'skip$
+ {format.btitle "title" output.check }
+ if$
+ }
+ { organization output.nonnull
+ set.colon.after
+ format.btitle "title" output.check
+ }
+ if$
+ }
+ { format.authors output.nonnull
+ set.colon.after
+ format.btitle "title" output.check
+ }
+ if$
+ format.edition "edition" output.check
+ author empty$
+ { organization empty$
+ { address output
+ part.of.sentence
+ }
+ 'skip$
+ if$
+ }
+ { address ": " * organization * output
+ part.of.sentence
+ }
+ if$
+ format.date output
+ pages set.period.dash.check
+ format.pages.book output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+%% MASTERSTHESIS ersetzt zugleich PHDTHESIS !! KFL, 17/2/94
+%% Ausgabe-Standard ist "Diplomarbeit", fuer andere Abschlussarbeiten
+%% bei der Erfassung TYPE="anderer Typ" eingeben.
+%% z.B. TYPE={Dissertation}, TYPE={Diss.}, TYPE={Habil.}, TYPE={Magisterarb.}
+%%
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diplomarbeit" format.thesis.type output.nonnull
+ part.of.sentence
+ format.date "year" output.check
+%% pages new.sentence.checka
+ pages set.period.dash.check
+ format.pages.book output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+FUNCTION {phdthesis} %% {mastersthesis}% ist identisch bis auf Standardwert, s.o.
+{ output.bibitem
+ format.authors "author" output.check
+ set.colon.after
+ format.btitle "title" output.check
+ address output
+ part.of.sentence
+ school "school" output.check
+ part.of.sentence
+ "Diss." format.thesis.type output.nonnull % koennte auch `Dissertation' sein
+ part.of.sentence
+ format.date "year" output.check
+ pages set.period.dash.check
+ format.pages.book output
+ note set.period.dash.check
+ note output
+ fin.entry
+}
+
+%% hiermit werden u.a. Normen erfasst
+FUNCTION {misc}
+{ output.bibitem
+ note empty$
+ { title empty$
+ { "" }
+ { format.authors format.editors output.nonnull
+ format.btitle output
+ howpublished output
+ format.date output
+ }
+ if$
+ }
+ { note duplicate$ #1 #4 substring$ "Norm" =
+ { output new.sentence
+ format.date output
+ format.title output
+ }
+ { pop$ ""
+ author empty$
+ { editor empty$
+ { organization empty$
+ { 'skip$ }
+ { format.editors.organization output.nonnull
+ set.colon.after }
+ if$
+ }
+ { format.editors format.editors.organization output.nonnull
+ set.colon.after }
+ if$
+ }
+ { format.authors format.editors output.nonnull
+ set.colon.after }
+ if$
+ format.btitle output
+ howpublished output
+ format.date output
+ new.sentence
+ format.misc.series output%% neu 16/6/99
+ note set.period.dash.check
+ note output
+ }
+ if$
+ }
+ if$
+ fin.entry
+}
+
+FUNCTION {booklet} {misc}%% booklet ist nach dt. Vorgehensweise oft ueberfluessig
+
+%% geaendert 21/5/99
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization empty$
+ { "" }
+ { organization " (Veranst.)" * output }
+ if$
+ }
+ { format.editors format.editors.organization output.nonnull }
+ if$
+ set.colon.after
+ format.btitle "title" output.check
+ volume empty$
+ { "" output.nonnull }
+ { "{\textnormal{Bd.}}" volume tie.or.space.connect emphasize "volume" output.check }
+ if$
+ format.address.publisher.year "publisher" output.check
+ new.sentence
+ format.series.number.din output.nonnull
+ pages set.period.dash.check
+ format.pages.book output
+ note set.period.dash.check
+ note output
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ fin.entry
+}
+
+%% geaendert 23/2/94 auch fuer Firmenschriften u."a. zu benutzen
+FUNCTION {techreport}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors format.editors output.nonnull }
+ if$
+ set.colon.after
+ format.title "title" output.check
+ institution new.sentence.checka
+ institution empty$
+ 'skip$
+ { " / " institution * output.nonnull }
+ if$
+ format.address.publisher.year output
+ number new.sentence.checka
+ format.tr.number.din "number" output.check
+%% new.sentence
+ pages set.period.dash.check
+ format.pages.book output
+ note "note" output.check
+ isbn set.period.dash.check
+ issn set.period.dash.check
+ format.isbn.issn output
+ fin.entry
+}
+
+FUNCTION {unpublished} {misc}%% author, title, note muessen sein! howpublished
+%% %% entfaellt natuerlich
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Januar"}
+
+MACRO {feb} {"Februar"}
+
+MACRO {mar} {"M{\^^b a}rz"}
+%% nach Bernd Raichle, Febr. 1999
+
+MACRO {apr} {"April"}
+
+MACRO {mai} {"Mai"}
+
+MACRO {may} {"Mai"}
+
+MACRO {jun} {"Juni"}
+
+MACRO {jul} {"Juli"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {okt} {"Oktober"}
+
+MACRO {oct} {"Oktober"}
+
+MACRO {nov} {"November"}
+
+MACRO {dez} {"Dezember"}
+
+MACRO {dec} {"Dezember"}
+
+
+%%$$$ stillgelegte Beispiele fr den Gebrauch von Krzeln (hier Zs-Titel).
+
+%%MACRO {acmcs} {"ACM Computing Surveys"}
+
+%%MACRO {acta} {"Acta Informatica"}
+
+%%MACRO {cacm} {"Communications of the ACM"}
+
+%%MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+%%MACRO {ibmsj} {"IBM Systems Journal"}
+
+%%MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+%%MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+%%MACRO {ieeetcad}
+%% {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+%%MACRO {ipl} {"Information Processing Letters"}
+
+%%MACRO {jacm} {"Journal of the ACM"}
+
+READ
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" longest.label * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
+
+%% Ende von UNSRTDIN.BST, Stand: 23/11/99 KFL
diff --git a/macros/latex/contrib/multibib/multibib.dtx b/macros/latex/contrib/multibib/multibib.dtx
new file mode 100644
index 0000000000..8c6c0ecbe1
--- /dev/null
+++ b/macros/latex/contrib/multibib/multibib.dtx
@@ -0,0 +1,1217 @@
+% \CheckSum{538}
+%
+% \iffalse
+%% Package `multibib' to use with LaTeX2e.
+%%
+%% Copyright (C) 2008 by Thorsten Hansen
+%%
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt and version 1.3 or later is
+% part of all distributions of LaTeX version 2003/12/01 or
+% later.
+%
+% This work has the LPPL maintenance status "maintained". The Current
+% Maintainer of this work is Thorsten Hansen.
+%
+% This is a contributed file to the LaTeX2e system.
+%
+%
+%<*dtx>
+ \ProvidesFile{multibib.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{multibib}
+%<driver>\ProvidesFile{multibib.drv}
+% \fi
+% \ProvidesFile{multibib.dtx}
+ [2008/12/10 v1.4 Multiple bibliographies for one document.]
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{ifthen}
+%
+% Sort `General´ before macros starting with `@'.
+%
+\makeatletter
+\def\changes@#1#2#3{%
+\protected@edef\@tempa{\noexpand\glossary{#1\levelchar
+ \ifx\saved@macroname\@empty
+ \space
+ \actualchar
+ \generalname
+ \else
+ \space % <-- \space added
+ \expandafter\@gobble
+ \saved@macroname
+ \actualchar
+ \string\verb\quotechar*%
+ \verbatimchar\saved@macroname
+ \verbatimchar
+ \fi
+ :\levelchar #3}}%
+ \@tempa\endgroup\@esphack}
+\makeatother
+%
+%
+%
+\CodelineIndex
+\RecordChanges
+%\OnlyDescription
+\begin{document}
+\DocInput{multibib.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \newcommand{\class}[1]{\textsf{#1}}
+% \newcommand{\option}[1]{\textsf{#1}}
+% \newcommand{\komascript}{KOMA-\textsc{Script}}
+% \newcommand{\package}[1]{\textsf{#1}}
+% \newcommand{\macrott}[1]{\texttt{\symbol{'134}#1}}
+% \renewcommand*\descriptionlabel[1]{\hspace\labelsep\option{#1}}
+%
+% ^^A
+% ^^A A rule to separate figures from the text.
+% ^^A (Modified code from bibtopic.dtx).
+% ^^A
+% \newcommand\toprule[1][]{^^A
+% \ifthenelse{\equal{#1}{}}{^^A
+% \noindent{\makebox[\textwidth][t]{\hrulefill}}^^A
+% }{%
+% \noindent{\makebox[\textwidth][t]{\hrulefill^^A
+% \raisebox{-.5ex}{ \small\ttfamily#1 }\hrulefill}}^^A
+% }%
+% \par\noindent}
+%
+% \newcommand\bottomrule{\noindent\rule[\baselineskip]{\textwidth}{.6pt}}
+%
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \hyphenation{bib-lio-gra-phy bib-lio-gra-phies}
+%
+% \GetFileInfo{multibib.dtx}
+% \title{The \textsf{multibib} Package}
+% \author{Thorsten Hansen\\
+% \normalsize Thorsten.Hansen@psychol.uni-giessen.de}
+% \date{\fileversion\quad \filedate}
+% \maketitle
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \GlossaryPrologue{\section*{{Change History}}%
+% \markboth{{Change History}}{{Change History}}%
+% Version numbers suffixed with characters have not
+% been released.}
+% \def\levelchar{-}
+%
+% \changes{v1.0}{1999/07/27}{Initial version}
+% \changes{v1.1}{1999/01/14}{Documentation.}
+% \changes{v1.1a}{2001/10/06}{Equivalents of macros \macrott{citep} and
+% \macrott{citet} added.}
+% \changes{v1.1b}{2001/10/10}{Evoke \package{multibib}'s \macrott{@citex}
+% variant not for standard \macrott{cite}
+% commands.}
+% \changes{v1.1c}{2001/10/16}{Equivalents of macros \macrott{citealp} and
+% \macrott{citealt} added.}
+% \changes{v1.1d}{2001/11/04}{Spurious letters occurring for bibstyle
+% \textsf{alpha} removed.}
+% \changes{v1.1e}{2001/11/04}{Additional definition of \macrott{refname}
+% in \macrott{newcites} loop.}
+% \changes{v1.2}{2003/03/24}{Documentation.}
+% \changes{v1.2a}{2003/07/15}{General compatibility mechanism for packages
+% which redefine \macrott{@citex}, motivated
+% by compatibility to \package{cite} v4.0.}
+% \changes{v1.2b}{2003/09/22}{General compatibility mechanism for packages
+% which define their own cite commands, motivated by
+% compatibility to \package{jurabib}.}
+% \changes{v1.2c}{2004/01/23}{Code streamlined.}
+% \changes{v1.3}{2004/01/24}{Documentation.}
+% \changes{v1.3a}{2004/02/09}{Continuous numerical labels with natbib.}
+% \changes{v1.3b}{2004/02/10}{\macrott{isnumber} changed to accept
+% arguments with \macrott{fi}, e.g.,
+% {\macrott{iffalse}{bjko}\macrott{fi}}.}
+% \changes{v1.3c}{2004/02/10}{Allow \macrott{bibliographystyle<s>} to
+% be used in the preamble.}
+% \changes{v1.3d}{2005/10/25}{New option \option{labeled}.}
+% \changes{v1.4}{2008/12/10}{Documentation.}
+%
+%
+%
+%
+% \begin{abstract}
+% The \package{multibib} package allows to create references to
+% multiple bibliographies within one document. It thus provides a
+% complementary functionality to packages like \package{bibunits} or
+% \package{chapterbib}, which allow to create one bibliography for
+% multiple, but different parts of the document. The package
+% introduces the generic macro |\newcites| which generates
+% user-defined citation and bibliography commands for each new
+% bibliography in the document. The new commands can be used
+% intuitively, since both syntax and semantics are similar to their
+% standard \LaTeX\ equivalents. Each bibliography can have its
+% individual style and \BibTeX\ data file(s). Citations to each
+% bibliography are collected in a new auxiliary file to be processed
+% by \BibTeX. The \package{multibib} package is compatible with
+% \package{cite}, \package{inlinebib}, \package{jurabib} (to be
+% loaded before \package{multibib}), \package{natbib},
+% \package{suthesis} and \komascript\ classes.
+% \end{abstract}
+%
+%
+%
+%
+% \section{Usage Notes}
+%
+% Suppose, you have to separate your citations into two bibliographies,
+% one for primary literature and one for secondary literature. The
+% \package{multibib} package defines the |\newcite| command which
+% introduces a new family of cite and bibliography commands.
+% \begin{verbatim}
+% \newcites{sec}{Secondary Literature}
+% \end{verbatim}
+% In this case the generic macro defines four new commands,
+% suffixed by the first argument.
+% \begin{verbatim}
+% \citesec
+% \nocitesec
+% \bibliographystylesec
+% \bibliographysec
+% \end{verbatim}
+% The second argument of |\newcites| provides the title of the corresponding
+% bibliography. All these new commands accept the same parameters as
+% their standard \LaTeX\ equivalents and behave analogous to.---In the
+% example above, the bibliography for primary literature can be
+% generated by \LaTeX's standard commands. When the document is
+% processed, an auxiliary file |sec.aux| is generated, which needs to
+% be compiled through \BibTeX.
+%
+% The tiny \verb|\newcites| command is not limited to one bibliography.
+% In fact, you can generate as much bibliographies as you like (only
+% limited by the maximum number of \TeX's output files, usually~16).
+% In the following example, separate bibliographies are created for
+% own articles, submitted articles, internal reports, and other work.
+% \begin{verbatim}
+% \newcites{own,submitted,internal}%
+% {Own Work,%
+% Submitted Work,%
+% {Technical Reports, Master Theses and Ph.D. Theses}}
+% \end{verbatim}
+% Note that a title containing commas needs to be grouped. Again, the
+% bibliography for other work is generated by \LaTeX's standard
+% commands.
+%
+% \DescribeMacro{\newcites}
+% After this introductory examples, let's look at the precise
+% definition of |\newcites|. The command
+% |\newcites|\marg{suffix\_list}\marg{heading\_list} defines a new
+% family of commands for each suffix~\meta{s} in \meta{suffix\_list},
+% namely |\cite|\meta{s}, |\nocite|\meta{s},
+% |\bibliographystyle|\meta{s}, and |\bibliography|\meta{s} . The
+% \meta{suffix\_list} is a comma separated list of letters, i.e, the
+% same characters which are allowed as part of a \TeX\ command. The
+% \meta{heading\_list} is a comma separated list of words, i.e, the
+% same sort of input (including commands) that can be used as argument
+% of, e.g., |\section|. The commands |\cite|\meta{s} and
+% |\nocite|\meta{s} generate citations that appear in the
+% corresponding bibliography which is generated by
+% |\bibliography|\meta{s}. The title of this bibliography is defined
+% by the entry \meta{h} in \meta{heading\_list} at the same position
+% as \meta{s} in \meta{suffix\_list}. The individual style of the
+% bibliography can be defined by |\bibliographystyle|\meta{s}.
+%
+% \DescribeMacro{\setbiblabelwidth}
+% When using numerical reference schemes like, e.g., \textsf{plain},
+% the labels in the bibliography have sometimes the wrong width. In
+% this case you can set the desired label width using
+% |\setbiblabelwidth|\marg{number}, in the same fashion as you would
+% specify the label width with |\thebibliography|\marg{number}.
+%
+% It is also possible to let \LaTeX\ do the job by using
+% \package{multibib}'s variant \textsf{mbplain} instead of
+% \textsf{plain} as bibliography style. The modification does not
+% affect the formatting style but only internal values, such that
+% \LaTeX\ can determine the right width. More precisely,
+% \textsf{mbplain} sets the longest label to the number of entries in
+% the bibliography, while \textsf{plain} takes the smallest number
+% which has the same width as the number of entries. For example, if
+% your bibliography has 29~entries, \textsf{plain} sets the label to
+% 10 while \textsf{mbplain} sets the label to~29. This is done by
+% modifying the function \texttt{longest.label.pass}.
+% \begin{verbatim}
+% FUNCTION {longest.label.pass}
+% { number.label int.to.str$ 'label :=
+% number.label #1 + 'number.label :=
+% label width$ longest.label.width >
+% label width$ longest.label.width = %% added in mbplain
+% or %% added in mbplain
+% { label 'longest.label :=
+% label width$ 'longest.label.width :=
+% }
+% 'skip$
+% if$
+% }
+% \end{verbatim}
+% If you use other numerical styles than \textsf{plain}, you can
+% customize your favorite style accordingly.
+%
+%
+%
+% \subsection{Package Options}
+% \begin{description}
+% \item[labeled] Add the internal suffixes for each
+% bibliography as prefixes to the labels to the bibliography. For
+% example, if you define
+% \begin{verbatim}\newcites{A,B,C}%
+% {Own \LaTeX\ Work,%
+% Submitted,%
+% {Habilitations, Dissertations and Diploma Thesis}}
+% \end{verbatim}
+% and specify a numerical bibstyle
+% \verb+\bibliographystyleA{plain}+, the labels in the
+% bibliography and the cited references will be [A1], [A2], [A3],
+% \dots; analogously, \verb+\bibliographystyleB{plain}+ results
+% in labels and cited references [B1], [B2], [B3],\dots; and
+% \verb+\bibliographystyleC{plain}+ results in labels and cited
+% references [C1], [C2], [C3], \dots . This option is useful
+% together with option \option{resetlabels} and numerical
+% reference schemes.
+%
+% \item[resetlabels] When using numerical reference schemes,
+% start each bibliography with~`[1]'. Default is continuous numbering,
+% such that labels are created unambiguously.
+% \end{description}
+%
+%
+%
+% \subsection{\textnormal{\BibTeX} Processing}
+%
+% For each bibliography a corresponding auxiliary file \meta{s}|.aux|
+% is generated, that needs to be compiled through \BibTeX. This can be
+% done by the following bash-script.
+% \begin{verbatim}
+% #!/bin/bash
+% for file in *.aux ; do
+% bibtex `basename $file .aux`
+% done
+% \end{verbatim}
+%
+%
+%
+% \subsection{Limitations}
+%
+% \begin{itemize}
+% \item When numerical reference schemes are used and references to the
+% same item appear in different bibliographies, the labels
+% cannot be resolved properly. Rather, the replacement text
+% (i.e, the number) is used which is defined in the auxiliary
+% file read last.
+% \item When using author-year reference schemes, entries with the
+% same author and year combinations which appear in different
+% bibliographies get the same label.
+% In this case you have to manually add some hints to which
+% bibliography the entry refers, e.g.,\\
+% |\cite[in primary literature]{Foo:1999a}| vs.\ \\
+% |\citesec[in secondary literature]{Foo:1999b}|.\\
+% You can also edit the |.bbl| files created by \BibTeX\ and
+% add `a', `b',\dots\ to the labels, but your changes will
+% be overwritten by subsequent \BibTeX\ runs. The
+% differentiating letters `a', `b',\dots\ cannot be added
+% automatically by \BibTeX\ since the entries appear in
+% different auxiliary files.
+% \item With \package{natbib}, you cannot use numerical and
+% author-year reference schemes together. Typographically, this
+% is regarded bad style anyway.
+% \item For \package{jurabib} and \package{multibib}, the order of
+% loading is important: \package{jurabib} must be loaded before
+% \package{multibib}.
+% \end{itemize}
+%
+%
+%
+%
+% \section{Example}
+%
+% Let's now consider a complete example with two bibliographies, one
+% for \TeX\ and \LaTeX\ references and one for Postscript references.
+% For demonstration purposes, different styles are used for the two
+% references, namely \textsf{alpha} for \TeX\ and \LaTeX\ references and
+% \textsf{plain} for Postscript references. Typographically, different
+% bibliography styles are regarded as bad and therefore should be
+% avoided in real documents. The reference data are supposed to be
+% stored in a common \BibTeX\ data file |lit.bib|. Note that the
+% heading of the Postscript references is redefined with
+% |\renewcommand{\refname}|.
+
+% \begin{figure}[h]
+% \hspace*{-25mm}\begin{minipage}[t]{0.6\textwidth}
+% \toprule
+% {\let\small\footnotesize
+% \begin{verbatim}
+% \documentclass{article}
+% \usepackage{multibib}
+% \newcites{ltex}{\TeX\ and \LaTeX\ References}
+%
+% \begin{document}
+% References to the \TeX book \citeltex{Knuth:1991}
+% and to Lamport's \LaTeX\ book, which appears
+% only in the references\nociteltex{Lamport:1994}.
+% Finally a cite to a Postscript tutorial
+% \cite{Adobe:1985}.
+%
+% \bibliographystyleltex{alpha}
+% \bibliographyltex{lit}
+%
+% \renewcommand{\refname}{Postscript References}
+% \bibliographystyle{plain}
+% \bibliography{lit}
+%
+% \end{document}
+% \end{verbatim}}
+% \bottomrule
+% \end{minipage}
+% \hspace{5mm}
+% \begin{minipage}[t]{0.65\textwidth}
+% \toprule
+% \leftmargini1mm
+% \begin{quote}
+% \footnotesize
+% References to the \TeX book \cite{Knuth:1991}
+% and to Lamport's \LaTeX\ book, which appears
+% only in the references\nocite{Lamport:1994}.
+% Finally a cite to a Postscript tutorial
+% \cite{Adobe:1985}.
+% {\let\section\subsubsection
+% \renewcommand{\refname}{\TeX\ and \LaTeX\ References}
+% \begin{thebibliography}{Lam94}
+% \bibitem[Knu91]{Knuth:1991}
+% Donald~E. Knuth.
+% \newblock {\em The {\TeX} book}.
+% \newblock Addison-Wesley, Reading, Massachusetts, 1991.
+% \bibitem[Lam94]{Lamport:1994}
+% Leslie Lamport.
+% \newblock {\em {\LaTeX:} A Document Preparation System}.
+% \newblock Addison-Wesley, Reading, Massachusetts, 2 edition, 1994.
+% \end{thebibliography}}
+% {\let\section\subsubsection
+% \renewcommand{\refname}{Postscript References}
+% \begin{thebibliography}{1}
+% \bibitem{Adobe:1985}
+% {Adobe {S}ystem {I}ncorporated}.
+% \newblock {\em Postscript Language Tutorial and Cookbook}.
+% \newblock Addison-Wesley, Reading, Massachusetts, 1985.
+% \end{thebibliography}}
+% \end{quote}
+% \vspace{3.25mm}
+% \bottomrule
+% \end{minipage}
+% \caption{Example input and output.}
+% \end{figure}
+%
+% To process your document, three runs of \LaTeX\ and two runs of \BibTeX\
+% are required.
+%
+% \vbox{%
+% \begin{verbatim}
+% latex mydoc
+% bibtex mydoc
+% bibtex ltex
+% latex mydoc
+% latex mydoc
+% \end{verbatim}}
+%
+%
+%
+%
+% \section{Notes for Class and Package Writers}
+%
+% Packages such as \package{cite} or \package{natbib} which modify the
+% internal macro |\@citex| called from |\cite| by, e.g., changing
+% the number of arguments, and/or define new variants of |\cite|, such as
+% \package{natbib}'s |\citep|, deserve a special handling to ensure
+% compatibility to \package{multibib}. In the first case, the problem
+% arise because \package{multibib}'s redefinition of |\@citex| to write to
+% a new auxiliary file |\@newciteauxhandle| instead of writing to
+% |\@auxout| is overwritten. In the second case, the problem arise
+% because \package{multibib} is unaware of additional cite commands and
+% thus cannot define the new variants. The problems can
+% be solved by using the compatibility mechanisms
+% supported by \package{multibib} as described in the following.
+%
+%
+%
+% \subsection{Packages which modify \macrott{@citex}}
+%
+% Packages which modify |\@citex| can be made compatible to
+% \package{multibib} by making the following three changes to the code:
+% \begin{enumerate}
+% \item Add the following code:
+% \begin{verbatim}
+% \providecommand\@newciteauxhandle{\@auxout}
+% \def\@restore@auxhandle{\gdef\@newciteauxhandle{\@auxout}}
+% \AtBeginDocument{%
+% \@ifundefined{newcites}{\global\let\@restore@auxhandle\relax}{}}
+% \end{verbatim}
+% The first line defines |\@newciteauxhandle| to the default value
+% |\@auxout| if |\@newciteauxhandle| is not already defined. The
+% second line defines macro |\@restoreauxhandle| which sets
+% |\@newciteauxhandle| to its default value. The next two lines
+% |\let| macro |\@restoreauxhandle| to |\relax| in case
+% \package{multibib} is not loaded and |\newcites| is undefined.
+% \item In the redefinitions of |\@citex| replace |\@auxout| by
+% |\@newciteauxhandle|.
+% \item At the end of the each |\@citex| redefinitions add the macro
+% |\@restoreauxhandle|.
+% \end{enumerate}
+% At present, packages \package{cite} and \package{jurabib} use this
+% compatibility mechanism.
+%
+%
+%
+% \subsection{Packages which define new cite commands}
+%
+% Packages which define new cite commands can add these commands using
+% |\@mb@citenamelist|. The default definition, which
+% already includes \package{natbib}'s cite variants, is given below.
+% \begin{verbatim}
+% \def\@mb@citenamelist{cite,citep,citet,citealp,citealt}
+% \end{verbatim}
+% A package which defines, e.g, a new cite command |\footcite| informs
+% \package{multibib} about this command by defining
+% \begin{verbatim}
+% \def\@mb@citenamelist{cite,citep,citet,citealp,citealt,footcite}
+% \end{verbatim}
+% At present, package \package{jurabib} use this compatibility mechanism.
+%
+%
+%
+% \subsection{Advantages of the compatibility mechanism}
+%
+% Compared to a solution where all compatibility patching is done by
+% \package{multibib}, such as is presently the case for
+% \package{natbib}, the above solution has several advantages:
+% \begin{enumerate}
+% \item The mechanisms provides a general solution for several
+% packages. Any new package can be made compatible with \package{multibib}
+% without the need for a new release of \package{multibib}.
+% \item Existing packages can change the number of arguments to
+% |\@citex| or introduce new cite macros without the need to change
+% \package{multibib}.
+% \item If |\@citex| needs to read the next input character, this
+% character is available and not masked by \package{multibib}'s |let|s
+% which follow the |\@std@citex|. This is important for the
+% \package{cite} package.
+% \item More efficient code. A single |\let| in |\@restore@auxhandle|
+% instead of four.
+% \end{enumerate}
+%
+%
+%
+%
+% \section{Brief Discussion of Related Packages}
+%
+% \paragraph{Similar packages.} The \package{bibtopic} package addresses the
+% same issue as the present package, using a completely different
+% approach. The user has to provide a separate \BibTeX\ data file
+% |liti.bib| for each bibliography and can generate the corresponding
+% bibliography within a |btSect| environment.
+%
+% \begin{verbatim}
+% \begin{btSect}{liti}
+% \btPrintCited
+% \end{btSect}
+% \end{verbatim}
+%
+% Using |\btPrintNotCited|, a complementary bibliography showing all
+% entries not cited in the document can also be generated.
+% Additionally, an environment |btunit| is defined to generate
+% bibliographies for different units of the text, thus partly
+% offering the functionality of packages like \package{bibunits} or
+% \package{chapterbib}. Besides its powerful functionality, the
+% \package{bibtopic} package has some drawbacks and restrictions:
+% \begin{itemize}
+% \item less intuitive user interface
+% \item the user has to split his \BibTeX\ data files
+% \item bibliography styles that put some material between the begin
+% of\\ |thebibliography| and the first |\bibitem| deserve a
+% special handling
+% \item does not work with bibliography style |unsorted|
+% \item and more, see Sec.~`Restrictions' of the \package{bibtopic}
+% documentation
+% \end{itemize}
+%
+% Finally, due to its large size (1059 lines) and implementation
+% approach, processing is probably slower. In a nutshell,
+% \package{bibtopic} does the following: for each bibliography, a
+% |\citation{*}| command is written to a new, corresponding auxiliary
+% file, such that \emph{all} entries of the \BibTeX\ data base are
+% extracted. Then, by reimplementing the |\bibitem| command, all items
+% which do not occur in a special list of labels, produced by the cite
+% commands, are deleted. Obviously, doing part of \BibTeX's work
+% requires some amount of memory and time (and programming skills,
+% noteworthy |;-)|).
+%
+%
+% \paragraph{Complementary packages.} The packages \package{bibunits}
+% and \package{chapterbib} provide commands to generate multiple
+% bibliographies, too. The main difference is, that with these
+% packages a single bibliography is generated for multiple, but
+% different parts of the text. Therefore, within a certain unit, i.e.,
+% part of the text, citations can only be made to a single,
+% corresponding bibliography. On the other hand, with
+% \package{multibib}, within the same (but single) part, citations can
+% be generated for multiple bibliographies.
+%
+% \paragraph{Analogous packages.} The \package{multind} package allows
+% multiple indexes.
+%
+%
+%
+%
+% \section{Acknowledgments}
+%
+% The author thanks Donald Arseneau for suggesting the compatibility mechanism
+% for packages which modify |\@citex|. Further, the author
+% acknowledges the contributions of numerous people, in particular
+% Jens Berger and Frank Mittelbach, whose suggestions and bug reports have
+% helped to improve \package{multibib}.
+%
+%
+%
+%
+% \StopEventually{\PrintIndex\PrintChanges}
+%
+%
+%
+%
+% \section{The Macros}
+%
+% One paradigm which guided the development of the code was to use
+% standard \LaTeX\ commands as much as possible, and to customize their
+% behavior using |\let|.
+%
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+%
+% \subsection{Option Handling}
+% \changes{v1.0i}{2000/01/12}{New option \option{resetlabels}.}
+%
+% \begin{macro}{\ifcontinuouslabels}
+% Define a new if to switch between continuous labeling of
+% bibliographies (default) and start of labels with~`[1]'. The latter
+% can be activated with option \option{resetlabels}.
+% \begin{macrocode}
+\newif\ifcontinuouslabels
+\continuouslabelstrue
+\DeclareOption{resetlabels}{\continuouslabelsfalse}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{labeled}
+% \changes{v1.3d}{2005/10/25}{Define option \option{labeled}.}
+%
+% Define a new option to add the internal suffixes for each
+% bibliography as labels to the bibitems.
+% \begin{macrocode}
+\newif\iflabeled
+\labeledfalse
+\DeclareOption{labeled}{\labeledtrue}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \noindent Finally, process all package options.
+%
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+%
+% \subsection{Preliminaries}
+%
+% \begin{macro}{\mylop}
+% \begin{macro}{\mylopoff}
+% Variation of |\lop|, using `|,|' as separator instead of `|\|'
+% to extract the elements in the first argument of |\newcites|
+% (cf.~The \TeX book, p. 378).
+% \begin{macrocode}
+\def\mylop#1\to#2{\expandafter\mylopoff#1\mylopoff#1#2}
+\long\def\mylopoff#1,#2\mylopoff#3#4{\def#4{#1}\def#3{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@newciteauxhandle}
+% \changes{v1.1b}{2001/10/10}{Handle removed.}
+%
+% Define a new handle of the auxiliary file for all |\cite| and
+% |\nocite| commands, standard as well as newly defined. For the
+% standard commands, this handle is let to |\auxout|. Since version
+% 1.1b the definition |\let\@newciteauxhandle\@auxout| is no longer
+% needed since below we reset |\@citex| to its standard value
+% after each call of |\mb@@citex|.
+% \end{macro}
+%
+%
+% \begin{macro}{\std@@citex}
+% \begin{macro}{\mb@@citex}
+% \changes{v1.0f}{2000/01/10}{Update to \package{natbib} v7.0:
+% save \macrott{@auxout} before
+% redefinition instead of encapsulation
+% in braces.}
+% \changes{v1.1b}{2001/10/10}{\macrott{global} setting of
+% \macrott{@save@auxout}; setting of \macrott{newciteauxhandle}
+% removed; instead, reset \macrott{citex} to its standard
+% version.}
+% \changes{v1.2a}{2003/07/15}{New definition of \macrott{mb@@citex}
+% only if \macrott{@newciteauxhandle} is not already
+% defined by compatible packages.}
+%
+%
+% Definitions of |\mb@@citex| to replace |\@citex| in the definition of
+% the various |cite| commands. The idea is to write to a specific file
+% referred to |\@newciteauxhandle| instead of |\@auxout|. Below in the
+% definition of the specific |\cite<s>| and |\nocite<s>| commands,
+% |\@newciteauxhandle| is set to the new auxiliary files |<s>.aux|. If
+% |\@newciteauxhandle| is already defined by compatible packages, simply
+% |\let| macro |\mb@@citex| to |\@citex|
+%
+% If \package{natbib} is loaded, a variant of |\@citex| with an
+% additional optional argument is needed. Macro |\NAT@set@cites|
+% invokes \package{natbib}'s |\cite| and |\@citex| definitions.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{natbib}{%
+ \NAT@set@cites
+ \let\std@@citex\@citex
+ \def\mb@@citex[#1][#2]#3{%
+ \global\let\@save@auxout\@auxout
+ \let\@auxout\@newciteauxhandle
+ \std@@citex[#1][#2]{#3}%
+ \let\@auxout\@save@auxout
+ \let\@citex\std@@citex}%
+ }{% else
+ \@ifundefined{@newciteauxhandle}{% not defined by compatible packages
+ \let\std@@citex\@citex
+ \def\mb@@citex[#1]#2{{%
+ \let\@auxout\@newciteauxhandle
+ \std@@citex[#1]{#2}}%
+ \let\@citex\std@@citex}%
+ }{\let\mb@@citex\@citex}%
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@newusecounter}
+% \begin{macro}{\newusecounter}
+% Do not reset counter to zero at begin of bibliography. This
+% generates continuous numbering of references through all new
+% bibliographies to ensure that numerical references are created
+% unambiguously. To reset the counter only for the \emph{first}
+% bibliography, |\newusecounter| is initially let to |\usecounter|.
+% Below, in the definition of the new bibliographies,
+% |\newusecounter| is let to |\@newusecounter|.
+% \begin{macrocode}
+\def\@newusecounter#1{\@nmbrlisttrue\def\@listctr{#1}}
+\let\newusecounter\usecounter
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\std@bibliography}
+% \begin{macro}{\bibliography}
+% \changes{v1.0a}{1999/07/27}{Continuous numbering also for
+% \macrott{bibliography}.}
+% \changes{v1.0i}{2000/01/12}{Change to respond to option
+% \option{resetlabels}.}
+%
+% To ensure continuous numbering, the |\newusecounter| is
+% redefined also for the standard |\bibliography|, same as for the
+% new |\bibliography|\meta{s} macros.
+% \begin{macrocode}
+\let\std@bibliography\bibliography
+\def\bibliography#1{%
+ \ifcontinuouslabels
+ \let\usecounter\newusecounter
+ \fi
+ \std@bibliography{#1}%
+ \ifcontinuouslabels
+ \global\let\newusecounter\@newusecounter
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\mb@biblabelwidth}
+% \begin{macro}{\setbiblabelwidth}
+% \changes{v1.0e}{1999/12/12}{New macro.}
+%
+% The macro |\setbiblabelwidth| explicitly sets the width of the
+% labels in the bibliography. An internal counter
+% |\mb@biblabelwidth| is introduced and a macro |\setbiblabelwidth|
+% which simply assigns its argument to the new counter. The value
+% of the counter is then used in \package{multibib}'s modification
+% of |\thebibliography|.
+% \begin{macrocode}
+\newcount\mb@biblabelwidth
+\newcommand\setbiblabelwidth[1]{\mb@biblabelwidth #1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\std@thebibliography}
+% \begin{macro}{\thebibliography}
+% \changes{v1.0b}{1999/07/30}{Correct label width for numerical
+% reference schemes.}
+% \changes{v1.0e}{1999/12/12}{Works with \macrott{setbiblabelwidth}.}
+% \changes{v1.0i}{2000/01/14}{No change of label width for option
+% \option{resetlabels}.}
+% \changes{v1.0k}{1999/01/14}{\package{suthesis} compatibility.}
+% \changes{v1.3a}{2004/02/09}{Natbib specific definition of
+% thebibliography, modified to use \macrott{usecounter}.}
+%
+% The argument of |\thebibliography| determines the width of the
+% labels in the bibliography. First it is checked if the parameter
+% is a number. If it is not a number, we do not have to care about
+% setting label widths and can simply call |\std@thebibliography|.
+% Otherwise we check if the label width is not set explicitly,
+% i.e., |\mb@biblabelwidth=0|. In this case the label width is determined
+% as the the last label in the previous bibliography |\c@enumiv|
+% plus the number of labels in the current bibliography |#1|
+% (provided the bibliography style computes the values right,
+% like \textsf{mbplain}). If the value is set explicitly
+% by~|\mb@biblabelwidth|, this value is used and then reset to zero
+% such that only the labels in the current bibliography are affected.
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{suthesis}%
+ {\def\thebibliography#1{%
+ \newpage
+ \addcontentsline{toc}{chapter}{\bibname}%
+ \@ldthebibliography{#1}}}%
+ {}%
+ \@ifpackageloaded{natbib}%
+ {%
+
+
+\renewenvironment{thebibliography}[1]{%
+ \bibsection\parindent \z@\bibpreamble\bibfont\list
+ {\@biblabel{\arabic{NAT@ctr}}}{\@bibsetup{#1}%
+ \usecounter{NAT@ctr}}% %% only changed here to usecounter
+ \ifNAT@openbib
+ \renewcommand\newblock{\par}
+ \else
+ \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
+ \fi
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax
+ \let\citeN\cite \let\shortcite\cite
+ \let\citeasnoun\cite
+ }{\def\@noitemerr{%
+ \PackageWarning{natbib}
+ {Empty `thebibliography' environment}}%
+ \endlist\vskip-\lastskip}
+
+ \let\std@thebibliography\thebibliography
+ \def\thebibliography#1{%
+ \@isnumber{#1}%
+ {\ifnum\mb@biblabelwidth=0
+ \@tempcnta\c@NAT@ctr %% changed here to c@NAT@ctr
+ \ifcontinuouslabels
+ \advance\@tempcnta#1%
+ \fi
+ \std@thebibliography{\@arabic\@tempcnta}%
+ \else
+ \std@thebibliography{\@arabic\mb@biblabelwidth}%
+ \global\mb@biblabelwidth 0
+ \fi}%
+ {\std@thebibliography{#1}}%
+ }%
+ }%
+ {% else, natbib not loaded
+ \let\std@thebibliography\thebibliography
+
+ \def\thebibliography#1{%
+ \@isnumber{#1}%
+ {\ifnum\mb@biblabelwidth=0
+ \@tempcnta\c@enumiv
+ \ifcontinuouslabels
+ \advance\@tempcnta#1%
+ \fi
+ \std@thebibliography{\@arabic\@tempcnta}%
+ \else
+ \std@thebibliography{\@arabic\mb@biblabelwidth}%
+ \global\mb@biblabelwidth 0
+ \fi}%
+ {\std@thebibliography{#1}}%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@isnumber}
+% \changes{v1.0g}{2000/01/10}{Empty string is not handled as number.}
+% \changes{v1.1d}{2001/01/04}{Execute \macrott{@scannumber} in
+% \macrott{hbox}.}
+% \changes{v1.3b}{2004/02/10}{\macrott{isnumber} changed to accept
+% arguments with \macrott{fi}, e.g.,
+% {\macrott{iffalse}{bjko}\macrott{fi}}.}
+%
+% Macro |\@isnumber| behaves as follows: If |#1| is a number (which
+% may contain blanks at arbitrary positions), |#2| is executed,
+% else |#3|.
+%
+% \begin{macrocode}
+\newcommand{\@isnumber}[3]{%
+ \def\argdef{#1}%
+ \edef\argedef{#1}%
+ \ifx\argedef\empty
+ #3
+ \else
+ \ifx\argdef\argedef
+ \global\@tempswafalse
+ \setbox\@tempboxa=\hbox{\@scannumber#1\plugh}%
+ \if@tempswa#2\else#3\fi
+ \else
+ #3
+ \fi
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@scannumber}
+% \changes{v1.1d}{2001/01/04}{Initialize \macrott{plugh} with
+% \macrott{relax}; simply \macrott{relax}
+% when the \macrott{testchar} is not a digit
+% instead of \macrott{@gobbletillplugh}.}
+%
+% Macro |\@scannumber| evaluates the single characters
+% of its argument. If all characters are digits or
+% blanks,|\@scannumber| is recursively evoked until it finally
+% reads |\plugh| which marks the end of the argument (in
+% macro |\@isnumber|) and sets |\@tempswatrue| which is then used
+% in |\@isnumber|. If the tested character is not a digit, the
+% macro exits, leaving |\@tempswa| unchanged.
+%
+% \begin{macrocode}
+\let\plugh\relax
+\newcommand{\@scannumber}[1]{%
+ \let\testchar#1%
+ \ifx \testchar 0\let\next\@scannumber
+ \else\ifx \testchar 1\let\next\@scannumber
+ \else\ifx \testchar 2\let\next\@scannumber
+ \else\ifx \testchar 3\let\next\@scannumber
+ \else\ifx \testchar 4\let\next\@scannumber
+ \else\ifx \testchar 5\let\next\@scannumber
+ \else\ifx \testchar 6\let\next\@scannumber
+ \else\ifx \testchar 7\let\next\@scannumber
+ \else\ifx \testchar 8\let\next\@scannumber
+ \else\ifx \testchar 9\let\next\@scannumber
+ \else\ifx \testchar \plugh \let\next\relax \global\@tempswatrue
+ \else \let\next\relax
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \next}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@gobbletillplugh}
+% \changes{v1.1d}{2001/01/04}{Macro removed.}
+%
+% Macro |\@gobbletillplug| gobbles all input up to (and including)
+% |\plugh| by defining |\def\@gobbletillplugh#1\plugh{}|. Since
+% version 1.1d, |\@scannumber| is evaluated in a |\hbox| and the
+% gobbling is no longer needed.
+% \end{macro}
+%
+%
+% \begin{macro}{\mb@addtocontents}
+% \changes{v1.0d}{1999/08/19}{Add bibliography name to table of contents.}
+%
+% Some styles like \package{suthesis} or \komascript\ classes like
+% \class{scrartcl} with option \option{bibtotoc} redefine
+% |\bibliography| such that the heading of the bibliography appears
+% in the table of contents. Entries for the table of contents are
+% generated by writing the appropriate information to |\@auxout|.
+% Because |\@auxout| is locally redefined when the bibliography is
+% read, entries go to the wrong file. Therefore, a macro
+% |\mb@addtocontents| is introduced which writes to |\temp@auxout|.
+% Below, in the definition of the new |\bibliography|\meta{s},
+% |\mb@addtocontents| replaces the standard |\addtocontents|, and
+% |\temp@auxout| is set to the default |\@auxout|.
+% \begin{macrocode}
+\long\def\mb@addtocontents#1#2{%
+ \protected@write\temp@auxout
+ {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}%
+ {\string\@writefile{#1}{#2}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\bibname}
+% \changes{v1.0h}{2000/01/10}{Changed to evoke \macrott{refname} instead.}
+% \changes{v1.0j}{2000/01/13}{New implementation: Check if
+% \macrott{bibname} is undefined
+% instead of checking if class
+% \class{book} or \class{report} is loaded.}
+% \changes{v1.1e}{2001/01/04}{Macro removed.}
+%
+% Package~\package{multibib} redefines the headings of the new
+% bibliographies using |\refname|. Some classes like \class{book} and
+% \class{report} use |\bibname| instead of |\refname|. Instead of
+% changing the definition of |\bibname|, we simply define
+% |\refname| in the same was as |\bibname| in the |newcites| loop below.
+% \end{macro}
+%
+%
+% \begin{macro}{\@mb@citenamelist}
+% \changes{v1.2b}{2003/09/22}{Macro added.}
+%
+% Define list of cite commands to be processed within the
+% |\newcites| loop below. If already defined by other packages,
+% |\relax|.
+% \begin{macrocode}
+\@ifundefined{@mb@citenamelist}%
+ {\def\@mb@citenamelist{cite,citep,citet,citealp,citealt}}%
+ {\relax}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{The \texttt{newcites} loop}
+%
+% \begin{macro}{\newcites}
+% Loop over all headings in \meta{heading\_list}. The current
+% heading is stored in |\@newrefname|, the corresponding suffix is
+% stored in |\@suffix|.
+% \begin{macrocode}
+\def\newcites#1#2{%
+ \def\@suffixlist{#1,}%
+ \@for\@newrefname:=#2\do{%
+ \mylop\@suffixlist\to\@suffix
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@refname<s>}
+% Define the reference title |\protected|, such that the title can
+% contain control sequences as, e.g., in the title `\LaTeX\
+% References'.
+% \begin{macrocode}
+ \expandafter\protected@edef\csname refname\@suffix\endcsname
+ {\@newrefname}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@auxout<s>}
+% \begin{macro}{\@auxout<s>name}
+% \changes{v1.0c}{1999/08/19}{\macrott{makeatletter} when input new
+% auxiliary files.}
+%
+% Define new write. Input the auxiliary file if it exists before
+% opening it, to read the replacement text for the |\cite| commands
+% which is generated by |\bibcite|. Because some styles (like
+% \package{inlinebib.sty}) write command names containing an |@| to
+% the auxiliary files, |\makeatletter| is locally set.
+% \begin{macrocode}
+ \if@filesw
+ \expandafter\newwrite\csname @auxout\@suffix\endcsname
+ \expandafter\edef\csname @auxout\@suffix name\endcsname{\@suffix}%
+ \begingroup
+ \makeatletter
+ \@input@{\csname @auxout\@suffix name\endcsname .aux}%
+ \endgroup
+ \immediate\openout\csname @auxout\@suffix\endcsname
+ \csname @auxout\@suffix name\endcsname .aux
+ \fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Define new |\cite| and |\nocite|. For |\nocite|, we simple let
+% |\@auxout| to the new auxiliary file. For |\cite|, this
+% approach does not work because |\cite| can have an optional
+% argument, so we cannot enclose the redefinition of |\@auxout| in
+% braces. We slightly modify |\@citex| (see above) to use a special
+% handle, |\@newciteauxhandle|, which is let to the new auxiliary file.
+%
+% \begin{macro}{\cite<s>}
+% \changes{v1.2b}{2003/09/22}{Loop over \macrott{@mb@citenamelist} added.}
+%
+% For each \meta{citename} in |\@mb@citenamelist|, define
+% \package{multibib}'s new \meta{citename}\meta{s} commands. For
+% example, if \meta{citename} := |cite| and if \meta{s} := |own|, a command
+% |\citeown| is defined as:
+% \begin{verbatim}
+% \def\citeown{%
+% \let\@citex\mb@@citex
+% \let\@newciteauxhandle\@auxoutown
+% \cite}
+% \end{verbatim}
+% \begin{macrocode}
+ \@for\@citename:=\@mb@citenamelist\do{%
+ \expandafter\edef\csname \@citename\@suffix\endcsname{%
+ \let\noexpand\@citex\noexpand\mb@@citex
+ \let\noexpand\@newciteauxhandle\csname @auxout\@suffix\endcsname
+ \noexpand\csname\@citename\endcsname}%
+ }%
+%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\nocite<s>}
+% \changes{v1.2c}{2004/01/23}{\macrott{let} \macrott{@citex}
+% \macrott{mb@@citex} removed.}
+%
+% Define new |\nocite|\meta{s}, e.g., if \meta{s} := |own|, a
+% command |\nociteown| is defined as:
+% \begin{verbatim}
+% \def\nociteown##1{{%
+% \let\@auxout\@auxoutown
+% \nocite{##1}}}
+% \end{verbatim}
+% \begin{macrocode}
+ \expandafter\edef\csname nocite\@suffix\endcsname##1{{%
+ \let\noexpand\@auxout\csname @auxout\@suffix\endcsname
+ \noexpand\nocite{##1}}}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\bibitem<s>}
+%
+% \changes{v1.3d}{2005/10/25}{Define a bibliography specific
+% version of \macrott{@bibitem} and
+% \macrott{@biblabel} if \option{labeled} is
+% active.}
+%
+% \begin{macrocode}
+ \iflabeled % if option labeled
+ \expandafter\edef\csname @bibitem\@suffix\endcsname##1{%
+ \noexpand\item
+ \noexpand\if@filesw \noexpand\immediate\noexpand\write\noexpand\@auxout
+ {\noexpand\string\noexpand\bibcite{##1}%
+ {\@suffix\noexpand\the\noexpand\value{\noexpand\@listctr}}}%
+ \noexpand\fi
+ \noexpand\ignorespaces}%
+ \expandafter\edef\csname @biblabel\@suffix\endcsname##1{[\@suffix##1]}%
+ \fi % end if option labeled
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\bibliography<s>}
+% \changes{v1.0i}{2000/01/12}{Remove setting of \macrott{usecounter} and
+% \macrott{newusecounter} which is done
+% in redefined \macrott{bibliography}.}
+% \changes{v1.1e}{2001/01/04}{Definition of \macrott{bibname} analogously
+% to \macrott{refname}.}
+% \changes{v1.3d}{2005/10/25}{Activate the bibliography specific
+% versions of \macrott{@bibitem} and
+% \macrott{@biblabel} if \option{labeled} is
+% active.}
+%
+% Define new |\bibliography|\meta{s} equivalents.
+% The standard |\bibliography| macro does
+% two things: The bibdata file is written to the auxiliary file
+% |\@auxout| and the |.bbl| file |\jobname.bbl| is inputed. For
+% |\bibliography|\meta{s}, we thus let both |\@auxout|
+% and |\jobname| refer to the new auxiliary file \meta{s}|.aux|.
+% Since some styles and classes write the heading
+% of the bibliography to the table of contents, the old meaning of
+% |\@auxout| is saved in |\temp@auxout| and |\addtocontents| is locally
+% replaced by \package{multibib}s variant |\mb@addtocontents|
+% (defined above) which writes to |\temp@auxout| instead of
+% |\auxout|. Further, the heading of the bibliography generated by
+% |\refname| or |\bibname| depending on the class is set to the
+% particular heading of |\bibliography|\meta{s}. After this
+% redefinitions, the standard |\bibliography| can be evoked.
+% Extra braces are needed to encapsulate the various |\let|s.
+% \begin{macrocode}
+ \expandafter\edef\csname bibliography\@suffix\endcsname##1{{%
+ \let\noexpand\temp@auxout\noexpand\@auxout
+ \let\noexpand\addtocontents\noexpand\mb@addtocontents
+ \let\noexpand\@auxout\csname @auxout\@suffix\endcsname
+ \let\noexpand\jobname
+ \expandafter\noexpand\csname @auxout\@suffix name\endcsname
+ \let\noexpand\refname
+ \expandafter\noexpand\csname refname\@suffix\endcsname
+ \let\noexpand\bibname
+ \expandafter\noexpand\csname refname\@suffix\endcsname
+ \iflabeled
+ \let\noexpand\@bibitem
+ \expandafter\noexpand\csname @bibitem\@suffix\endcsname
+ \let\noexpand\@biblabel
+ \expandafter\noexpand\csname @biblabel\@suffix\endcsname
+ \fi
+ \noexpand\bibliography{##1}%
+ }}
+% \end{macrocode}
+% \end{macro}
+%
+% \newpage
+%
+% \begin{macro}{\bibliographystyle<s>}
+% \changes{v1.3c}{2004/02/10}{Write directly the \macrott{bibstyle}
+% macro to the specific auxfile instead of redefining a
+% auxhandle and then using the standard
+% \macrott{bibliographystyle} macro.}
+%
+% Define new |\bibliographystyle|\meta{s} equivalents.
+% \begin{macrocode}
+ \expandafter\edef\csname bibliographystyle\@suffix\endcsname##1{%
+ \noexpand\if@filesw
+ \noexpand\immediate\noexpand\write\csname @auxout\@suffix\endcsname
+ {\noexpand\string\noexpand\bibstyle{##1}}%
+ \noexpand\fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Close loop and end macro.
+% \begin{macrocode}
+ }%
+}
+% \end{macrocode}
+%
+%
+% Finally, restrict the use of |\newcites| to the preamble such that
+% the auxiliary files can be |\@input@|ed.
+% \begin{macrocode}
+\@onlypreamble\newcites
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \PrintIndex
+% \PrintChanges
+% \Finale
+%
diff --git a/macros/latex/contrib/multibib/multibib.ins b/macros/latex/contrib/multibib/multibib.ins
new file mode 100644
index 0000000000..55ea1edb12
--- /dev/null
+++ b/macros/latex/contrib/multibib/multibib.ins
@@ -0,0 +1,58 @@
+%
+% This is file `multibib.ins',
+% for extracting package files from the original source file
+% `multibib.dtx'.
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt and version 1.3 or later is
+% part of all distributions of LaTeX version 2003/12/01 or later.
+%
+% To produce the package run multibib.ins through LaTeX.
+%
+% Copyright (C) 2008 Thorsten Hansen
+
+\input docstrip
+
+\preamble
+
+IMPORTANT NOTICE:
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3 of this license
+or any later version. The latest version of this license is in
+http://www.latex-project.org/lppl.txt and version 1.3 or later is
+part of all distributions of LaTeX version 2003/12/01 or
+later.
+
+This work has the LPPL maintenance status "maintained". The Current
+Maintainer of this work is Thorsten Hansen.
+
+Any modified versions of this file must be renamed with new filenames
+distinct from multibib.sty.
+
+This is a generated file. It may not be distributed without the
+original source file \inFileName.
+
+To produce the documentation run \inFileName through LaTeX.
+
+
+\endpreamble
+
+\generate{\file{multibib.sty}{\from{multibib.dtx}{package}}}
+
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* `multibib.sty'}
+\Msg{*}
+\Msg{* To produce the documentation run multibib.dtx through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+
+
+\endbatchfile
diff --git a/macros/latex/contrib/multibib/multibib.pdf b/macros/latex/contrib/multibib/multibib.pdf
new file mode 100644
index 0000000000..2e230e2164
--- /dev/null
+++ b/macros/latex/contrib/multibib/multibib.pdf
Binary files differ