% \iffalse
% jurabib.dtx
%
% Docstrip archive, run jurabib.ins through LaTeX.
%
% Run jbgerdoc.tex through LaTeX for German documentation.
%
% Run jbendoc.tex through LaTeX for English documentation.
%
% Copyright (C) 1999-2004 Jens Berger
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or (at your option) any later version.
%
% This program 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.  See the
% GNU General Public License for more details.
% 
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
%
%<*driver>
\documentclass{ltxdoc}
\begin{document}\DocInput{jurabib.dtx}\end{document}
%</driver>
% \fi
% \ClassError{jurabib}{The German jurabib documentation will no longer be\MessageBreak
%               produced by LaTeX'ing the file jurabib.dtx!\MessageBreak
%               Please use `latex jbgerdoc.tex' instead. You will\MessageBreak
%               find this file on CTAN and on www.jurabib.org}%
% \endinput
%<*package>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{jurabib}[2004/01/25 v0.6 Extended citations]
\RequirePackage{ifthen}
\RequirePackage{calc}
\RequirePackage{keyval}
\RequirePackage{url}
\RequirePackage{array}
\newcommand*{\jb@pkg@name}{jurabib}
\newif\ifjb@abbrv
\newif\ifjbidemabbrvwithperiod
\newif\ifjb@all@titles
\newif\ifjb@all@full
\newif\ifjb@allow@adding@of@pagerange
\newif\ifjb@allow@adding@of@pagerange@for@first@cite
\newif\ifjb@allow@dot@for@lookat
\newif\ifjb@allow@lookat@for@fullcite
\newif\ifjb@allow@howcited@art@period
\newif\ifjb@allow@hyper@cite@nobib
\newif\ifjb@allow@hyper@cite
\newif\ifjb@allow@nobib
\newif\ifjb@alphanum
\newif\ifjb@always@pageranges
\newif\ifjbaltformat
\newif\ifjb@author@year
\newif\ifjb@babel
\newif\ifjb@backref
\newif\ifjb@before@title@separator
\newif\ifjb@bib@hang
\newif\ifjb@bibetal\jb@bibetaltrue
\newif\ifjb@biblikecite
\newif\ifjb@bibssed
\newif\ifjb@change@fonts@for@fullcite
\newif\ifjb@cite
\newif\ifjb@cite@title
\newif\ifjb@cite@no@title
\newif\ifjb@annotator@last
\newif\ifjb@compare@title@fields
\newif\ifjb@comma@before@rest
\newif\ifjb@compressed@bib
\newif\ifjb@citetoend
\newif\ifjbcross
\newif\ifjb@debug
\newif\ifjb@debug@br
\newif\ifjb@do@authors@index
\newif\ifjb@do@editors@index
\newif\ifjb@do@organizations@index
\newif\ifjb@dot
\newif\ifjb@dynamic@author@fonts
\newif\ifjb@dynamic@crossrefs
\newif\ifjb@edby
\newif\ifjb@endnotes
\newif\ifjbetal
\newif\ifjb@fn
\newif\ifjb@foot
\newif\ifjb@footnote@period
\newif\ifjb@footnote@period@ibidem
\newif\ifjb@first@cite
\newif\ifjb@firstcite@full
\newif\ifjb@first@author@reversed
\newif\ifjb@formatted@pages
\newif\ifjb@fullcite@again
\newif\ifjblookforgender
\newif\ifjb@howcited
\newif\ifjb@howcited@all
\newif\ifjb@howcited@normal
\newif\ifjb@howcited@compare
\newif\ifjb@howcited@multiple
\newif\ifjb@humanbst@loaded
\newif\ifjb@hyper
\newif\ifjb@ibidem
\newif\ifjb@ibidem@pagewise
\newif\ifjb@ibidem@double@pagewise
\newif\ifjb@ibidem@with@name
\newif\ifjb@ibidem@with@short@name
\newif\ifjb@ibidem@with@name@and@title
\newif\ifjb@ibidem@with@name@and@title@auto
\newif\ifjb@same@author@different@work
\newif\ifjb@idem
\newif\ifjb@idem@pagewise
\newif\ifjb@idem@double@pagewise
\newif\ifjb@ignore@varioref
\newif\ifjb@index
\newif\ifjb@index@bib
% NEW 0.6
\newif\ifjb@index@only@first@authors
\newif\ifjb@index@only@first@editors
\newif\ifjb@index@only@first@organization
\newif\ifjb@jura
\newif\ifjb@jox
\newif\ifjb@jureco
\newif\ifjb@kv@recognized
\newif\ifjb@lookat
\newif\ifjb@no@bib\global\jb@no@bibfalse
\newif\ifjb@no@lookat@for@bib
\newif\ifjb@no@nested@crossrefs
\newif\ifjb@no@title@replace
\newif\ifjb@no@firstname
\newif\ifjb@numbered@bib
%\newif\ifjb@natbib@order
\newif\ifjb@old@order
% NEW 0.6 switch to enable \bibel{<label>} in bibliography when using a natbib command which uses <year>
\newif\ifjb@nat@use@year@command
\newif\ifjb@noauthorforcitetitle
\newif\ifjbnoformatafterstartpage
\newif\ifjb@opcit
\newif\ifjb@@opcit
\newif\ifjb@period
\newif\ifjb@ragged
\newif\ifjb@bibformat@ibidem
\newif\ifjb@reverse@all@names
\newif\ifjb@reverse@names@in@citation
\newif\ifjb@same@fullauthor
\newif\ifjb@see
\newif\ifjb@second@extra@space
\newif\ifjb@super
\newif\ifjb@suppress@dot@for@howcited
\newif\ifjb@third@extra@space
\newif\ifjb@tabular
\newif\ifjb@tested@pageranges
\newif\ifjb@save@allfull@status
\newif\ifjb@save@lookat@status
\newif\ifjb@suppress@etal@dot
\newif\ifjb@ssed@after@author
\newif\ifjb@ssed@all
\newif\ifjb@ssed@commented
\newif\ifjb@ssed@kerning@wanted
\newif\ifjb@ssed@recent@kerned
\newif\ifjb@ssed@mult@works
\newif\ifjb@ssed@sw
\newif\ifjb@starred@cite
\newif\ifjb@start@page
\newif\ifjb@switchidemofflocally
\newif\ifjb@url
\newif\ifjbuseidemhrule
\newif\ifjbusehowcitedforcite
\newif\ifjb@vario
\newif\ifjbweareinbib
\newif\ifjbweareinendnotes
\newif\ifjbweareinhowcited
\newif\ifjb@yearafterauthor
\newif\ifjb@yearaftertitle
\newif\ifjb@oyear@in@citation
\jb@allow@adding@of@pagerangetrue
\jb@allow@dot@for@lookattrue
\jb@allow@lookat@for@fullcitetrue
\jb@allow@hyper@cite@nobibtrue
\jb@allow@hyper@citetrue
\jb@bib@hangtrue
\jb@annotator@lasttrue
\jb@second@extra@spacetrue
\jb@third@extra@spacetrue
\jbnoformatafterstartpagetrue
\jb@do@authors@indextrue
\jb@do@editors@indextrue
\jb@do@organizations@indextrue
\newcommand*{\NAT@citex}{}%
% some redefinitions for babel support
\def\bbl@cite@choice{%
  \global\let\bibcite\bbl@bibcite
  \@ifpackageloaded{jurabib}{\global\let\bibcite\org@bibcite}{}%
  \global\let\bbl@cite@choice\relax
}%
\edef\jbselectlanguage{\noexpand\protect%
 \expandafter\noexpand\csname jbselectlanguage \endcsname}%
%                     important whitespace!---^
\expandafter\def\csname jbselectlanguage \endcsname#1{%
%               important whitespace!---^
 \edef\languagename{\ifnum\escapechar=\expandafter`\string#1\@empty%
 \else \string#1\@empty\fi}\select@language{\languagename}%
% analogous to the definition in switch.def from babel,
% but with this command we can avoid the lots of unwanted write's
% into the .aux file by deleting the \addtocontents commands.
}%
% NEW 0.6 multibib compatibility hook. multibib needs to know all possible cite commands
\def\@mb@citenamelist{%
   cite,%
   citetitle,%
   citenotitle,%
   citetitleonly,%
   footcite,%
   footcitetitle,%
   footcitenotitle,%
   footcitetitleonly,%
   fullcite,%
   footfullcite,%
   citep,%
   citet,%
   citealt,%
   citealp,%
   citeauthor,%
   citeyear,%
   citeyearpar,%
   footcitep,%
   footcitet,%
   footcitealt,%
   footcitealp,%
   footciteauthor%
   footciteyear,%
   citefield,
}
\let\jb@typeout\typeout
\let\jb@package@warning\PackageWarning
\let\jb@package@warningNoLine\PackageWarningNoLine
\def\jb@info#1{\PackageInfo{\jb@pkg@name}{#1}}%
\newcommand*{\jbsilent}{%
  \jb@info{*** Silent Mode ON ***}%
  \let\jb@package@warning\@gobbletwo
  \let\jb@package@warningNoLine\@gobbletwo
  \let\jb@typeout\@gobble%
}%
\newcommand*{\jbauthorfont}{}%
\newcommand*{\jborgauthorfont}{}%
\newcommand*{\jbannotatorfont}{}%
\newcommand*{\jbtitlefont}{}%
\newcommand*{\jbactualauthorfont}{\textit}%
% to restore for bib in crossrefs
\newcommand*{\jbapifont}{\jbtitlefont}%
\newcommand*{\jbbtitlefont}{\normalfont}%
\newcommand*{\jbauthorfnfont}{\normalfont}%
\newcommand*{\jbactualauthorfnfont}{\textit}%
% NEW 0.6
\newcommand\jbfulltitlefont{\jbtitlefont}%
\newcommand\jbshorttitlefont{\jbtitlefont}%
% to restore for bib in crossrefs
\newcommand*{\jbauthorfontifannotator}{\jborgauthorfont}%
\newcommand*{\jbignorevarioref}{\global\jb@ignore@varioreftrue}%
% default changed for 0.5e
\newcommand*{\jbdisablecitationcrossref}{\jb@no@nested@crossrefstrue}%
\newcommand*{\jbdotafterbibentry}{\jb@dottrue}%
\newcommand*{\jbdotafterendnote}{\AtBeginDocument{\def\@endanenote{\unskip.\par\endgroup}}}%
%\newcommand*{\jbsseditionkerned}{\jb@ssed@kerning@wantedtrue}%
\newcommand*{\jbsuperscripteditionafterauthor}{\jb@ssed@after@authortrue}%
\newcommand*{\jbssedbd}{}\let\jbssedbd\@gobble
% SU: changed: For packages that mustn't be loaded before jurabib,
% the check \AtBeginDocument might be too late (no need to delay it
% anyway): We need to check for hyperref *before* reading \jobname.url.
\@ifpackageloaded{bibunits}{%
  \ClassError{\jb@pkg@name}{Please load `bibunits' after `jurabib'}{%
   Just put the command `\string\usepackage{bibunits}' %
   after `\string\usepackage{jurabib}',\MessageBreak
   otherwise these packages won't work together.}}{\relax}
\@ifpackageloaded{hyperref}{% NOTE: there's another check for hyperref \AtBeginDocument
  \ClassError{\jb@pkg@name}{Please load `jurabib' before `hyperref'}{%
   Just put the command `\string\usepackage{hyperref}' %
   after `\string\usepackage{jurabib}',\MessageBreak
   otherwise these packages won't work together.}}{\relax}%
\newcommand*{\jbyearaftertitle}{%
  \AtBeginDocument{%
    \global\jb@yearafterauthorfalse
    \global\jb@yearaftertitletrue
  }%
}
\newcommand*{\jboyearincitation}{\jb@oyear@in@citationtrue}%
% CH 0.51w reworked
\newcommand*{\bibauthormultiple}{%
    \stepcounter{multiple@author}% to suppress inside bibliographic entry
    \ifthenelse{\boolean{jblookforgender}}{%
        \ifthenelse{\equal{\jb@@gender}{sm}}{%
            \bibibidfont{\bibidemSmname}%
        }{%
            \ifthenelse{\equal{\jb@@gender}{pm}}{%
                \bibibidfont{\bibidemPmname}%
            }{%
                \ifthenelse{\equal{\jb@@gender}{sf}}{%
                    \bibibidfont{\bibidemSfname}%
                }{%
                    \ifthenelse{\equal{\jb@@gender}{pf}}{%
                        \bibibidfont{\bibidemPfname}%
                    }{%
                        \ifthenelse{\equal{\jb@@gender}{sn}}{%
                            \bibibidfont{\bibidemSnname}%
                        }{%
                            \ifthenelse{\equal{\jb@@gender}{pn}}{%
                                \bibibidfont{\bibidemPnname}%
                            }{%
                                \ifthenelse{\equal{\jb@@gender}{}}{%
                                    \jb@package@warningNoLine{\jb@pkg@name}{%
                                      You are using \string\jblookforgender,\MessageBreak
                                      but gender field for `\jb@key'\MessageBreak
                                      is empty}%
                                    \bibibidfont{\bibidemSmname}%
                                }{%
                                    \jb@package@warningNoLine{\jb@pkg@name}{%
                                      You are using \string\jblookforgender,\MessageBreak
                                      but gender field for `\jb@key'\MessageBreak
                                      is not valid}%
                                    \bibibidfont{\bibidemSmname}%
                                }%
                            }%
                        }%
                    }%
                }%
            }%
        }%
        \bibansep{}%
    }{%
        \ifjbuseidemhrule
            \leavevmode\vrule height 2pt depth -1.6pt width 21pt\hspace{8pt}%
        \else
            \bibibidfont{\bibidemSmname}%
            \ifthenelse{\equal{\jb@@testlast@au@or@ed}{au}%
                        \and\equal{\jb@@test@au@or@ed}{ed}%
            }{%
                \space\bibEIMfont{\editorname}\bibansep{}%
%                                             ^^^^^^^^^^^ Position changed in 0.6
            }{%
% NEW 0.6, check for more than one author/editor introduced, requires `count.authors.or.editors' in .bst file
                \ifthenelse{\equal{\jb@@testlast@au@or@ed}{aus}%
                            \and\equal{\jb@@test@au@or@ed}{eds}%
                }{%
                     \space\bibEIMfont{\editorsname}\bibansep{}%
%                                                   ^^^^^^^^^^^ Position changed in 0.6
                }{%
% NEW 0.6, for the case that the previous entry was an editor
                     \ifthenelse{\(\equal{\jb@@testlast@au@or@ed}{ed}\and\equal{\jb@@test@au@or@ed}{au}\)%
                                 \or
                                 \(\equal{\jb@@testlast@au@or@ed}{eds}\and\equal{\jb@@test@au@or@ed}{aus}\)%
                                 \or
                                 \equal{\jb@@test@au@or@ed}{au}%
                     }{%
                          \bibansep{}%
                     }{}%
                }%
            }%
% REMOVED 0.6
%           \bibansep{}%
        \fi
    }%
}%
\providecommand\textitswitch[1]{\textit{#1}}%
\providecommand\Wrapquotes[1]{``#1''}%
\newcommand*{\jbdy}{}\global\let\jbdy\@gobble % !!! dummy year for .bst label generating mechanism
% NEW 0.52p no double output of year for @article type (generated shorttitle contains `journal year')
\newcommand*{\jbsy}[1]{\ifjb@author@year\else\space#1\fi}%
\DeclareRobustCommand{\jbissn}[1]{\unskip,\space ISSN #1}%
\DeclareRobustCommand{\jbisbn}[1]{\unskip,\space ISBN #1}%
% CH 0.51w completely reworked editor macros
\DeclareRobustCommand{\fsted}[1]{%
    \ifjbaltformat
        \ifjbweareinbib\else
            \space\bibEIMfont{#1}%
        \fi
    \else
        \space\bibEIMfont{#1}%
    \fi
}%
% 0.51x changed
\DeclareRobustCommand{\snded}[1]{%
    \ifjbaltformat
        \ifjbweareinbib
            \begingroup
                \def\bibfnfont{\textnormal}%
                #1\bibansep%
            \endgroup
        \else\fi
    \else\fi
}%
\DeclareRobustCommand{\bibedformat}[1]{%% exists only in jhuman.bst = \fsted!
    \ifjbaltformat
        \ifjbweareinbib\else
            \space\edfont{#1}%
        \fi
    \else
        \space\edfont{#1}%
    \fi
}%
\DeclareRobustCommand{\bibedinformat}[1]{\unskip\unskip\space\edfont{#1}}%
% 0.51v space added
\newcommand*{\addtoalllanguages}{}%
\newcommand*{\bibsall}{\addto\addtoalllanguages}%
\AtBeginDocument{\ifjbaltformat\else\let\snded\@gobble\fi}
\newcommand*{\jbedseplikecite}{%
  \ifjb@before@title@separator
   \AtBeginDocument{%
     \renewcommand\bibaesep{%
      \ifjb@reverse@all@names
         \bibefnfont{\jbhowsepbeforetitle}%
      \else
         \bibelnfont{\jbhowsepbeforetitle}%
      \fi
      \space%
     }%
   }%
  \fi
}%
% (btasep= between two author sep) for only two authors
\DeclareRobustCommand{\jbbtasep}{{\normalfont\slash}}%
\DeclareRobustCommand{\jbbfsasep}{{\normalfont\slash}}%
\DeclareRobustCommand{\jbbstasep}{{\normalfont\slash}}%
\DeclareRobustCommand{\jbbtesep}{{\normalfont\slash}}%
\DeclareRobustCommand{\jbbfsesep}{{\normalfont\slash}}%
\DeclareRobustCommand{\jbbstesep}{{\normalfont\slash}}
\DeclareRobustCommand{\jbatsep}{,}
% NEW 0.5e after editionname sep
\DeclareRobustCommand{\jbaensep}{.}
% markup for the .bst extra.label
\DeclareRobustCommand\el[1]{#1}%
% CH 0.6 print out the bib extra label if natbib commands with year output are used.
\DeclareRobustCommand\bibel[1]{\ifjb@nat@use@year@command#1\fi}%
\newcommand*{\jbshowbibextralabel}{\renewcommand\bibel[1]{##1}}%
\newcommand*{\jblookforgender}{\global\jblookforgendertrue}%
\newcommand*{\jbuseidemhrule}{%
    \global\jbuseidemhruletrue
    \global\jblookforgenderfalse
}%
\newcommand*{\jbrealcitation}[2]{\@gobble}
\newcommand*{\jbcitationyearformat}[1]{(#1)}
\newcommand*{\jbcitationoyearformat}[1]{\space[#1]}
% NEW 0.5f separate command for bibliography year
\newcommand*{\jbbibyearformat}[1]{(#1)}
\newcommand*{\jbindexbib}{\jb@index@bibtrue}
% NEW 0.6 some command to tune the indexing feature
% Do not index authors
\newcommand*{\jbdonotindexauthors}{\jb@do@authors@indexfalse}
% Do not index editors
\newcommand*{\jbdonotindexeditors}{\jb@do@editors@indexfalse}
% Do not index organizations
\newcommand*{\jbdonotindexorganizations}{\jb@do@organizations@indexfalse}
% %
% Index only authors on their first citation (but index the same author again if he wrote another book!)
\newcommand*{\jbindexonlyfirstauthors}{\jb@index@only@first@authorstrue}
% Index only editors on their first citation (but index the same editor again if he edited another book!)
\newcommand*{\jbindexonlyfirsteditors}{\jb@index@only@first@editorstrue}
% dito
\newcommand*{\jbindexonlyfirstorganizations}{\jb@index@only@first@organizationstrue}
\newcommand*{\jb@fornoop}{}
\newcommand*{\@jb@for}{}
\newcommand*{\jb@forloop}{}
\newcommand*{\jb@if@forloop}{}
\def\jb@fornoop#1\@@#2#3{}
\long\def\jb@for#1:=#2\do#3{%
  \expandafter\def\expandafter\jb@fortmp\expandafter{#2}%
  \ifx\jb@fortmp\@empty \else\expandafter\jb@forloop#2; %
  \@nil; \@nil\@@#1{#3}\fi}
\long\def\jb@forloop#1; #2; #3\@@#4#5{%
  \def#4{#1}\ifx #4\@nnil \else
  #5\def#4{#2}\ifx #4\@nnil \else#5\jb@if@forloop #3\@@#4{#5}\fi\fi}
\long\def\jb@if@forloop#1; #2\@@#3#4{%
  \def#3{#1}\ifx #3\@nnil\expandafter\jb@fornoop \else
  #4\relax\expandafter\jb@if@forloop\fi#2\@@#3{#4}}
% CH 0.6, MUCH better code for indexing, once again contributed by Stefan Ulrich
\newcommand*{\jb@@tempa}{}
\newcommand*{\jb@@tempb}{}
\newcommand*{\jb@call@index}[2]{%
% generic check if we are in bibliography, if so check if (not-cited) authors 
% should be indexed (\jbindexbib set?), otherwise disable indexing for bibliography
   \ifjbweareinbib\ifjb@index@bib\else\jb@indexfalse\fi\fi
   \ifjb@index
       \@ifundefined{jb@#1@#2}{}{%
          \begingroup % keep assignments local
             \@makeother\\\@makeother\"\def~{\string~}%
             \protected@edef\jb@@tempa{\csname jb@#1@#2\endcsname}%
             \jb@for\jb@@tempb:=\jb@@tempa\do{%
                      \ifjb@debug
                          \typeout{INDEXING: |\jb@@tempb|}%
                      \fi
% This is a feature, which was requested heavily:
% It should be possible to index authors and editors only on their first appearence.
% BUT: An editor (or author) could be an editor (or author) of another work!
% So we are checking now, if the editors (#1=ed) name (\jb@tempb) was already index with the key (#2)
                      \@ifundefined{#1@#2@\jb@@tempb}{%
                           \ifjb@debug\typeout{#1@#2@\jb@@tempb| undefined!}\fi
                           \expandafter\jb@@call@index\jb@@tempb{#1}%
                      }{%
                           \ifjb@debug\typeout{#1@#2@\jb@@tempb| DEFINED!}\fi
                      }%
                      \ifthenelse{\equal{#1}{aut}%
                                  \and\boolean{jb@index@only@first@authors}%
                      }{%
                              \global\@namedef{aut@#2@\jb@@tempb}{}%
                      }{}%
% We have to check if we have an editor
                      \ifthenelse{\equal{#1}{ed}%
                                  \and\boolean{jb@index@only@first@editors}%
                      }{%
                         \ifjb@debug
                             \typeout{Author/Editor Switch for `#2': \jb@@aut@ed@switch}%
                         \fi
% If this switch is set, we have to check for missing authors, 
% because this is a work which has ONLY an editor, so we should use the editor for indexing
                          \ifthenelse{\equal{\jb@@aut@ed@switch}{3}}{%
%                             1: both author and editor given
%                             2: editor empty, author not
%                             3: author empty, editor not
%                             4: author and editor empty
                              \@ifundefined{warn@ed@#2@\jb@@tempb}{%
                                 \global\@namedef{warn@ed@#2@\jb@@tempb}{}%
                                 \jb@package@warningNoLine{\jb@pkg@name}{%
                                     You have set `\string\jbindexonlyfirsteditors', but\MessageBreak
                                     `#2' has only editor, indexing continuously ..%
                                 }%
                              }{\relax}%
                          }{\global\@namedef{ed@#2@\jb@@tempb}{}}%
                      }{}%
                      \ifthenelse{\equal{#1}{org}%
                                  \and\boolean{jb@index@only@first@organization}%
                      }{%
                              \global\@namedef{org@#2@\jb@@tempb}{}%
                      }{}%
             }%
          \endgroup
        }%
   \fi
}
\newcommand{\jbmakeindexactual}{@}%
\newcommand{\jbauthorindexfont}[1]{#1}%
\newcommand{\jbeditorindexfont}[1]{#1}%
\newcommand{\jborganizationindexfont}[1]{#1}%
\newcommand{\jb@index@aut@markup}[1]{#1\jbmakeindexactual\jbauthorindexfont{#1}}%
\newcommand{\jb@index@ed@markup}[1]{#1\jbmakeindexactual\jbeditorindexfont{#1}}%
\newcommand{\jb@index@org@markup}[1]{#1\jbmakeindexactual\jborganizationindexfont{#1}}%
% NEW 0.5f idem should work inside bibliographic entries too (If author = editor)
\newcommand*{\jb@inside@author}{}
\newcommand*{\jb@inside@editor}{}
% NEW 0.5f ibidem for multiple authors
\newcounter{ibidem@author}
\newcounter{multiple@author}% counter will be set by \bibauthormultiple
\newcommand*{\jb@last@ibidem@author}{}
% NEW 0.5f we have to define this command, otherwise we are getting error messages inside \bib*nf macros while testing if we are on same page
\def\jb@tempcntc{}%
\newcommand*{\jb@bib@gender@checked}{%
  \ifthenelse{\equal{\jb@@gender}{sm}}{%
      \ifthenelse{\boolean{jb@edby}}{%
          \@ifundefined{jb@morethanonecite}{\idemSmedbyname}{\idemsmedbyname}%
      }{%
          \@ifundefined{jb@morethanonecite}{\ifjbcross\idemSmname\else\bibidemSmname\fi}{\idemsmname}%
      }%
  }{%
      \ifthenelse{\equal{\jb@@gender}{pm}}{%
          \ifthenelse{\boolean{jb@edby}}{%
              \@ifundefined{jb@morethanonecite}{\idemPmedbyname}{\idempmedbyname}%
          }{%
              \@ifundefined{jb@morethanonecite}{\ifjbcross\idemPmname\else\bibidemPmname\fi}{\idempmname}%
          }%
      }{%
          \ifthenelse{\equal{\jb@@gender}{sf}}{%
              \ifthenelse{\boolean{jb@edby}}{%
                  \@ifundefined{jb@morethanonecite}{\idemSfedbyname}{\idemsfedbyname}%
              }{%
                  \@ifundefined{jb@morethanonecite}{\ifjbcross\idemSfname\else\bibidemSfname\fi}{\idemsfname}%
              }%
          }{%
              \ifthenelse{\equal{\jb@@gender}{pf}}{%
                  \ifthenelse{\boolean{jb@edby}}{%
                      \@ifundefined{jb@morethanonecite}{\idemPfedbyname}{\idempfedbyname}%
                  }{%
                      \@ifundefined{jb@morethanonecite}{\ifjbcross\idemPfname\else\bibidemPfname\fi}{\idempfname}%
                  }%
              }{%
                  \ifthenelse{\equal{\jb@@gender}{sn}}{%
                      \ifthenelse{\boolean{jb@edby}}{%
                          \@ifundefined{jb@morethanonecite}{\idemSnedbyname}{\idemsnedbyname}%
                      }{%
                          \@ifundefined{jb@morethanonecite}{\ifjbcross\idemSnname\else\bibidemSnname\fi}{\idemsnname}%
                      }%
                  }{%
                      \ifthenelse{\equal{\jb@@gender}{pn}}{%
                          \ifthenelse{\boolean{jb@edby}}{%
                              \@ifundefined{jb@morethanonecite}{\idemPnedbyname}{\idempnedbyname}%
                          }{%
                              \@ifundefined{jb@morethanonecite}{\ifjbcross\idemPnname\else\bibidemPnname\fi}{\idempnname}%
                          }%
                      }{%
                          \@ifundefined{jb@morethanonecite}{\ifjbcross\idemSmname\else\bibidemSmname\fi}{\idemsmname}%
                      }%
                  }%
              }%
          }%
      }%
  }%
}
\newcommand*\jb@gobbleseven[7]{}
\AtEndDocument{\let\jb@index\jb@gobbleseven}
\newcommand*\jb@index{\begingroup\@makeother\\\@makeother\"\def~{\string~}\jb@@index}%
\newcommand*\jb@@index[7]{%
    \@ifundefined{jb@#1@#2}{%
        \global\@namedef{jb@#1@#2}{{#3}{#4}{#5}{#6}{#7}}%
    }{%
        \protected@edef\@tempa{\csname jb@#1@#2\endcsname}%
        \expandafter\global\expandafter\@namedef\expandafter{jb@#1@#2\expandafter}\expandafter{\@tempa; {#3}{#4}{#5}{#6}{#7}}%
    }%
    %\expandafter\global\expandafter\let\csname jb@#1@#2\endcsname\relax
    \endgroup
}
\newcommand*{\jb@do@normal@index}[1]{\ifjb@debug\typeout{Indexing: |#1|}\fi\index{#1}}%
\newcommand*\jb@@call@normal@index[6]{%
  \ifjb@debug
     \typeout{******** indexing: |#1|#2|#3|#4|#5| of type: |#6|}%
  \fi
  \ifthenelse{\equal{#2}{\@empty}}{%
      \jb@do@normal@index{\csname jb@index@#6@markup\endcsname{#1}}%
  }{%
      \ifthenelse{\equal{#4}{\@empty}}{%
           \ifthenelse{\equal{#5}{\@empty}}{%
                \jb@do@normal@index{\csname jb@index@#6@markup\endcsname{#1, \ifjb@abbrv#3\else#2\fi}}%
           }{%
                \jb@do@normal@index{\csname jb@index@#6@markup\endcsname{#1, #5, \ifjb@abbrv#3\else#2\fi}}%
           }%
      }{%
           \ifthenelse{\equal{#5}{\@empty}}{%
                \jb@do@normal@index{\csname jb@index@#6@markup\endcsname{#1, \ifjb@abbrv#3\else#2\fi\space#4}}%
           }{%
                \jb@do@normal@index{\csname jb@index@#6@markup\endcsname{#1, #5, \ifjb@abbrv#3\else#2\fi\space#4}}%
           }%
      }%
  }%
}%
\newcommand{\jbindextype}{}
\newcommand*\jb@@call@type@index[6]{%
  \ifjb@debug\typeout{******** indexing: |#1|#2|#3|#4|#5| of type: |#6|}\fi
  \begingroup
      \ifthenelse{\equal{#2}{\@empty}}{%
          \protected@edef\jb@tempa{[\jbindextype]{%
              \csname jb@index@#6@markup\endcsname{#1}}%
          }\expandafter\index\jb@tempa
  }{%
      \ifthenelse{\equal{#4}{\@empty}}{%
           \ifthenelse{\equal{#5}{\@empty}}{%
                \protected@edef\jb@tempa{[\jbindextype]{%
                    \csname jb@index@#6@markup\endcsname{#1, \ifjb@abbrv#3\else#2\fi}}%
                }\expandafter\index\jb@tempa
           }{%
                \protected@edef\jb@tempa{[\jbindextype]{%
                    \csname jb@index@#6@markup\endcsname{#1, #5, \ifjb@abbrv#3\else#2\fi}}%
                }\expandafter\index\jb@tempa
           }%
      }{%
           \ifthenelse{\equal{#5}{\@empty}}{%
                \protected@edef\jb@tempa{[\jbindextype]{%
                    \csname jb@index@#6@markup\endcsname{#1, \ifjb@abbrv#3\else#2\fi\space#4}}%
                }\expandafter\index\jb@tempa
           }{%
                \protected@edef\jb@tempa{[\jbindextype]{%
                    \csname jb@index@#6@markup\endcsname{#1, #5, \ifjb@abbrv#3\else#2\fi\space#4}}%
                }\expandafter\index\jb@tempa
           }%
      }%
  }%
  \endgroup
}%
\newcommand\jbCheckedFirst{\ifjb@abbrv\jbFirstAbbrv\else\jbFirst\fi}
\newcommand\jbRevedFirstOnlyLast{\biblnfmt{\jbLast}}%
\newcommand\jbRevedFirstNoVonNoJr{\biblnfmt{\jbLast, }\bibfnfmt{\jbCheckedFirst}}%
\newcommand\jbRevedFirstNoVonJr{\biblnfmt{\jbLast, \jbJunior, }\bibfnfmt{\jbCheckedFirst}}%
\newcommand\jbRevedFirstVonNoJr{\biblnfmt{\jbLast, }\bibfnfmt{\jbCheckedFirst\space\jbVon}}%
\newcommand\jbRevedFirstVonJr{\biblnfmt{\jbLast, \jbJunior, }\bibfnfmt{\jbCheckedFirst\space\jbVon}}%
\newcommand\jbRevedNotFirstOnlyLast{\biblnfmt{\jbLast}}%
\newcommand\jbRevedNotFirstNoVonNoJr{\bibfnfmt{\jbCheckedFirst\space}\biblnfmt{\jbLast}}%
\newcommand\jbRevedNotFirstNoVonJr{\bibfnfmt{\jbCheckedFirst\space}\biblnfmt{\jbLast, \jbJunior}}%
\newcommand\jbRevedNotFirstVonNoJr{\bibfnfmt{\jbCheckedFirst\space\jbVon~}\biblnfmt{\jbLast}}%
\newcommand\jbRevedNotFirstVonJr{\bibfnfmt{\jbCheckedFirst\space\jbVon~}\biblnfmt{\jbLast, \jbJunior}}%
\newcommand\jbNotRevedOnlyLast{\biblnfmt{\jbLast}}%
\newcommand\jbNotRevedNoVonNoJr{\biblnfmt{\jbLast, }\bibfnfmt{\jbCheckedFirst}}%
\newcommand\jbNotRevedNoVonJr{\biblnfmt{\jbLast, \jbJunior, }\bibfnfmt{\jbCheckedFirst}}%
\newcommand\jbNotRevedVonNoJr{\biblnfmt{\jbLast, }\bibfnfmt{\jbCheckedFirst\space\jbVon}}%
\newcommand\jbNotRevedVonJr{\biblnfmt{\jbLast, \jbJunior, }\bibfnfmt{\jbCheckedFirst\space\jbVon}}%
% #1 = last #2 = first #3 = f. #4 = von #5 = jr.
\DeclareRobustCommand{\bibnf}[5]{%
  \def\biblnfmt{\biblnfont}%
  \def\bibfnfmt{\bibfnfont}%
  \def\jbLast{#1}\def\jbFirst{#2}\def\jbFirstAbbrv{#3}\def\jbVon{#4}\def\jbJunior{#5}% NEW 0.51f
  \stepcounter{ibidem@author}\def\jb@ibidem@author{#1#2#3#4#5}%
      \ifthenelse{\boolean{jb@bibformat@ibidem}%
                    \and\not
                  \boolean{jbcross}%
                    \and
                  \theibidem@author=1%
                    \and
                  \themultiple@author<1%
                    \and
                  \equal{\jb@ibidem@author}{\jb@last@ibidem@author}%
                    \and
                  \equal{\jb@simple@pageref@by@heiko{jbib:\jb@tempcntc}}{%
                         \jb@simple@pageref@by@heiko{jbib:\thebibnamereplace}}%
      }{%
            \bibauthormultiple%
      }{%
         \ifjb@first@author@reversed
           \@ifundefined{jb@first@author}{%
                \@namedef{jb@first@author}{}%
                \ifthenelse{\equal{#2}{\@empty}}{%
                     \jbRevedFirstOnlyLast
                }{%
                     \ifthenelse{\equal{#4}{\@empty}}{%
%                          `von' empty
                           \ifthenelse{\equal{#5}{\@empty}}{%
%                              `jr.' empty
                               \jbRevedFirstNoVonNoJr%
                           }{%
%                              `von' empty, `jr.' not empty
                               \jbRevedFirstNoVonJr%
                           }%
                     }{%
%                          `von' not empty
                           \ifthenelse{\equal{#5}{\@empty}}{%
%                             `von' not empty, `jr.' empty
                               \jbRevedFirstVonNoJr%
                           }{%
%                             `von' not empty, `jr.' not empty
                               \jbRevedFirstVonJr%
                           }%
                     }%
                }%
           }{% not first author!
                \ifthenelse{\equal{#2}{\@empty}}{%
                     \jbRevedNotFirstOnlyLast%
                }{%
                     \ifthenelse{\equal{#4}{\@empty}}{%
%                         `von' empty
                          \ifthenelse{\equal{#5}{\@empty}}{%
%                           `jr.' empty
                             \jbRevedNotFirstNoVonNoJr%
                          }{%
%                            `von' empty, `jr.' not empty
                             \jbRevedNotFirstNoVonJr%
                          }%
                     }{%
%                         `von' not empty
                          \ifthenelse{\equal{#5}{\@empty}}{%
%                            `von' not empty, `jr.' empty
                             \jbRevedNotFirstVonNoJr%
                          }{%
%                            `von' not empty, `jr.' not empty
                             \jbRevedNotFirstVonJr%
                          }%
                     }%
                }%
           }%
         \else
           \ifthenelse{\equal{#2}{\@empty}}{%
                \jbNotRevedOnlyLast
           }{%
                \ifthenelse{\equal{#4}{\@empty}}{%
%                    `von' empty
                     \ifthenelse{\equal{#5}{\@empty}}{%
%                       `jr.' empty
                        \jbNotRevedNoVonNoJr%
                     }{%
%                       `von' empty, `jr.' not empty
                        \jbNotRevedNoVonJr%
                     }%
                }{%
%                    `von' not empty
                     \ifthenelse{\equal{#5}{\@empty}}{%
%                       `von' not empty, `jr.' empty
                        \jbNotRevedVonNoJr%
                     }{%
%                       `von' not empty, `jr.' not empty
                        \jbNotRevedVonJr%
                     }%
                }%
           }%
         \fi
      }%
% NEW 0.5f idem should work inside bibliographic entries too (If author = editor)
% here we save all five args to identify author=editor
  \gdef\jb@inside@author{#1#2#3#4#5}%
%  temporarily removed  \gdef\jb@inside@editor{#1#2#3#4#5}%
  \ifjbcross\else\gdef\jb@last@ibidem@author{#1#2#3#4#5}\fi
}%
\DeclareRobustCommand{\bibrnf}[5]{%
  \def\biblnfmt{\biblnfont}%
  \def\bibfnfmt{\bibfnfont}%
  \def\jbLast{#1}\def\jbFirst{#2}\def\jbFirstAbbrv{#3}\def\jbVon{#4}\def\jbJunior{#5}% NEW 0.51f
  \stepcounter{ibidem@author}\def\jb@ibidem@author{#1#2#3#4#5}%
      \ifthenelse{\boolean{jb@bibformat@ibidem}%
                    \and\not
                  \boolean{jbcross}%
                    \and
                  \theibidem@author=1%
                    \and
                  \themultiple@author<1%
                    \and
                  \equal{\jb@ibidem@author}{\jb@last@ibidem@author}%
                    \and
                  \equal{\jb@simple@pageref@by@heiko{jbib:\jb@tempcntc}}{%
                         \jb@simple@pageref@by@heiko{jbib:\thebibnamereplace}}%
      }{%
            \bibauthormultiple%
      }{%
          \ifthenelse{\equal{#2}{\@empty}}{%
              \jbRevedNotFirstOnlyLast%
          }{%
              \ifthenelse{\equal{#4}{\@empty}}{%
%                 `von' empty
                  \ifthenelse{\equal{#5}{\@empty}}{%
%                      `jr.' empty
                       \jbRevedNotFirstNoVonNoJr%
                  }{%
%                      `von' empty, `jr.' not empty
                       \jbRevedNotFirstNoVonJr%
                  }%
              }{%
%                 `von' not empty
                  \ifthenelse{\equal{#5}{\@empty}}{%
%                      `von' not empty, `jr.' empty
                       \jbRevedNotFirstVonNoJr%
                  }{%
%                      `von' not empty, `jr.' not empty
                       \jbRevedNotFirstVonJr%
                  }%
              }%
          }%
      }%
% NEW 0.5f idem should work inside bibliographic entries too (If author = editor)
% here we save all five args to identify author=editor
  \gdef\jb@inside@author{#1#2#3#4#5}%
%  temporarily removed  \gdef\jb@inside@editor{#1#2#3#4#5}%
  \ifjbcross\else\gdef\jb@last@ibidem@author{#1#2#3#4#5}\fi
}%
\DeclareRobustCommand{\bibenf}[5]{%
  \def\biblnfmt{\bibelnfont}%
  \def\bibfnfmt{\bibefnfont}%
  \def\jbLast{#1}\def\jbFirst{#2}\def\jbFirstAbbrv{#3}\def\jbVon{#4}\def\jbJunior{#5}% NEW 0.51f
  \stepcounter{ibidem@author}\def\jb@ibidem@author{#1#2#3#4#5}%
% NEW 0.5f idem should work inside bibliographic entries too (If author = editor)
  \def\jb@inside@editor{#1#2#3#4#5}%
  \ifthenelse{%
       \equal{\jb@inside@author}{\jb@inside@editor}%
       \and
       \boolean{jb@idem}%
%  temporarily removed       \and
%  temporarily removed       \equal{\jb@simple@pageref@by@heiko{jbib:\jb@tempcntc}}{%
%  temporarily removed              \jb@simple@pageref@by@heiko{jbib:\thebibnamereplace}}%
%       \and\boolean{jbweareinbib}% NO !!!!!!!!!!!!
  }{%
% NEW 0.5f we make a difference between english and other language output of idem,
% for oxford should appear an uppercase Idem after "in:", suggested by Maarten Wisse
       \ifthenelse{\equal{\bbl@main@language}{english}\and\boolean{jboxford}}{%
% NEW 0.51x new switch \jbuseidemhrule
            \ifjbuseidemhrule
                \leavevmode\vrule height 2pt depth -1.6pt width 21pt\hspace{3pt}%
            \else
                \edfont{\idemname}%
            \fi
       }{%
% NEW 0.51d gender + case check for bibliography idem
% NEW 0.51x new switch \jbuseidemhrule
            \ifjbuseidemhrule
                \leavevmode\vrule height 2pt depth -1.6pt width 21pt\hspace{3pt}%
            \else
                \edfont{\jb@bib@gender@checked}%
            \fi
       }%
% we are switching off et~al. output
       \jb@bibetalfalse
 }{%
   \ifthenelse{\boolean{jb@bibformat@ibidem}%
                 \and\not
               \boolean{jbcross}%
                 \and
               \theibidem@author=1%
                 \and
               \themultiple@author<1%
                 \and
               \equal{\jb@ibidem@author}{\jb@last@ibidem@author}%
                 \and
               \equal{\jb@simple@pageref@by@heiko{jbib:\jb@tempcntc}}{%
                      \jb@simple@pageref@by@heiko{jbib:\thebibnamereplace}}%
   }{%
         \bibauthormultiple%
   }{%
        \ifjb@first@author@reversed
             \@ifundefined{jb@first@editor}{%
                 \@namedef{jb@first@editor}{}%
                 \ifthenelse{\equal{#2}{\@empty}}{%
                      \jbRevedFirstOnlyLast%
                 }{%
                      \ifthenelse{\equal{#4}{\@empty}}{%
%                           `von' empty
                            \ifthenelse{\equal{#5}{\@empty}}{%
%                                `jr.' empty
                                 \jbRevedFirstNoVonNoJr%
                            }{%
%                                `von' empty, `jr.' not empty
                                 \jbRevedFirstNoVonJr%
                            }%
                      }{%
%                           `von' not empty
                            \ifthenelse{\equal{#5}{\@empty}}{%
%                                `von' not empty, `jr.' empty
                                 \jbRevedFirstVonNoJr%
                            }{%
%                                `von' not empty, `jr.' not empty
                                 \jbRevedFirstVonJr%
                            }%
                      }%
                 }%
             }{% not first author!
                 \ifthenelse{\equal{#2}{\@empty}}{%
                      \jbRevedNotFirstOnlyLast%
                 }{%
                      \ifthenelse{\equal{#4}{\@empty}}{%
%                          `von' empty
                           \ifthenelse{\equal{#5}{\@empty}}{%
%                               `jr.' empty
                                \jbRevedNotFirstNoVonNoJr%
                           }{%
%                               `von' empty, `jr.' not empty
                                \jbRevedNotFirstNoVonJr%
                           }%
                      }{%
%                          `von' not empty
                           \ifthenelse{\equal{#5}{\@empty}}{%
%                               `von' not empty, `jr.' empty
                                \jbRevedNotFirstVonNoJr%
                           }{%
%                               `von' not empty, `jr.' not empty
                                \jbRevedNotFirstVonJr%
                           }%
                      }%
                 }%
             }%
        \else
             \ifthenelse{\equal{#2}{\@empty}}{%
                  \jbNotRevedOnlyLast%
             }{%
                  \ifthenelse{\equal{#4}{\@empty}}{%
%                      `von' empty
                       \ifthenelse{\equal{#5}{\@empty}}{%
%                           `jr.' empty
                            \jbNotRevedNoVonNoJr%
                       }{%
%                           `von' empty, `jr.' not empty
                            \jbNotRevedNoVonJr%
                       }%
                  }{%
%                      `von' not empty
                       \ifthenelse{\equal{#5}{\@empty}}{%
%                           `von' not empty, `jr.' empty
                            \jbNotRevedVonNoJr%
                       }{%
%                           `von' not empty, `jr.' not empty
                            \jbNotRevedVonJr%
                       }%
                  }%
             }%
        \fi
     }%
  }%
% NEW 0.5f make \jb@inside@author empty, otherwise for more than
%          one and different editors we will get:
%          `author: [...] editor1, editor2 and idem, editors:'
%                                              ^^^^!
%  \def\jb@inside@author{}%
  \gdef\jb@inside@author{#1#2#3#4#5}%
  \gdef\jb@inside@editor{#1#2#3#4#5}%
  \ifjbcross\else\gdef\jb@last@ibidem@author{#1#2#3#4#5}\fi
}%
\DeclareRobustCommand{\bibrenf}[5]{%
  \def\biblnfmt{\bibelnfont}%
  \def\bibfnfmt{\bibefnfont}%
  \def\jbLast{#1}\def\jbFirst{#2}\def\jbFirstAbbrv{#3}\def\jbVon{#4}\def\jbJunior{#5}% NEW 0.51f
  \stepcounter{ibidem@author}\def\jb@ibidem@author{#1#2#3#4#5}%
% NEW 0.5f idem should work inside bibliographic entries too (If author = editor)
  \def\jb@inside@editor{#1#2#3#4#5}%
  \ifthenelse{%
       \equal{\jb@inside@author}{\jb@inside@editor}%
       \and
       \boolean{jb@idem}%
%  temporarily removed       \and
%  temporarily removed       \equal{\jb@simple@pageref@by@heiko{jbib:\jb@tempcntc}}{%
%  temporarily removed              \jb@simple@pageref@by@heiko{jbib:\thebibnamereplace}}%
%       \and\boolean{jbweareinbib}% NO !!!!!!!!!!!!
  }{%
% NEW 0.5f we make a difference between english and other language output of idem,
% for oxford should appear an uppercase Idem after "in:", suggested by Maarten Wisse
       \ifthenelse{\equal{\bbl@main@language}{english}\and\boolean{jboxford}}{%
% NEW 0.51x new switch \jbuseidemhrule
            \ifjbuseidemhrule
                \leavevmode\vrule height 2pt depth -1.6pt width 21pt\hspace{3pt}%
            \else
                \edfont{\idemname}%
            \fi
       }{%
% NEW 0.51d gender + case check for bibliography idem
% NEW 0.51x new switch \jbuseidemhrule
            \ifjbuseidemhrule
                \leavevmode\vrule height 2pt depth -1.6pt width 21pt\hspace{3pt}%
            \else
                \edfont{\jb@bib@gender@checked}%
            \fi
       }%
% we are switching off et~al. output
       \jb@bibetalfalse
  }{%
      \ifthenelse{\boolean{jb@bibformat@ibidem}%
                    \and\not
                  \boolean{jbcross}%
                    \and
                  \theibidem@author=1%
                    \and
                  \themultiple@author<1%
                    \and
                  \equal{\jb@ibidem@author}{\jb@last@ibidem@author}%
                    \and
                  \equal{\jb@simple@pageref@by@heiko{jbib:\jb@tempcntc}}{%
                         \jb@simple@pageref@by@heiko{jbib:\thebibnamereplace}}%
      }{%
            \bibauthormultiple%
      }{%
           \ifthenelse{\equal{#2}{\@empty}}{%
                \jbRevedNotFirstOnlyLast
           }{%
                \ifthenelse{\equal{#4}{\@empty}}{%
%                    `von' empty
                     \ifthenelse{\equal{#5}{\@empty}}{%
%                         `jr.' empty
                          \jbRevedNotFirstNoVonNoJr%
                     }{%
%                         `von' empty, `jr.' not empty
                          \jbRevedNotFirstNoVonJr%
                     }%
                }{%
%                    `von' not empty
                     \ifthenelse{\equal{#5}{\@empty}}{%
%                         `von' not empty, `jr.' empty
                          \jbRevedNotFirstVonNoJr%
                     }{%
%                         `von' not empty, `jr.' not empty
                          \jbRevedNotFirstVonJr%
                     }%
                }%
           }%
      }%
  }%
  \gdef\jb@inside@author{#1#2#3#4#5}%
  \gdef\jb@inside@editor{#1#2#3#4#5}%
  \ifjbcross\else\gdef\jb@last@ibidem@author{#1#2#3#4#5}\fi
}%
% NEW 0.5f
% lenf = lonely editor name format: font for editor(s), if no author is given.
% rlenf = reversed lonely editor name format: font for editor(s), if no author is given.
\DeclareRobustCommand{\biblenf}[5]{\bibenf{#1}{#2}{#3}{#4}{#5}}
\DeclareRobustCommand{\bibrlenf}[5]{\bibrenf{#1}{#2}{#3}{#4}{#5}}
\newcommand*{\jblinebreak}{\linebreak[4]}%
\DeclareRobustCommand{\biblnfont}{\textbf}%
\DeclareRobustCommand{\bibfnfont}{\textbf}%
\DeclareRobustCommand{\bibelnfont}{\textbf}%
\DeclareRobustCommand{\bibefnfont}{\textbf}%
\DeclareRobustCommand{\bibtfont}{}%
\DeclareRobustCommand{\bibbtfont}{}%
\DeclareRobustCommand{\bibjtfont}{}%
\DeclareRobustCommand{\bibapifont}{}%
\DeclareRobustCommand{\bibrevtfont}{}%
% ibid font for `derselbe', `dieselbe' ....
\DeclareRobustCommand{\bibibidfont}{\biblnfont}%
% intermediate font for `and' and `,'
% CHANGED 0.5f make a difference between bibliography and text
% CH 0.51t \bibfnfont instead of \biblnfont
\newcommand{\bibimfont}{\bibfnfont}%
\newcommand{\jbimfont}{\textnormal}%
% CH 0.51t \bibefnfont instead of \bibelnfont
\newcommand{\bibeimfont}{\bibefnfont}%
\newcommand{\jbeimfont}{\textnormal}%
% NEW 0.6 archival support added
\DeclareRobustCommand{\bibanfont}{\biblnfont}%
\DeclareRobustCommand{\jbsamearch}{\mbox{}\\[-1.2\baselineskip]}%
\DeclareRobustCommand{\jbsamesubarch}{\mbox{}\\[-.5\baselineskip]}%
\DeclareRobustCommand{\jbnotsamearch}{\mbox{}\\[.3\baselineskip]}%
\DeclareRobustCommand{\jbsubarchsep}{\ifjbweareinbib:\\[.2\baselineskip]\fi}%
\DeclareRobustCommand{\jbarchnamesep}{\ifjbweareinbib\hspace{4em}\fi}%
\DeclareRobustCommand{\jbshortarchformat}[1]{(#1)}%
\DeclareRobustCommand{\jbshortsubarchformat}[1]{(#1)}%
\DeclareRobustCommand{\jbarchnameformat}[1]{\space(#1)}%
\DeclareRobustCommand{\jbsamesubarchindent}{\mbox{}\hspace{1em}--}%
\DeclareRobustCommand{\jbarchnameformat}[1]{(#1)}%
\newlength{\jb@subarchitemwidth}%
\newlength{\jb@subarchentrywidth}%
\addtolength{\jb@subarchentrywidth}{\textwidth}%
\DeclareRobustCommand{\jbarchsig}[2]{%
     \ifjbweareinbib
        \settowidth{\jb@subarchitemwidth}{\jbsamesubarchindent+#1}%
        \setlength{\jb@subarchentrywidth}{\textwidth-\jb@subarchitemwidth-4em}%
        \begin{tabular}{@{}p{\jb@subarchitemwidth}@{}j{\jb@subarchentrywidth}@{}}%
           #1\ifjb@dot\unskip\unskip\unskip.\fi&\ifthenelse{\equal{#2}{}}{}{\jbarchnameformat{#2}}%
        \end{tabular}
     \fi
}%
\DeclareRobustCommand{\bibIMfont}[1]{%
    \ifjbweareinbib
        \ifjbweareinhowcited
           \jbimfont{#1}%
        \else
           \bibimfont{#1}%
        \fi
    \else
        \jbimfont{#1}%
    \fi
}%
\DeclareRobustCommand{\bibEIMfont}[1]{%
    \ifjbweareinbib
        \ifjbweareinhowcited
           \jbeimfont{#1}%
        \else
           \bibeimfont{#1}%
        \fi
    \else
        \jbeimfont{#1}%
    \fi
}%
\DeclareRobustCommand{\edfont}[1]{%
    \ifjbweareinbib
        \ifjbweareinhowcited
           \jbeimfont{#1}%
        \else
           \bibeimfont{#1}%
        \fi
    \else
        \jbeimfont{#1}%
    \fi
}%
\DeclareRobustCommand{\bibbtasep}{{\normalfont\slash}}%
\DeclareRobustCommand{\bibbfsasep}{{\normalfont\slash}}%
\DeclareRobustCommand{\bibbstasep}{{\normalfont\slash}}%
\DeclareRobustCommand{\Bibbtasep}{\bibbtasep\ifjb@tabular\jblinebreak\fi}%
\DeclareRobustCommand{\Bibbfsasep}{\bibbfsasep\ifjb@tabular\jblinebreak\fi}%
\DeclareRobustCommand{\Bibbstasep}{\bibbstasep\ifjb@tabular\jblinebreak\fi}%
\DeclareRobustCommand{\bibbtesep}{{\normalfont\slash}}%
\DeclareRobustCommand{\bibbfsesep}{{\normalfont\slash}}%
\DeclareRobustCommand{\bibbstesep}{{\normalfont\slash}}%
\DeclareRobustCommand{\Bibbtesep}{\bibbtesep\ifjb@tabular\jblinebreak\fi}%
\DeclareRobustCommand{\Bibbfsesep}{\bibbfsesep\ifjb@tabular\jblinebreak\fi}%
\DeclareRobustCommand{\Bibbstesep}{\bibbstesep\ifjb@tabular\jblinebreak\fi}%
\DeclareRobustCommand{\bibansep}{\bibfnfont{: }}%
\DeclareRobustCommand{\bibaesep}{\bibefnfont{: }}%
\DeclareRobustCommand{\bothaesep}{\ifjbweareinbib\bibaesep\else\jbhowsepbeforetitleae\fi}%
\DeclareRobustCommand{\bibatsep}{}\renewcommand*{\bibatsep}{.}%
\DeclareRobustCommand{\bibbdsep}{,}%
\DeclareRobustCommand{\bibBTsep}{\def\jb@first@editor{}\bibbtsep}%
\DeclareRobustCommand{\bibJTsep}{\def\jb@first@editor{}\bibjtsep}%
\DeclareRobustCommand{\bibbtsep}{\inname{} }%
\DeclareRobustCommand{\bibjtsep}{}%
\DeclareRobustCommand{\bibaldelim}{}%
\DeclareRobustCommand{\bibardelim}{}%
\DeclareRobustCommand{\bibpldelim}{[}%
\DeclareRobustCommand{\bibprdelim}{]}%
\DeclareRobustCommand{\bibapyldelim}{}%
\DeclareRobustCommand{\bibapyrdelim}{}%
\DeclareRobustCommand{\dateldelim}{}%
\DeclareRobustCommand{\daterdelim}{}%
\DeclareRobustCommand{\bpubaddr}{:}% between publisher and address
\DeclareRobustCommand{\apyformat}[1]{%
  \ifjb@bibssed
    \let\jbedition\@gobble%
    \unskip\unskip\space%
    \bibapyldelim{}\ifthenelse{\equal{\jb@@edition}{\@empty}}{}{%
    \textsuperscript{\jb@@edition}}#1\bibapyrdelim{}%
  \else
      \bibapyldelim{}#1\bibapyrdelim{}%
  \fi
}%
\DeclareRobustCommand{\ajtsep}{,}
\DeclareRobustCommand{\jblangle}{\raisebox{.15ex}{$\langle$}}
\DeclareRobustCommand{\jbrangle}{\raisebox{.15ex}{$\rangle$}}
\DeclareRobustCommand{\biburlprefix}{\jblangle{}URL: }
\DeclareRobustCommand{\biburlsuffix}{\jbrangle{}}
\DeclareRobustCommand{\biburlfont}[1]{\urlstyle{#1}}%
\DeclareRobustCommand{\urldatecomment}{}
\DeclareRobustCommand{\bibbudcsep}{~--\space}
\DeclareRobustCommand{\bibcommenthowcited}{}
\DeclareRobustCommand{\bibartperiodhowcited}{}
\DeclareRobustCommand{\bibnotcited}{}
\DeclareRobustCommand{\bibhowcited}{}
\DeclareRobustCommand{\howcitedprefix}{}
\DeclareRobustCommand{\howcitedsuffix}{}
\DeclareRobustCommand{\bibvolumecomment}{}
\DeclareRobustCommand{\volumeofname}{}
\DeclareRobustCommand{\alsothesisname}{}
\DeclareRobustCommand{\bibces}{: }
\DeclareRobustCommand{\bibcrossrefcite}{}
\DeclareRobustCommand{\bibcrossrefciteagain}{}
\DeclareRobustCommand{\bibincollcrossrefcite}{}
\DeclareRobustCommand{\bibincollcrossrefciteagain}{}
\DeclareRobustCommand{\bibsnfont}{}%
\DeclareRobustCommand{\bibvtfont}{\textit}%
\DeclareRobustCommand{\osep}{%
    \ifjbweareinbib
        \ifjboxford;\else.\fi % Maarten wishes semi-colon
    \else
        \ifjboxford
            ;% Maarten wishes semi-colon
        \else
            \ifjbchicago
                ;%
            \else
                .%
            \fi
        \fi
    \fi
}%
\DeclareRobustCommand{\reprintname}{\ifjbweareinbib\Reprint\else\reprint\fi}%
\newcommand*{\jbedafti}[1]{}%
\newcommand*{\jbtiafed}[1]{#1}%
\newcommand*{\jbbookedaftertitle}{%
    \renewcommand\jbedafti[1]{##1}%
    \renewcommand\jbtiafed[1]{}}
% REM 0.6, error when loading alphanum after jurabib
%\providecommand{\J@LongToc}{}
\providecommand{\addto}{\g@addto@macro}
\def\jb@add@to#1#2{\addto{#1}{#2}#2}% <=== ?????
%\def\jb@add@to#1#2{\addto{#1}{#2}}%
% macro for changing macros inside \bibs<language>, thanks to Bernard Gaulle
\def\AddTo#1#2{\AtBeginDocument{\jb@add@to#1{#2}}}%
% macros for adding definitions via \addto
\newcommand*{\jbonlyforcitations}{}
\newcommand*{\jbonlyforbib}{}
\newcommand*{\jbonlyforfirstcitefullbegin}{}
\newcommand*{\jbonlyforfirstcitefullend}{}
% NO starred '\[re]newcommand*' for the annote commands! Causes problems when using \par inside annote
\newcommand{\bibAnnote}[1]{}
\newcommand{\bibAnnoteFile}[1]{}
\newcommand{\bibAnnotePath}[1]{\def\jb@ann@input@path{#1}}
\ifx\jb@ann@input@path\@undefined\let\jb@ann@input@path\input@path\fi
\newcommand{\jbannoteformat}[1]{{\small#1\par}}%
\providecommand{\bbl@main@language}{english}%
\newif\ifjbhum
\newif\ifjboxford
\newif\ifjbchicago
\newcommand*{\aftervolsep}{,}%
\DeclareRobustCommand{\volumeformat}[1]{\Volumename~#1\aftervolsep}%
\DeclareRobustCommand{\artvolumeformat}[1]{#1}%
\DeclareRobustCommand{\pervolumeformat}[1]{#1}%
\DeclareRobustCommand{\revvolumeformat}[1]{#1}%
\DeclareRobustCommand{\artnumberformat}[1]{\unskip,\space Nr.~#1}%
\DeclareRobustCommand{\pernumberformat}[1]{\unskip\space Nr.~#1}%
\DeclareRobustCommand{\revnumberformat}[1]{\unskip\space Nr.~#1}%
\DeclareRobustCommand{\artyearformat}[1]{\bibaldelim#1\bibardelim}%
\DeclareRobustCommand{\peryearformat}[1]{\bibpldelim#1\bibprdelim}%
\DeclareRobustCommand{\revyearformat}[1]{\artyearformat{#1}}%
\DeclareRobustCommand{\artvolnumformat}[2]{%
    \ifthenelse{\equal{#1}{}}{%
        #2%
    }{%
        \ifthenelse{\equal{#2}{}}{%
           #1%
        }{%
            \artvolumeformat{#1}\artnumberformat{#2}%
        }%
    }%
}%
\DeclareRobustCommand{\pervolnumformat}[2]{%
    \ifthenelse{\equal{#1}{}}{%
        #2%
    }{%
        \ifthenelse{\equal{#2}{}}{%
           #1%
        }{%
            \pervolumeformat{#1}\pernumberformat{#2}%
        }%
    }%
}%
\DeclareRobustCommand{\revvolnumformat}[2]{\artvolnumformat{#1}{#2}}%
\DeclareRobustCommand{\translator}[3]{%
   \unskip\unskip\space%
   \ifthenelse{\equal{#1}{}}{% translator missing
        \ifjboxford\transfrom\else\Transfrom\fi\jbflanguage{#2}%
   }{% translator given
        \ifthenelse{\equal{\bbl@main@language}{german}}{% main language german
            \ifthenelse{\equal{#2}{}}{% language missing
                {\"U}bers. \transby{} #1%
            }{% language given
                \ifjboxford\transfrom\else\Transfrom\fi\jbflanguage{#2} ^^fcbers. \transby{} #1%
            }%
        }{%
            \ifthenelse{\equal{#2}{}}{% language missing
                \trans{} \transby{} #1%
            }{% language given
                \trans{} \transfrom{}\jbflanguage{#2} \transby{} #1%
            }%
        }%
   }% dot or not?
   \ifjbchicago
      \ifthenelse{\equal{#3}{1}}{% \(type=incollection \and editor given\) \or type=article
        \bibatsep{}%
      }{}%
   \else
      \ifthenelse{\equal{#3}{1}\and\not\boolean{jboxford}}{%
        \bibatsep{}%
      }{}%
   \fi
}%
\DeclareRobustCommand{\jbflanguage}[1]{%
    \unskip\space% prevent from additional spaces for empty \transfrom macros
    \ifthenelse{\equal{#1}{german}}{%
        \fromgerman%
    }{%
        \ifthenelse{\equal{#1}{english}}{%
            \fromenglish%
        }{%
            \ifthenelse{\equal{#1}{french}}{%
                \fromfrench%
            }{%
                \ifthenelse{\equal{#1}{dutch}}{%
                    \fromdutch%
                }{%
                    \ifthenelse{\equal{#1}{spanish}}{%
                        \fromspanish%
                    }{%
                        \ifthenelse{\equal{#1}{portuguese}}{%
                            \fromportuguese%
                        }{%
                            \ifthenelse{\equal{#1}{italian}}{%
                                \fromitalian%
                            }{%
                                \ifthenelse{\equal{#1}{norsk}}{%
                                    \fromnorsk%
                                }{%
                                    \ifthenelse{\equal{#1}{finnish}}{%
                                        \fromfinnish%
                                    }{%
                                        \relax
                                    }%
                                }%
                            }%
                        }%
                    }%
        }%
            }%
    }%
    }%
}%
\renewcommand*{\bibstyle}[1]{%
  \ifthenelse{\equal{#1}{jox}}{%
    \global\jb@joxtrue
    \global\jb@humanbst@loadedtrue
    \global\jboxfordtrue
  }{%
      \ifthenelse{\equal{#1}{jchicago}}{%
        \global\jb@author@yeartrue
        \global\jb@yearafterauthortrue
      }{%
          \ifthenelse{\equal{#1}{jureco}}{%
            \global\jb@jurecotrue
            \global\jb@author@yeartrue
            \global\jb@yearafterauthortrue
            \global\jb@yearaftertitlefalse
          }{%
              \ifthenelse{\equal{#1}{jhuman}}{\global\jb@humanbst@loadedtrue}{}%
          }%
      }%
  }%
}%
\DeclareRobustCommand{\jbapifont}[1]{#1}%
\DeclareRobustCommand{\jbbtfont}{}%
\newif\ifjbopcit
\newcommand*{\jb@reset@look@label@for}{}%
\newcommand*{\jb@reset@opcit@label@for}{}%
\newcommand*{\opcit}{\textit{op.\,cit.}}%
\newcommand*{\OpCit}{%
 \ifjbweareinbib\else
   \ifjb@opcit
     \ifjb@@opcit
       \unskip\unskip,%
       \ifjb@ssed@recent@kerned
         \jb@do@ssed@kerning%
       \else
         \space%  space part of the opcit hyperlink?
       \fi
       \ifjb@allow@hyper@cite\hyper@jblinkend\fi
       \endgroup   % <=== here we are ending with the link to the bibliography
       \begingroup % <=== here we are starting a new hyperlink to the source citation of the opcit-sequence
         \ifjb@allow@hyper@cite\hyper@jblinkstart{opcit.\@citeb.\jb@reset@opcit@label@for}\fi
         \opcit%
% we need to check if we are in a crossref, it overrides the settings of the main citation
%         \ifjbcross\else
            \ifthenelse{\equal{\jb@@newpagecite}{}}{\ifjb@lookat\else\global\jb@footnote@periodfalse\fi}{}%
%         \fi
%         \ifthenelse{\equal{\jb@@newpagecite}{}}{\ifjb@lookat\else\global\jb@footnote@periodfalse\fi}{}%
         \ifjb@allow@hyper@cite\hyper@jblinkend\fi % <=== we are closing the opcit hyperlink ...
       \endgroup
       \begingroup
       \ifjb@allow@hyper@cite\hyper@jblinkstart{\@citeb}\fi % <=== ... an reopen the hyperlink to the bibliography
       \jb@extract
     \fi
   \fi
 \fi
}%
\newcommand*{\jb@open}{}%
\newcommand*{\jb@close}{}%
\newcommand*{\jb@cr@open}{}%
\newcommand*{\jb@cr@close}{}%
\newcommand*{\jb@incoll@cr@open}{}%
\newcommand*{\jb@incoll@cr@close}{}%
\newcommand*{\jb@art@cr@open}{}%
\newcommand*{\jb@art@cr@close}{}%
\DeclareRobustCommand{\jbpages}{}%
\DeclareRobustCommand{\jbedition}[1]{%
    \unskip\unskip\ifjb@humanbst@loaded\else\space\fi#1}%
\DeclareRobustCommand{\jbPAGES}{}
\DeclareRobustCommand{\jbPages}[1]{%
  \unskip\unskip\ifjbweareinbib, \else
  \ifjb@comma@before@rest, \else\space\fi\fi
  \jbprformat{#1}%
}%
\DeclareRobustCommand{\jbArchPages}[1]{%
  \unskip\unskip\ifjbweareinbib, \else
  \ifjb@comma@before@rest, \else\space\fi\fi
  \jbprformat{#1}%
}%
\DeclareRobustCommand{\jbartPages}[1]{%
  \ifjbchicago
      \unskip:\space
  \else
      \unskip\unskip\ifjbweareinbib, \else
      \ifjb@comma@before@rest, \else\space\fi\fi
  \fi
  \jbprformat{#1}%
}%
\let\origPAGES\jbPAGES
\let\origpages\jbpages
\let\origPages\jbPages
\let\origartPages\jbartPages
\newcommand*{\jb@endnote}{}%
\DeclareRobustCommand{\jbendnote}[1]{}% default
\DeclareRobustCommand{\jbnote}[2]{%
    \ifjbweareinbib
        \unskip\unskip\ifthenelse{\equal{#1}{1}}{, #2}{#2}%
    \else
% NEW 0.6 if a note is given, we always have to remove spaces! Bug reported by Frank Mittelbach
        \unskip\unskip%
    \fi
}%
\newcommand*{\jb@open@clean@for@crossref}{%
  \jb@no@lookat@for@bibtrue
  \jbcrosstrue
  \ifjb@all@full
   \jb@save@allfull@statustrue
   \jb@all@fullfalse
   \jb@fullcite@againfalse
  \fi
% if lookat is active, save (it could be redef'd) and suppress it in crossrefs
  \ifjb@lookat
   \jb@save@lookat@statustrue
   \jb@lookatfalse
  \fi
  \noibidem
  \let\jbauthorfont\biblnfont
  \let\jbauthorfnfont\bibfnfont
  \let\jbactualauthorfont\biblnfont
  \let\jbactualauthorfnfont\bibfnfont
  \ifjbweareinbib
    \let\jbhowsepbeforetitle\bibansep
    \let\jbhowsepbeforetitleae\bibaesep
  \fi
  \let\jbbtasep\bibbtasep
  \let\jbbfsasep\bibbfsasep
  \let\jbbstasep\bibbstasep
  \let\jbbtesep\bibbtesep
  \let\jbbfsesep\bibbfsesep
  \let\jbbstesep\bibbstesep
  \let\jbtitlefont\bibtfont
  \let\jbbtitlefont\bibbtfont
  \let\jbapifont\bibapifont
  \let\jb@extraspace\space
}%
\newcommand*{\jb@close@clean@for@crossref}{%
  \ifjb@save@allfull@status
   \jb@all@fulltrue
   \jb@save@allfull@statusfalse
  \fi
  \ifjb@save@lookat@status
   \jb@lookattrue
   \jb@save@lookat@statusfalse
  \fi
  \jb@no@lookat@for@bibfalse
  \jbcrossfalse
  \jb@indextrue
  \noidem
}%
\DeclareRobustCommand{\jbcrossrefchecked}[2][]{%
 \begingroup
 \jb@open@clean@for@crossref
   \ifjb@firstcite@full\ifjb@all@full\else
     \@ifundefined{citefull@#2}{%
         \global\@namedef{citefull@#2}{citefull}%
     }{}%
   \fi\fi
   \ifthenelse{\equal{#1}{}}{%
    \jb@cr@open%
     \inname{} %
      % make a difference between first crossref cite
      % and again crossref cite (ONLY FOR CITATION! 0.5e)
     \ifjbweareinbib
        \ifjb@index@bib\else\jb@indexfalse\fi\bibcrossrefcite{#2}%
     \else
      \@ifundefined{NORMCR@#2}{%
        \global\@namedef{NORMCR@#2}{}%
        \bibcrossrefcite{#2}%
      }{%
         \jb@indexfalse\bibcrossrefciteagain{#2}%
      }%
     \fi
    \jb@cr@close%
   }{%
    \jb@cr@open%
     \ifjboxford\volumename\else\Volumename\fi~#1 \volumeofname{} %
      % make a difference between first crossref cite
      % and again crossref cite (ONLY FOR CITATION! 0.5e)
     \ifjbweareinbib
        \ifjb@index@bib\else\jb@indexfalse\fi\bibcrossrefcite{#2}%
     \else
      \@ifundefined{NORMCR@#2}{%
        \global\@namedef{NORMCR@#2}{}%
        \bibcrossrefcite{#2}%
      }{%
        \jb@indexfalse\bibcrossrefciteagain{#2}%
      }%
     \fi
    \jb@cr@close%
   }%
  \jb@close@clean@for@crossref
 \endgroup% Grouping (otherwise fonts changed if `howcited')
}%
\DeclareRobustCommand{\jbartcrossrefchecked}[2][]{{%
 \jb@open@clean@for@crossref
   \ifjb@firstcite@full\ifjb@all@full\else
     \@ifundefined{citefull@#2}{%
         \global\@namedef{citefull@#2}{citefull}%
     }{}%
   \fi\fi
   \ifthenelse{\equal{#1}{}}{%
      \jb@art@cr@open%
        \inname{} %
         \ifjbweareinbib
          \ifjb@index@bib\else
           \jb@indexfalse
          \fi
          \bibcrossrefcite{#2}%
         \else
          \@ifundefined{ARTCR@#2}{%
            \global\@namedef{ARTCR@#2}{}%
            \bibcrossrefcite{#2}%
          }{%
            \jb@indexfalse\bibcrossrefciteagain{#2}%
          }%
         \fi
      \jb@art@cr@close%
   }{%
      \jb@art@cr@open%
        \Volumename~#1 \volumeofname{} %
        \ifjbweareinbib
         \ifjb@index@bib\else
          \jb@indexfalse
         \fi
         \bibcrossrefcite{#2}%
        \else
          \@ifundefined{ARTCR@#2}{%
             \global\@namedef{ARTCR@#2}{}%
             \bibcrossrefcite{#2}%
           }{%
             \jb@indexfalse\bibcrossrefciteagain{#2}%
           }%
         \fi
      \jb@art@cr@close%
   }%
 \jb@close@clean@for@crossref
 }%
}%
\newcommand*{\fullnameoxfordcrossref}[1]{%
       \ifjb@debug
           \ifjb@debug@br[\fi
                \textcolor[named]{Dandelion}{\citefield{author}{#1}\jbhowsepbeforetitle\citefield{title}{#1}}%
           \ifjb@debug@br]\fi
       \else
          \citefield{author}{#1}\jbhowsepbeforetitle\citefield{title}{#1}%
       \fi
}
\newcommand*{\jbedbyincollcrossreflong}[1]{%
      \ifjbweareinbib
         \bibtfont{\citefield{title}{#1}}%
      \else
         \jbbtfont{\citefield{title}{#1}}%
      \fi
      \bibatsep{} %
      \ifthenelse{\equal{\bibatsep}{.}}{\Edbyname{} }{\edbyname{} }%
      \citefield{author}{#1}%
      \unskip\ifjbetal\jbetalfalse\else.\fi\space%
      \citefield{apy}{#1}%
      \unskip\unskip%
}
\newcommand*{\jbedbyincollcrossrefshortwithapy}[1]{%
      \ifjbweareinbib
         \bibtfont{\citefield{shorttitle}{#1}}%
      \else
         \jbbtfont{\citefield{shorttitle}{#1}}%
      \fi
      \bibatsep{} %
      \ifthenelse{\equal{\bibatsep}{.}}{\Edbyname{} }{\edbyname{} }%
      \citefield{shortauthor}{#1}%
      \unskip\ifjbetal\jbetalfalse\else.\fi\space%
      \citefield{apy}{#1}%
      \unskip\unskip%
}
\newcommand*{\jbedbyincollcrossrefshortnoapy}[1]{%
      \ifjbweareinbib
         \bibtfont{\citefield{shorttitle}{#1}}%
      \else
         \jbbtfont{\citefield{shorttitle}{#1}}%
      \fi
      \bibatsep{} %
      \ifthenelse{\equal{\bibatsep}{.}}{\Edbyname{} }{\edbyname{} }%
      \citefield{shortauthor}{#1}%
      \unskip\unskip%
}
\newcommand*{\jbedbyincollcrossrefshort}[1]{%
      \citefield{shortauthor}{#1}%
      \unskip\unskip%
}
\DeclareRobustCommand{\jbincollcrossref}[2]{%
 \begingroup
 \jb@open@clean@for@crossref
 \jb@incoll@cr@open%
 \ifjb@firstcite@full\ifjb@all@full\else
     \@ifundefined{citefull@#1}{%
         \global\@namedef{citefull@#1}{citefull}%
     }{}%
 \fi\fi
 \ifthenelse{%
      \boolean{jb@edby}%
      \and
      \boolean{jbchicago}%
      \and
      \equal{#2}{1}% is there an editor???
 }{%
      \let\bibedformat\@gobble % exists only in jhuman.bst
      \incollinname{} %
      \hyper@jblinkstart{#1}%
      \ifjbweareinbib
         \jbedbyincollcrossrefcite{#1}%
      \else
         \@ifundefined{INCCR@#1}{%
            \global\@namedef{INCCR@#1}{}%
            \jbedbyincollcrossrefcite{#1}%
         }{%
            \jbedbyincollcrossrefciteagain{#1}%
         }%
      \fi
      \hyper@jblinkend%
 }{%
      \incollinname{} %
      \ifjbweareinbib
        \ifjb@index@bib\else
         \jb@indexfalse
        \fi
        \bibincollcrossrefcite{#1}%
      \else
        \@ifundefined{INCCR@#1}{%
           \global\@namedef{INCCR@#1}{}%
           \bibincollcrossrefcite{#1}%
        }{%
          \jb@indexfalse\bibincollcrossrefciteagain{#1}%
        }%
      \fi
 }%
 \jb@incoll@cr@close%
 \jb@close@clean@for@crossref
 \endgroup% Grouping (otherwise fonts changed if `howcited')
}%
\DeclareRobustCommand{\numberandseries}[2]{%
    \unskip\unskip\ifjb@jox\else,\fi
    \space\bibsnfont{#2}%
    \ifthenelse{\equal{#1}{}}{}{~#1}%
}%
% #1=editor, #2=more than one ed switch #3=booktitle, #4=volume, #5=booktitleaddon switch (1=yes)
\newcommand*{\edbysep}{\bibatsep{} }%
\newcommand*{\incolledformat}[5]{%
 \bibBTsep%
 \ifjb@edby
    #3%
    \ifx\relax#1\relax
     \ifx\relax#5\relax\else
      \ifx\relax#4\relax
        \bibatsep{}%
      \else
        \bibatsep{}\space%
      \fi
     \fi
    \else
% CH 0.6 \jb@@tempa removed because of expanding problems in .aux file,
% \incolledformat in general will become obsolete if jurabib.mbs comes out!
%        \def\jb@@tempa{.}%
        \ifx\relax#5\relax
            \ifjb@humanbst@loaded\edbysep{}\fi
%            \ifx\bibatsep\jb@@tempa
            \Edbyname{} %
%            \else\edbyname{} \fi
        \else
            \edbysep{}%
%            \ifx\bibatsep\jb@@tempa
            \Edbyname{} %
%            \else\edbyname{} \fi
        \fi
        \begingroup
            #1%
        \endgroup
    \fi
    \ifx\relax#4\relax\else
      \ifx\relax#1\relax\else
        \ifx\relax#5\relax
          .\space%
        \else
          \bibatsep{} %
        \fi
      \fi
      \Volumename~#4%
    \fi
    \ifx\relax#1\relax
     \ifx\relax#4\relax\else.\fi % volume empty
    \else
      \ifjb@humanbst@loaded\else
        \ifjbchicago\else.\fi
      \fi
    \fi
 \else
  \ifx\relax#1\relax\else
      \begingroup
          #1 % editor
      \endgroup
      \ifx\relax#2\relax\else#2\fi
      \bothaesep%
    \fi
    #3%
    \ifx\relax#4\relax
      \ifx\relax#5\relax\else% No volume, but booktitleaddon
        \bibatsep%
      \fi
    \else
      \ifx\relax#5\relax\else,\space\fi% volume and booktitleaddon
      \volumeformat{#4}%
    \fi
 \fi
}
% NEW 0.5f: contributed by Stefan Ulrich
% ------------------------- NEW URL Interface --------------------------------
% for defining URLs in the bibliography. These might be used in other
% places as well (such as footnotes), so we use url.sty's \urldef
% to define aliases in the form `\jburl@<citation-key>' for them
% (this alias is unique, since each bib entry can only have one
% URL field).
% To make this work with hyperref, the aliases need to be written
% to a separate auxiliary file (we can't use \@auxout, since this is
% read \AtBeginDocument, after hyperref, but an incompatibility
% between hyperref and url makes it necessary to use \urldef *before*
% loading hyperref).
% As with url.sty, the URL may contain arbitrary characters,
% but `{}' must be properly nested.
% In 0.5f beta 25 Stefan Ulrich contributed a solution for the
% `%\n' BibTeX bug, similar to the solution in hyperref.
% Very special thanks!
\newcommand\jburldef{}
\newcommand\jb@urldef{}
\newcommand\jb@returnAfterFi{}
\long\def\jb@returnAfterFi#1\fi{\fi#1}
\newcommand*\jb@remove@percentCr{}% see hyperref.sty's \Hy@RemovePercentCr
\begingroup % no `%' inside this group! (Changing \endlinechar makes this easier).
% Following implements deletion of `%\n' in \jburldef like in hyperref (url.sty
% doesn't do this).
% Inside \jburldef, `^^M' needs to be active so that it expands to a space when
% writing to \jb@urlfile; `%' only needs to have catcode 12.
\endlinechar\m@ne
\catcode`\^^M\active
\catcode`\%=12
\gdef\jburldef#1{
    \begingroup
    \def\jb@bbl@key{#1}
    \let\do\@makeother\dospecials
    \catcode`{\@ne \catcode`}\tw@
    \catcode`\^^M\active
    \def^^M{ }
    \jb@urldef
}
\gdef\jb@remove@percentCr#1%^^M#2\@nil{
    #1
    \ifx\limits#2\limits
    \else
        \jb@returnAfterFi\jb@remove@percentCr#2\@nil
    \fi
}
\gdef\jb@urldef#1{
    \edef\@tempa{\jb@remove@percentCr#1%^^M\@nil}
    \immediate\write\jb@urlfile{
        \string\expandafter\string\urldef\string\csname\space
        jburl@\jb@bbl@key\string\endcsname\string\url\string{\@tempa\string}
    }
    \endgroup
}
\endgroup
\DeclareRobustCommand*\jburluse[1]{%
  \biburlprefix\csname jburl@#1\endcsname\biburlsuffix%
}
\newwrite\jb@urlfile
% load our url file:
\InputIfFileExists{\jobname.url}{}{}
% Now to some interface paranoia ;-)
% Since we'll try to write to \jobname.url, which is not a standard
% LaTeX .aux file, the user might have a file with the same name
% somewhere in TeX's search path. We don't want to overwrite such a
% file; therefore we check whether the first line equals a special
% `signature' line and only in this case overwrite the file.
\newread\jb@tempfile
\newcommand*\testnosig{}%
{% no spaces or percents in this group! (Changing \endlinechar makes this easier).
\catcode`\ =12
\catcode`\%=12
\endlinechar\m@ne
% CH 0.52o year + version removed, so warning should not appear when the file was created by jurabib
\gdef\jb@signature@line{%%% jurabib url repository}
\gdef\jb@if@no@sigline#1#2{\ifx#1\jb@signature@line\else#2\fi}}
\newcommand*\jb@chk@overwrite[1]{%
    \bgroup
    \openin\jb@tempfile=#1\relax
        \let\do\@makeother \dospecials
        \endlinechar\m@ne
        \ifeof\jb@tempfile
            % \typeout{File `#1' doesn't exist}%
        \else
            \read\jb@tempfile to\@tempa
            \ifeof\jb@tempfile
                % \typeout{File `#1' is empty}%
            \else
                \jb@if@no@sigline{\@tempa}{%
                    \ClassError{jurabib}{%
                        file `#1' not written by jurabib%
                    }{%
                        This doesn't look like a file written by jurabib.^^J%
                        Please save any valuable information contained in this file^^J%
                        to another place.^^J%
                        If you hit RETURN now, the file will be overwritten.^^J%
                    }%
                }%
            \fi
        \fi
    \closein\jb@tempfile
    \egroup
% arrive here only if the user didn't abort, erase the file:
    \immediate\openout\jb@urlfile#1
% ... and write our `signature line' to it:
    \immediate\write\jb@urlfile{\jb@signature@line}%
    \AtEndDocument{\closeout\jb@urlfile}
}
\jb@chk@overwrite{\jobname.url}
% ------------------------- NEW URL Interface --------------------------------
\DeclareRobustCommand{\lookatprefix}{}%
\DeclareRobustCommand{\lookatsuffix}{}%
\newcommand*{\noibidem}{%
  \gdef\jb@@lastauthorcite{}%
  \gdef\jb@@lastannotatorcite{}%
  \gdef\jb@@lastpagecite{}%
}%
% NEW 0.5e
\newcommand*{\noidem}{%
  \gdef\jb@@last@@author{}%
  \gdef\jb@@last@@title{}%
}%
\newcommand*{\nextcitefull}[1]{%
 {\@for\@tempa:=#1\do{%
    \global\@namedef{\@tempa}{allnextfull}}}%
}%
\newcommand*{\nextciteshort}[1]{%
  {\@for\@tempa:=#1\do{%
    \global\@namedef{\@tempa}{allnextshort}}}%
}%
\newcommand*{\nextcitenotitle}[1]{%
  {\@for\@tempa:=#1\do{%
    \global\@namedef{\@tempa}{allnextnotitle}}}%
}%
\newcommand*{\nextcitereset}[1]{%
  {\@for\@tempa:=#1\do{%
    \global\@namedef{\@tempa}{}}}%
}%
\newcommand*{\citeswithoutentry}[1]{%
  {\@for\@tempa:=#1\do{%
    \global\@namedef{NOBIB@\@tempa}{suppress}}}%
}%
% NEW 0.52p, suppress first names for full (first or not) citations
\newcommand*{\nofirstnameforcitation}{\jb@no@firstnametrue}%
\newcommand*{\jb@cite@title@types}{}%
\newcommand*{\jb@cite@notitle@types}{}%
\newcommand*{\citetitlefortype}[1]{\gdef\jb@cite@title@types{#1}}%
\newcommand*{\citenotitlefortype}[1]{\gdef\jb@cite@notitle@types{#1}}%
\newcommand*{\jb@cite@title@for@type@hook}{%
    \@for\@tempa:=\jb@cite@title@types\do{%
        \protected@edef\@tempb{\jb@@type}%
%       comparing: \@tempa-\@tempb
        \ifx\@tempa\@tempb
%           Match!!
            \def\jb@@title@switch{1}%
        \fi
    }%
}%
\newcommand*{\jb@cite@no@title@for@type@hook}{%
    \@for\@tempa:=\jb@cite@notitle@types\do{%
        \protected@edef\@tempb{\jb@@type}%
%       comparing: \@tempa-\@tempb
        \ifx\@tempa\@tempb
%           Match!!
            \def\jb@@title@switch{-1}%
        \fi
    }%
}%
% NEW 0.52n, \citefullfirstfortype{<typelist>} allows to specify a list of publication types for which `citefull=first' works.
\def\jb@@cite@fullfirst@switch{}%
\newcommand*{\jb@cite@full@first@types}{}%
\newcommand*{\citefullfirstfortype}[1]{\gdef\jb@cite@full@first@types{#1}}%
\newcommand*{\jb@cite@full@first@fortype@hook}{%
    \@for\@tempa:=\jb@cite@full@first@types\do{%
        \protected@edef\@tempb{\jb@@type}%
        \ifx\@tempa\@tempb
            \def\jb@@cite@fullfirst@switch{1}%
        \fi
    }%
}%
\citefullfirstfortype{article,book,booklet,commented,inbook,incollection,inproceedings,jurthesis,manual,mastersthesis,misc,periodical,phdthesis,proceedings,techreport,unpublished,www,archival}
% NEW 0.6 lookat for type
\def\jb@@lookat@for@type@switch{}%
\newcommand*{\jb@lookat@types}{}%
\newcommand*{\lookatfortype}[1]{\gdef\jb@lookat@types{#1}}%
\newcommand*{\jb@lookat@fortype@hook}{%
    \@for\@tempa:=\jb@lookat@types\do{%
        \protected@edef\@tempb{\jb@@type}%
        \ifx\@tempa\@tempb
            \def\jb@@lookat@for@type@switch{1}%
        \fi
    }%
}%
\lookatfortype{article,book,booklet,commented,inbook,incollection,inproceedings,jurthesis,manual,mastersthesis,misc,periodical,phdthesis,proceedings,techreport,unpublished,www,archival}
% \citeworkwithtitle allows to specify a list of works, for those the title should always be printed.
\newcommand*{\jb@cite@title@work}{}%
\newcommand*{\citeworkwithtitle}[1]{\gdef\jb@cite@title@work{#1}}%
\newcommand*{\jb@cite@title@for@work@hook}{%
    \@for\@tempa:=\jb@cite@title@work\do{%
        \protected@edef\@tempb{\jb@@newauthorcite}%
        \ifx\@tempa\@tempb
            \def\jb@@mult@switch{1}%
        \fi
    }%
}%
\newcommand*{\jb@start@page@for@types}{}%
\newcommand*{\jb@start@page@for@types@arg}{}%
\newcommand*{\jb@start@page@for@type@hook}{%
    \@for\@tempa:=\jb@start@page@for@types\do{%
        \protected@edef\@tempb{\jb@@type}%
        \ifx\@tempa\@tempb
            \def\jb@start@page@for@types@arg{1}%
        \fi
    }%
}%
\newcommand*{\jb@formatted@year}{%
	\nobreakspace\textup{\jbcitationyearformat{\jb@@year}}%
    \ifjb@oyear@in@citation\jb@formatted@oyear\fi
}%
\newcommand*{\jb@formatted@oyear}{%
	\ifthenelse{\equal{\jb@@oyear}{}}{}{\unskip\unskip\textup{\jbcitationoyearformat{\jb@@year}}}%
}%
\DeclareRobustCommand{\jbyear}{% NEW 0.5c
  \ifjb@author@year
   \ifthenelse{\equal{\jb@@year}{}}{%
      \@ifundefined{NOYEAR@\jb@@newauthorcite}{%
        \global\@namedef{NOYEAR@\jb@@newauthorcite}{}%
        \jb@package@warningNoLine{\jb@pkg@name}{%
        No year for `\jb@@newauthorcite'!}}{\relax}%
        \let\jbcitationyearformat\@empty
   }{%
      \jb@formatted@year%
   }%
  \fi
}%
% NEW 0.5f improved \bibYear macro, difference between citation and
% bibliography introduced (suggested by Uwe Kellermann)
\DeclareRobustCommand{\bibYear}[1]{% only for jureco.bst
  \ifx\relax#1\relax\else
     \nobreakspace\bibfnfont{%
        \textup{%
%       ^^^^^^^ to protect from smallcaps and ...
            \ifjbweareinbib
                \jbbibyearformat{#1}%
            \else
                \jbcitationyearformat{#1}%
            \fi
        }%
     }%
  \fi
}%
\DeclareRobustCommand{\jbts}{\textsuperscript}%
\newcommand*{\bibleftcolumn}{6pc}%
\newcommand*{\bibcolumnsep}{1pc}%
\newcommand*{\bibrightcolumn}{\textwidth-\bibnumberwidth-\bibcolumnsep-\bibleftcolumn}%
\newcommand*{\bibleftcolumnadjust}{\raggedright}%
\newcommand*{\bibrightcolumnadjust}{\raggedright}%
% NEW 0.6 command for linespace adjustment in tabular mode added
\newcommand*{\bibleftcolumnstretch}{}%
\newcommand*{\bibrightcolumnstretch}{}%
\newcommand*{\bibtabularitemsep}{}%
\newcommand*{\bibaltformatalign}{\relax}%
\newcommand*{\jbdebug}{\jb@debugtrue
  \jb@info{*** Debugging ON ***}%
  \footnote{\textcolor[named]{Blue}{[volles Erstzitat]}}%
  \footnote{\textcolor[named]{Red}{[volles Wiederholungszitat]}}%
  \footnote{\textcolor[named]{Dandelion}{[Kurzzitat]}}%
  \footnote{\textcolor[named]{WildStrawberry}{[ibidem]}}%
  \footnote{\textcolor[named]{Gray}{[Titel ersetzt]}}%
% \renewcommand*{\@biblabel}[1]{%
% \footnotesize\textcolor[named]{NavyBlue}{##1}}%
  \setcounter{footnote}{0}%
}%
\DeclareRobustCommand{\jbhowsepannotatorlast}{{\normalfont\slash}}%
\DeclareRobustCommand{\jbhowsepbeforetitle}{\space}%
% special separation after ed's.
\DeclareRobustCommand{\jbhowsepbeforetitleae}{\jbhowsepbeforetitle}%
\DeclareRobustCommand{\jbhowsepbeforetitleibidemname}{,}%
\DeclareRobustCommand{\jbhowsepannotatorfirst}{~in: }%
% 0.51p changed, bug reported by Tilman Finke
\newcommand*{\jbbeforestartpagesep}{\space}%
\renewcommand*{\@biblabel}[1]{}%
% added
\newcommand*{\jb@firstofseven}  [7]{#1}%
\newcommand*{\jb@secondofseven} [7]{#2}%
\newcommand*{\jb@thirdofseven}  [7]{#3}%
\newcommand*{\jb@fourthofseven} [7]{#4}%
\newcommand*{\jb@fifthofseven}  [7]{#5}%
\newcommand*{\jb@sixthofseven}  [7]{#6}%
\newcommand*{\jb@seventhofseven}[7]{#7}%
\def\jb@@author{\expandafter\jb@firstofseven\jb@tempa\@empty}% Never add \unskip HERE !!!!!
\def\jb@@shorttitle{\expandafter\jb@secondofseven\jb@tempa\@empty}% Never add \unskip HERE !!!!!
% \jb@thirdofseven=\jb@tempb !!!!
% \jb@fourthofseven=\jb@tempc !!!!
\def\jb@@fullname{\expandafter\jb@fifthofseven\jb@tempa\@empty}% Never add \unskip HERE !!!!!
% \jb@@fullname test for empty doesn't give the right results!!
\def\jb@@fulltitle{\expandafter\jb@sixthofseven\jb@tempa\@empty\unskip}%
%\jb@seventhofseven=\@empty !!!!
\newcommand*{\jb@firstofnine}  [9]{#1}%
\newcommand*{\jb@secondofnine} [9]{#2}%
\newcommand*{\jb@thirdofnine}  [9]{#3}%
\newcommand*{\jb@fourthofnine} [9]{#4}%
\newcommand*{\jb@fifthofnine}  [9]{#5}%
\newcommand*{\jb@sixthofnine}  [9]{#6}%
\newcommand*{\jb@seventhofnine}[9]{#7}%
\newcommand*{\jb@eighthofnine} [9]{#8}%
\newcommand*{\jb@ninethofnine} [9]{#9}%
\def\jb@@mult@switch{\expandafter\jb@firstofnine\jb@tempb}%
\def\jb@@howcited{\expandafter\jb@secondofnine\jb@tempb}%
\def\jb@@type{\expandafter\jb@thirdofnine\jb@tempb}%
\def\jb@@year{\expandafter\jb@fourthofnine\jb@tempb}%
\def\jb@@edition{\expandafter\jb@fifthofnine\jb@tempb}%
\def\jb@@edition@switch{\expandafter\jb@sixthofnine\jb@tempb}%
\def\jb@@language{\expandafter\jb@seventhofnine\jb@tempb}%
\def\jb@@pages{\expandafter\jb@eighthofnine\jb@tempb}%
\def\jb@@apy{\expandafter\jb@ninethofnine\jb@tempb}%
%
\def\jb@@title{\expandafter\jb@firstofnine\jb@tempc}%
\def\jb@@gender{\expandafter\jb@secondofnine\jb@tempc}%
% NEW 0.6 oyear in text citation
\def\jb@@oyear{\expandafter\jb@thirdofnine\jb@tempc}%
% 1: both author and editor given
% 2: editor empty, author not
% 3: author empty, editor not
% 4: author and editor empty
\def\jb@@aut@ed@switch{\expandafter\jb@fourthofnine\jb@tempc}%
%
%\def\jb@@{\expandafter\jb@fifthofnine\jb@tempc}%
%\def\jb@@{\expandafter\jb@sixthofnine\jb@tempc}%
%\def\jb@@{\expandafter\jb@seventhofnine\jb@tempc}%
%\def\jb@@{\expandafter\jb@eighthofnine\jb@tempc}%
%\def\jb@@{\expandafter\jb@ninethofnine\jb@tempc}%
\def\jb@@title@switch{}%
\newcommand*{\jb@extract}{%
   \protected@edef\jb@tempa{\csname b@\@citeb\@extra@b@citeb\endcsname}%
   \protected@edef\jb@tempb{\expandafter\jb@thirdofseven\jb@tempa\@empty}%
   \protected@edef\jb@tempc{\expandafter\jb@fourthofseven\jb@tempa\@empty}%
}%
\def\jb@use@fullcite{%
 \ifthenelse{\equal{\jb@@author}{empty}}{%
     \ifthenelse{\equal{\jb@@fullname}{\@empty}}{%
        \jb@@fulltitle%
     }{%
        \jb@@fullname\normalfont{\jbhowsepbeforetitle}\jb@@fulltitle\unskip%
     }%
 }{%
     \ifthenelse{\equal{\jb@@fullname}{\@empty}}{%
        \jbauthorfont{\jb@@author}\normalfont{\jbhowsepbeforetitle}\jb@@fulltitle%
     }{%
        \jb@@fullname\normalfont{\jbhowsepbeforetitle}\jb@@fulltitle\unskip%
     }%
 }%
}%
\newcommand*{\jb@extraspace}{\space}%
% chapterbib compatibility
\@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}%
% CH 0.6, reworked bibunits compatibility
\providecommand\@newciteauxhandle{\@auxout}
\AtBeginDocument{\@ifundefined{newcites}{\global\let\@restore@auxhandle\relax}{}}
% NEW 0.6 multibib compatibility
\def\@restore@auxhandle{\gdef\@newciteauxhandle{\@auxout}}
\providecommand\hyper@natlinkstart[1]{}
\providecommand\hyper@natlinkend{}
\providecommand\hyper@natanchorstart[1]{}
\providecommand\hyper@natanchorend{}
\def\hyper@jblinkstart{\hyper@natlinkstart}
\def\hyper@jblinkend{\hyper@natlinkend}
\def\hyper@jbanchorstart{\hyper@natanchorstart}
\def\hyper@jbanchorend{\hyper@natanchorend}
\def\NAT@parse{}
\def\Hy@reserved@a{}
\newcounter{jbbibcnt}
\newcounter{jbbibcnta}
\newcounter{idemcnt}% NEW 0.5e idem feature
\newcounter{bibnamereplace}%
\newcounter{citefull}%
\newcounter{opcit}%
\newcounter{jb@cites@in@footnote}
\newcommand*{\samepageibidemname}{\ibidemname}
\newcommand*{\samepageibidemmidname}{\ibidemmidname}
\newcommand*{\diffpageibidemname}{\ibidemname}
\newcommand*{\diffpageibidemmidname}{\ibidemmidname}
\newcommand*{\IbidemName}{\ifthenelse{\equal{\jb@@newpagecite}{\jb@@lastpagecite}}{\samepageibidemname}{\diffpageibidemname}}
\newcommand*{\IbidemMidName}{\ifthenelse{\equal{\jb@@newpagecite}{\jb@@lastpagecite}}{\samepageibidemmidname}{\diffpageibidemmidname}}
\newcommand*{\jb@@lastpagecite}{}%
\newcommand*{\jb@@lastannotatorcite}{}%
\newcommand*{\jb@@lastauthorcite}{}%
\newcommand*{\jb@getsecondarg}{}%
\long\def\jb@getsecondarg#1#2#3\@nil{#2}%
\newcommand*{\jb@simple@pageref@by@heiko}[1]{%
  \expandafter\expandafter\expandafter\jb@getsecondarg
  \csname r@#1\endcsname{??}\@nil}%
\newcommand*{\jb@checked@edition}{}%
\newcommand*{\jb@aftertitleedition}{}%
\newcommand*{\jb@handle@superscript@ed}{%
 \let\jb@checked@edition\@empty      % complete removal of superscript edition or
 %\let\jb@kerning@title@ed\@empty    % only removal of kerning?
 %\let\jb@kerning@notitle@ed\@empty  %
}%
% changed for 05.f
\newcommand*{\jb@formatted@author}{%
    \ifjbcross
        \ifthenelse{%
            \equal{\jb@inside@author}{\jb@inside@editor}%
            \and\boolean{jb@idem}%
        }{%
            \jb@@fullname% contains `idem, editor'
        }{%
            \jbauthorfont{\jb@@author}\ifjb@yearafterauthor\jbyear\fi
        }%
    \else
        \jbauthorfont{\jb@@author}\ifjb@yearafterauthor\jbyear\fi
    \fi
}%
\newcommand*{\jb@formatted@co@author}{%
  \jbannotatorfont{\jb@@newannotatorcite}}%
\newcommand*{\jb@formatted@co@author@see}{%
    \textup{\jb@@newannotatorcite}\ifthenelse{\equal{\jb@@newannotatorcite}{}}{}{\space}}%
\newcommand*{\jb@formatted@co@author@in}{%
  \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{\relax}{%
  \jbannotatorfont{\jb@@newannotatorcite}\jbhowsepannotatorfirst}}%
\newcommand*{\jb@checked@title}{%
  \ifjbhum
    \ifthenelse{\equal{\jb@@type}{book}}{%
        \let\jbtitlefont\jbbtfont}{\let\jbtitlefont\jbapifont}%
  \fi
  \ifthenelse{\equal{\jb@@shorttitle}{}}{%
    \ifthenelse{%
        \not\boolean{jb@author@year}%
        \or
        \(
          \boolean{jb@all@titles}%
          \and\boolean{jb@author@year}%
        \)
    }{%
     \ifjb@no@title@replace\else
       \ifjb@noauthorforcitetitle\else
         \normalfont{\jbhowsepbeforetitle}%
       \fi
     \fi
     \ifjb@no@title@replace\else
      \@ifundefined{REPL@\jb@@newauthorcite}{%
       \global\@namedef{REPL@\jb@@newauthorcite}{}%
       \jb@package@warning{\jb@pkg@name}{%
         `shorttitle' for `\jb@@newauthorcite'\MessageBreak
         is missing -- replacing  with `title'\MessageBreak
         field}}{}%
       \ifjb@debug
         \textcolor[named]{Gray}{%
           \ifjb@debug@br[\fi
             \jbfulltitlefont{\jb@@title}%
           \ifjb@debug@br]\fi
         }%
       \else
         \jbfulltitlefont{\jb@@title}%
       \fi%
     \fi
    }{}%
  }{%
    \ifthenelse{%
        \not\boolean{jb@author@year}%
        \or
        \(
          \boolean{jb@all@titles}%
          \and\boolean{jb@author@year}%
        \)
    }{%
       \ifjb@noauthorforcitetitle\else
            \normalfont{\jbhowsepbeforetitle}%
       \fi
       \jbshorttitlefont{\jb@@shorttitle}%
    }{}%
    \@ifundefined{TITLE@\jb@@newauthorcite}{%
        \global\@namedef{TITLE@\jb@@newauthorcite}{used}%
    }{}%
  }%
}%
% NEW 0.5f analogous to previous command, primarily for oxford crossref command
\newcommand*{\jb@checked@author}{%
   \ifthenelse{\equal{\jb@@fullname}{}}{%
      \ifthenelse{\equal{\jb@@author}{}}{%
          \relax
       }{%
          \jbauthorfont{\jb@@author}%
       }%
   }{%
      \jbauthorfont{\jb@@fullname}%
   }%
}%
\newcommand*{\jb@make@annotator@emph}{%
  \ifjb@dynamic@author@fonts%
    \let\jbannotatorfont\jbactualauthorfont%
    \let\jbauthorfont\jbauthorfontifannotator%
  \fi
}%
\newcommand*{\jb@make@author@emph}{%
  \ifjb@dynamic@author@fonts%
    \let\jbauthorfont\jbactualauthorfont%
    \let\jbannotatorfont\normalfont%
  \fi
}%
\newcommand*{\jb@relaxcommandsforfullcite}{%
 \let\IbidemName\@empty
 \let\jb@@author\@empty
 \let\jb@@title\@empty
% NEW 0.5e bug removed for ibidem'ed citations, wrong error message about missing shorttitle
% (although given), submitted by Andreas K. Foerster
% changed \@empty to \relax
 \let\jb@@shorttitle\relax
 \let\jbyear\@empty
 \let\jb@checked@edition\@empty
 \let\jb@@newannotatorcite\@empty
 \let\jbhowsepbeforetitle\@empty
 \let\jbapifont\@empty
 \let\jbbtfont\@empty
% NEW 0.5f avoid output of \jb@formatted@author after fullcite's
 \let\jb@formatted@author\@empty
}%
\newcommand*{\jb@checkperiod}[1]{\jb@periodfalse\jb@@checkperiod#1.\jb@@end}%
\newcommand*{\jb@@checkperiod}{}%
\long\def\jb@@checkperiod#1.#2\jb@@end{%
 \ifthenelse{\equal{#1}{}}{\jb@periodtrue\let\ecmd\relax}{%
 \ifthenelse{\equal{#2}{}}{\let\ecmd\relax}{%
 \def\ecmd{\jb@@checkperiod#2\jb@@end}}}\ecmd}%
\newlength{\jbbibhang}
\setlength{\jbbibhang}{2.5em}
\newlength{\bibnumberwidth}
\settowidth{\bibnumberwidth}{8888.\,}
\DeclareRobustCommand{\jb@checked@bibetal}{%
 \ifjb@bibetal
    \unskip\nobreakspace%
     \ifjb@cite@no@title
        \ifx\jb@@newpagecite\@empty
            \bibIMfont{\etalnamenodot}%
        \else
            \bibIMfont{\etalname}%
        \fi
     \else
        \bibIMfont{\etalname}%
     \fi
 \fi
}
\DeclareRobustCommand{\Bibetal}{\jb@checked@bibetal\global\jbetaltrue}
% CHANGED rewritten in 0.5f
\newcommand*{\jb@checked@etal}{%
  \let\@latex@info\@gobble
  \DeclareRobustCommand{\Bibetal}{%
      \bibIMfont{\etalname}%
      \ifthenelse{\equal{\jb@@newpagecite}{}%
                  \or
                  \(
                      \boolean{jb@firstcite@full}%
                      \and
                      \equal{\jb@@newpagecite}{}%
                      \and
                      \equal{\@nameuse{citefull@\jb@@newauthorcite}}{citefull}%
                  \)
      }{%
% CHANGED 0.5f, boole'd
           \ifthenelse{%
                \not\boolean{jbcross}% NEW, otherwise missing footnote period for citations containing crossref's
                \and
                \not\boolean{jb@lookat}%
                \and
                \not\boolean{jb@author@year}%
                \and
                \not\boolean{jb@fullcite@again}%
                \and
                \not\equal{\jb@@mult@switch}{1}%
           }{%
                \global\jb@footnote@periodfalse
           }{}%
      }{}%
 }%
}%
\newcommand*{\jb@missing@ldf@files}[1]{\ClassError{\jb@pkg@name}{You are in trouble here.\MessageBreak%
    File `#1' not found}{Make sure that all .ldf files are living in the jurabib directory!}}%
\gdef\@bibsfrench{\InputIfFileExists{frjbbib.ldf}{}{\jb@missing@ldf@files{frjbbib.ldf}}}%
\gdef\@bibsgerman{\InputIfFileExists{dejbbib.ldf}{}{\jb@missing@ldf@files{dejbbib.ldf}}}%
\gdef\@bibsaustrian{\InputIfFileExists{dejbbib.ldf}{}{\jb@missing@ldf@files{dejbbib.ldf}}\def\janname{J{^^e4}nner}}%
\gdef\@bibsenglish{\InputIfFileExists{enjbbib.ldf}{}{\jb@missing@ldf@files{enjbbib.ldf}}}%
\gdef\@bibsdutch{\InputIfFileExists{dujbbib.ldf}{}{\jb@missing@ldf@files{dujbbib.ldf}}}%
\gdef\@bibsspanish{\InputIfFileExists{spjbbib.ldf}{}{\jb@missing@ldf@files{spjbbib.ldf}}}%
\gdef\@bibsportuguese{\InputIfFileExists{ptjbbib.ldf}{}{\jb@missing@ldf@files{ptjbbib.ldf}}}%
\gdef\@bibsitalian{\InputIfFileExists{itjbbib.ldf}{}{\jb@missing@ldf@files{itjbbib.ldf}}}%
\gdef\@bibsnorsk{\InputIfFileExists{nojbbib.ldf}{}{\jb@missing@ldf@files{nojbbib.ldf}}}%
\gdef\@bibsfinnish{\InputIfFileExists{fijbbib.ldf}{}{\jb@missing@ldf@files{fijbbib.ldf}}}%
\gdef\@bibsdanish{\InputIfFileExists{dajbbib.ldf}{}{\jb@missing@ldf@files{dajbbib.ldf}}}%
\newcommand*{\jb@kv@warning}[2]{%
  \jb@package@warningNoLine{\jb@pkg@name}{%
   unrecognized value `#1'\MessageBreak
   for key `#2' ignored}}
\define@key{jb}{authorformat}{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{smallcaps}}{%
    \jb@kv@recognizedtrue
    \renewcommand*{\jbauthorfont}{\textsc}%
    \renewcommand*{\jbauthorfnfont}{\textsc}%
    \renewcommand*{\jborgauthorfont}{\textsc}%
    \renewcommand*{\jbannotatorfont}{\textsc}%
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{italic}}{%
    \jb@kv@recognizedtrue
    \renewcommand*{\jbauthorfont}{\textit}%
    \renewcommand*{\jbauthorfnfont}{\textit}%
    \renewcommand*{\jborgauthorfont}{\textit}%
    \renewcommand*{\jbannotatorfont}{\textit}%
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{dynamic}}{%
    \jb@kv@recognizedtrue
    \jb@dynamic@author@fontstrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{citationreversed}}{%
    \jb@kv@recognizedtrue
    \jb@reverse@names@in@citationtrue
    \jb@reverse@all@namesfalse
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{firstnotreversed}}{%
    \jb@kv@recognizedtrue
    \jb@first@author@reversedtrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{allreversed}}{%
    \jb@kv@recognizedtrue
    \jb@reverse@all@namestrue
    \global\let\bibnf\bibrnf
    \global\let\bibenf\bibrenf
    \global\let\biblenf\bibrlenf
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{reducedifibidem}}{%
    \jb@kv@recognizedtrue
    \jb@ibidem@with@short@nametrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{year}}{%
    \jb@kv@recognizedtrue
    \jb@author@yeartrue
    \jb@yearafterauthortrue
    \jbshowbibextralabel
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{indexed}}{%
    \jb@kv@recognizedtrue
    \jb@indextrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{and}}{%
    \jb@kv@recognizedtrue
    \bibsall{%
      \DeclareRobustCommand\jbbtasep  { \bibIMfont{\textandname} }%
      \DeclareRobustCommand\jbbfsasep {\unskip\bibIMfont{\commaname} }%
      \DeclareRobustCommand\jbbstasep { \bibIMfont{\textandname} }%
      \DeclareRobustCommand\bibbtasep { \bibIMfont{\bibandname} }%
      \DeclareRobustCommand\bibbfsasep{\unskip\bibIMfont{\commaname} }%
      \DeclareRobustCommand\bibbstasep{ \bibIMfont{\bibandname} }%
% ed section
      \DeclareRobustCommand\jbbtesep  { \bibEIMfont{\texteandname} }%
      \DeclareRobustCommand\jbbfsesep {\unskip\bibEIMfont{\commaename} }%
      \DeclareRobustCommand\jbbstesep { \bibEIMfont{\texteandname} }%
      \DeclareRobustCommand\bibbtesep { \bibEIMfont{\bibeandname} }%
      \DeclareRobustCommand\bibbfsesep{\unskip\bibEIMfont{\commaename} }%
      \DeclareRobustCommand\bibbstesep{ \bibEIMfont{\bibeandname} }%
    }%
    \addto\@bibsenglish{%
      \DeclareRobustCommand\jbbtasep  { \bibIMfont{\textandname} }%
      \DeclareRobustCommand\jbbfsasep {\unskip\bibIMfont{\commaname} }%
      \DeclareRobustCommand\jbbstasep {\unskip\bibIMfont{\commaname{} \textandname} }%
      \DeclareRobustCommand\bibbtasep { \bibIMfont{\bibandname} }%
      \DeclareRobustCommand\bibbfsasep{\unskip\bibIMfont{\commaname} }%
      \DeclareRobustCommand\bibbstasep{\unskip\bibIMfont{\commaname{} \bibandname} }%
% ed section
      \DeclareRobustCommand\jbbtesep  { \bibEIMfont{\texteandname} }%
      \DeclareRobustCommand\jbbfsesep {\unskip\bibEIMfont{\commaename} }%
      \DeclareRobustCommand\jbbstesep {\unskip\bibEIMfont{\commaename{} \texteandname} }%
      \DeclareRobustCommand\bibbtesep { \bibEIMfont{\bibeandname} }%
      \DeclareRobustCommand\bibbfsesep{\unskip\bibEIMfont{\commaename} }%
      \DeclareRobustCommand\bibbstesep{\unskip\bibEIMfont{\commaename{} \bibeandname} }%
    }%
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{abbrv}}{%
    \jb@kv@recognizedtrue
    \jb@abbrvtrue
  }{\relax}%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{authorformat}\fi
 }%
}%
\define@key{jb}{annotatorformat}{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{italic}}{%
    \jb@kv@recognizedtrue
    \renewcommand*{\jbannotatorfont}{\textit}%
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{normal}}{%
    \jb@kv@recognizedtrue
    \renewcommand*{\jbannotatorfont}{\normalfont}%
  }{\relax}%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{annotatorformat}\fi
 }%
}%
\define@key{jb}{superscriptedition}[commented]{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{all}}{%
    \jb@kv@recognizedtrue\jb@ssed@alltrue}{}%
  \ifthenelse{\equal{\jb@val}{commented}}{%
    \jb@kv@recognizedtrue\jb@ssed@commentedtrue}{}%
  \ifthenelse{\equal{\jb@val}{switch}}{%
    \jb@kv@recognizedtrue\jb@ssed@swtrue}{}%
  \ifthenelse{\equal{\jb@val}{bib}\or\equal{\jb@val}{address}}{%
    \jb@kv@recognizedtrue\jb@bibssedtrue
    \let\jbedition\@gobble}{}%
  \ifthenelse{\equal{\jb@val}{multiple}}{%
    \jb@kv@recognizedtrue\jb@ssed@mult@workstrue}{}%
%  \ifthenelse{\equal{\jb@val}{kerning}}{%
%    \jb@kv@recognizedtrue\jb@ssed@kerning@wantedtrue}{}%
  \ifthenelse{\equal{\jb@val}{year}}{\jb@kv@recognizedtrue
      \renewcommand*{\jbssedbd}{\textsuperscript}%
      \let\jbedition\@gobble\DeclareRobustCommand{\apyformat}[1]{%
      \unskip\unskip\space\bibapyldelim{}##1\bibapyrdelim{}}
  }{}%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{superscriptedition}\fi
 }%
}%
\define@key{jb}{titleformat}{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{italic}}{%
    \jb@kv@recognizedtrue
    \DeclareRobustCommand{\jbtitlefont}{\textit}%
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{all}}{%
    \jb@kv@recognizedtrue
    \ifjb@no@title@replace
        \global\jb@no@title@replacefalse
        \jb@package@warningNoLine{\jb@pkg@name}{%
        `titleformat=all' and `titleformat=noreplace'\MessageBreak
         cannot be used together. I will replace missing\MessageBreak
         shorttitles to avoid ambiguity of citations}%
    \fi
    \jb@all@titlestrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{noreplace}}{%
    \jb@kv@recognizedtrue
    \jb@no@title@replacetrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{commasep}}{%
    \jb@kv@recognizedtrue
    \jb@before@title@separatortrue
    \renewcommand*{\jbhowsepbeforetitle}{, }%
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{colonsep}}{%
    \jb@kv@recognizedtrue
    \jb@before@title@separatortrue
    \renewcommand*{\jbhowsepbeforetitle}{: }%
  }{\relax}%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{titleformat}\fi
 }%
}%
\define@key{jb}{din}[true]{%
  \AtEndOfPackage{%
   \DeclareRobustCommand{\biblnfont}{\textsc}%
   \DeclareRobustCommand{\bibfnfont}{\normalfont}%
   \DeclareRobustCommand{\bibbtfont}{\textit}%
   \DeclareRobustCommand{\bibtfont}{\textit}%
   \DeclareRobustCommand{\bibjtfont}{\textit}%
   \DeclareRobustCommand{\bibapifont}{\normalfont}%
   \DeclareRobustCommand{\bibatsep}{.}%
   \DeclareRobustCommand{\bibbtsep}{\inname{} }%
   \DeclareRobustCommand{\bibjtsep}{\inname{} }%
  }%
}%
\define@key{jb}{howcited}[normal]{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{all}}{%
    \jb@kv@recognizedtrue
    \jb@howcitedtrue
    \jb@howcited@alltrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{normal}}{%
    \jb@kv@recognizedtrue
    \jb@howcitedtrue
    \jb@howcited@normaltrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{multiple}}{%
    \jb@kv@recognizedtrue
    \jb@howcitedtrue
    \jb@howcited@multipletrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{compare}}{%
    \jb@kv@recognizedtrue
    \jb@howcitedtrue
    \jb@howcited@comparetrue
  }{\relax}%
 \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{howcited}\fi
 }%
 \renewcommand*{\jbrealcitation}[2]{%
  \@ifundefined{b@##2@C}{\global\@namedef{b@##2@C}{cite}}{\relax}%
  \ifthenelse{\equal{##1}{citetitle}}{%
    \global\@namedef{b@##2@C}{citetitle}}{\relax}%
  \ifthenelse{\equal{##1}{citenotitle}}{%
    \global\@namedef{b@##2@C}{citenotitle}}{\relax}}%
}%
\define@key{jb}{annotatorfirstsep}{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{#1}{comma}}{%
      \jb@kv@recognizedtrue
      \jb@annotator@lastfalse
      \renewcommand*{\jbhowsepannotatorfirst}{, }%
  }{\relax}%
  \ifthenelse{\equal{#1}{in}}{%
      \jb@kv@recognizedtrue
      \jb@annotator@lastfalse
      \renewcommand*{\jbhowsepannotatorfirst}{~in: }%
  }{\relax}%
  \ifjb@kv@recognized\else\jb@kv@warning{#1}{annotatorfirstsep}\fi
}%
\define@key{jb}{annotatorlastsep}{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{#1}{divis}}{%
      \jb@kv@recognizedtrue
      \jb@annotator@lasttrue
      \renewcommand*{\jbhowsepannotatorlast}{--}%
  }{\relax}%
  \ifjb@kv@recognized\else\jb@kv@warning{#1}{annotatorlastsep}\fi
}%
\define@key{jb}{commabeforerest}[true]{\jb@comma@before@resttrue\renewcommand*{\jbbeforestartpagesep}{,\space}}%
\define@key{jb}{bibformat}{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{compress}}{%
    \jb@kv@recognizedtrue
    \jb@compressed@bibtrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{raggedright}}{%
    \jb@kv@recognizedtrue
    \addto\jbonlyforbib{\raggedright}
    \let\bibaltformatalign\raggedright
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{tabular}}{%
    \jb@kv@recognizedtrue
    \jb@tabulartrue\jb@bib@hangfalse
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{numbered}}{%
    \jb@kv@recognizedtrue
    \jb@numbered@bibtrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{ibidem}}{%
    \jb@kv@recognizedtrue
    \jb@bibformat@ibidemtrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{ibidemalt}}{%
    \jb@kv@recognizedtrue
    \jb@bibformat@ibidemtrue
    \jbaltformattrue
    \jb@compressed@bibtrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{nohang}}{%
    \jb@kv@recognizedtrue
    \jb@bib@hangfalse
  }{\relax}%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{bibformat}\fi
 }%
}%
\define@key{jb}{citefull}[all]{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{first}}{%
    \jb@kv@recognizedtrue
    \jb@change@fonts@for@fullcitetrue
    \jb@firstcite@fulltrue
    \jb@allow@nobibtrue
    \global\jb@annotator@lastfalse
    \ifjb@see\else\renewcommand*{\jbhowsepannotatorfirst}{~in: }\fi
    \jb@all@fullfalse
  }{%
    \ifthenelse{\equal{\jb@val}{all}}{%
      \jb@kv@recognizedtrue
      \jb@all@fulltrue
      \jb@allow@nobibtrue
      \global\jb@howcitedfalse
      \global\jb@annotator@lastfalse
      \ifjb@see\else\renewcommand*{\jbhowsepannotatorfirst}{~in: }\fi
      \jb@firstcite@fullfalse
    }{\relax}%
  }%
  \ifthenelse{\equal{\jb@val}{chapter}}{%
    \jb@kv@recognizedtrue
    \@ifundefined{chapter}{%
     \ClassError{\jb@pkg@name}{%
      Sorry, `citefull=chapter' makes no sense for\MessageBreak
      classes without \string\chapter%
     }{Try `citefull=section' for an article class}}{}%
    \setkeys{jb}{citefull=first}%
    \@addtoreset{citefull}{chapter}%
    \def\jb@resetfor{chapter}%
    \def\jb@reset@look@label@for{\thechapter}% for lookat
  }{%
      \ifthenelse{\equal{\jb@val}{section}}{%
        \jb@kv@recognizedtrue
        \@ifundefined{chapter}{}{%
         \jb@package@warningNoLine{\jb@pkg@name}{%
          `citefull=section' was designed for use with\MessageBreak
          an article class, note that it's not well\MessageBreak
          tested for use with book or report classes}}%
        \setkeys{jb}{citefull=first}%
        \@addtoreset{citefull}{section}%
        \def\jb@resetfor{section}%
        \def\jb@reset@look@label@for{\thesection}% for lookat, to check
      }{%
          \ifthenelse{\equal{\jb@val}{false}}{%
              \jb@kv@recognizedtrue
              \global\jb@all@fullfalse
              \global\jb@allow@nobibfalse
              \global\jb@firstcite@fullfalse
          }{\relax}%
      }%
  }%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{citefull}\fi
 }%
}%
\define@key{jb}{see}[true]{%
    \jb@seetrue\jb@annotator@lastfalse
    \renewcommand*{\jbhowsepannotatorfirst}{}%
    \renewcommand*{\jbannotatorfont}{\normalfont}%
    \let\jb@formatted@co@author\jb@formatted@co@author@see
    \let\jb@formatted@co@author@in\jb@formatted@co@author@see
}%
\define@key{jb}{ibidem}[strict]{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{false}}{%
    \jb@kv@recognizedtrue
    \AtBeginDocument{%
        \global\jb@ibidemfalse
        \global\jb@ibidem@pagewisefalse
        \global\jb@ibidem@double@pagewisefalse
        \global\jb@ibidem@with@namefalse
        \global\jb@ibidem@with@name@and@titlefalse
    }%
  }{%
    \ifthenelse{\equal{\jb@val}{strict}}{%
        \jb@kv@recognizedtrue
        \jb@ibidemtrue
        \jb@ibidem@pagewisetrue
        \jb@ibidem@double@pagewisefalse
    }{%
      \ifthenelse{\equal{\jb@val}{strictdoublepage}}{%
            \jb@kv@recognizedtrue
            \jb@ibidemtrue
            \jb@ibidem@pagewisetrue
            \if@twoside\jb@ibidem@double@pagewisetrue
            \else\jb@ibidem@double@pagewisefalse\fi
      }{%
          \ifthenelse{\equal{\jb@val}{nostrict}}{%
                \jb@kv@recognizedtrue
                \jb@ibidemtrue
                \jb@ibidem@pagewisefalse
                \jb@ibidem@double@pagewisefalse
          }{%
          \ifthenelse{\equal{\jb@val}{name}}{%
                \jb@kv@recognizedtrue
                \setkeys{jb}{citefull=first}%
                \jb@ibidemfalse
                \global\jb@ibidem@with@nametrue
          }{%
              \ifthenelse{\equal{\jb@val}{name&title}}{%
                    \jb@kv@recognizedtrue
                    \setkeys{jb}{citefull=first}%
                    \jb@ibidemfalse
                    \jb@ibidem@with@nametrue
                    \jb@ibidem@with@name@and@titletrue
              }{%
                  \ifthenelse{\equal{\jb@val}{name&title&auto}}{%
                        \jb@kv@recognizedtrue
                        \setkeys{jb}{citefull=first}%
                        \jb@ibidemfalse
                        \jb@ibidem@with@nametrue
                        \jb@ibidem@with@name@and@title@autotrue
              }{\relax}}}}}}}%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{ibidem}\fi
 }%
}%
\define@key{jb}{idem}[strict]{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{false}}{%
    \jb@kv@recognizedtrue
    \AtBeginDocument{%
        \global\jb@idemfalse
        \global\jb@idem@pagewisefalse
        \global\jb@idem@double@pagewisefalse
    }%
  }{%
    \ifthenelse{\equal{\jb@val}{strict}}{%
        \jb@kv@recognizedtrue
        \jb@idemtrue
        \jb@idem@pagewisetrue
        \jb@idem@double@pagewisefalse
    }{%
      \ifthenelse{\equal{\jb@val}{strictdoublepage}}{%
            \jb@kv@recognizedtrue
            \jb@idemtrue
            \jb@idem@pagewisetrue
            \if@twoside\jb@idem@double@pagewisetrue
            \else\jb@idem@double@pagewisefalse\fi
      }{%
          \ifthenelse{\equal{\jb@val}{nostrict}}{%
                \jb@kv@recognizedtrue
                \jb@idemtrue
                \jb@idem@pagewisefalse
                \jb@idem@double@pagewisefalse
          }{\relax}}}}%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{idem}\fi
 }%
}%
\define@key{jb}{footnotes}{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{marginal}}{%
    \jb@kv@recognizedtrue
% The code here is originally from myfootnote.sty by Stefan Ulrich, posted in d.c.t.t.
    \newlength\jbfootnoteindent
    \setlength\jbfootnoteindent{\parindent}%
    \newlength\jbfootnotenumwidth
    \settowidth\jbfootnotenumwidth{99}%
    \newcommand*{\jbfootnotenumalign}{r}%
    \newcommand*{\jbfootnoteformat}{\textsuperscript}%
    \renewcommand\@makefntext[1]{\@setpar{\@@par
      \@tempdima\hsize\advance\@tempdima-\jbfootnoteindent
      \parshape\@ne\jbfootnoteindent\@tempdima}%
      \parindent 1em\par\noindent
      \makebox[0pt][r]{\makebox[\jbfootnoteindent][r]{%
      \makebox[\jbfootnotenumwidth][\jbfootnotenumalign]{%
      \jbfootnoteformat{\@thefnmark}}\hspace*{\fill}}}##1}%
    \AtBeginDocument{%
     \ifjb@endnotes
        \def\enoteformat{\@setpar{\@@par\@tempdima\hsize
        \advance\@tempdima-\jbfootnoteindent
        \parshape\@ne\jbfootnoteindent\@tempdima}%
        \parindent 1em\par\noindent
        \makebox[0pt][r]{\makebox[\jbfootnoteindent][r]{%
         \makebox[\jbfootnotenumwidth][\jbfootnotenumalign]{%
         \jbfootnoteformat{\@theenmark}}\hspace*{\fill}}}}%
     \fi
    }%
  }{\relax}%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{footnotes}\fi
 }%
}%
\define@key{jb}{jurabiborder}[true]{\jb@old@ordertrue}%
\define@key{jb}{round}[true]{%
  \renewcommand*{\jb@open}{(}%
  \renewcommand*{\jb@close}{)}%
}%
\define@key{jb}{square}[true]{%
  \renewcommand*{\jb@open}{[}%
  \renewcommand*{\jb@close}{]}%
}%
\define@key{jb}{lookat}[true]{\jb@lookattrue}%
\define@key{jb}{crossref}[normal]{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{dynamic}}{%
      \jb@kv@recognizedtrue
      \global\jb@dynamic@crossrefstrue
      \setkeys{jb}{crossref=long}%
  }{%
      \ifthenelse{\equal{\jb@val}{short}}{%
          \jb@kv@recognizedtrue
          \AtBeginDocument{%
           \ifjb@dynamic@crossrefs
               \renewcommand*{\bibcrossrefcite}{\citetitle}%
               \renewcommand*{\bibcrossrefciteagain}{\cite}%
               \renewcommand*{\bibincollcrossrefcite}{\citetitle}%
               \renewcommand*{\bibincollcrossrefciteagain}{\cite}%
               \let\jbedbyincollcrossrefcite\jbedbyincollcrossrefshortnoapy
               \let\jbedbyincollcrossrefciteagain\jbedbyincollcrossrefshort
           \else
               \renewcommand*{\bibcrossrefcite}{\cite}%
               \renewcommand*{\bibcrossrefciteagain}{\cite}%
               \renewcommand*{\bibincollcrossrefcite}{\cite}%
               \renewcommand*{\bibincollcrossrefciteagain}{\cite}%
               \let\jbedbyincollcrossrefcite\jbedbyincollcrossrefshort
               \let\jbedbyincollcrossrefciteagain\jbedbyincollcrossrefshort
           \fi
          }%
      }{%
          \ifthenelse{\equal{\jb@val}{normal}}{%
              \jb@kv@recognizedtrue
              \AtBeginDocument{%
               \ifjb@dynamic@crossrefs
                   \renewcommand*{\bibcrossrefcite}{\citetitle}%
                   \renewcommand*{\bibincollcrossrefcite}{\citetitle}%
                   \renewcommand*{\bibcrossrefciteagain}{\cite}%
                   \renewcommand*{\bibincollcrossrefciteagain}{\cite}%
                   \let\jbedbyincollcrossrefcite\jbedbyincollcrossrefshortwithapy
                   \let\jbedbyincollcrossrefciteagain\jbedbyincollcrossrefshortnoapy
               \else
                   \renewcommand*{\bibcrossrefcite}{\citetitle}%
                   \renewcommand*{\bibincollcrossrefcite}{\citetitle}%
                   \renewcommand*{\bibcrossrefciteagain}{\citetitle}%
                   \renewcommand*{\bibincollcrossrefciteagain}{\citetitle}%
                   \let\jbedbyincollcrossrefcite\jbedbyincollcrossrefshortwithapy
                   \let\jbedbyincollcrossrefciteagain\jbedbyincollcrossrefshortwithapy
               \fi
              }%
          }{%
              \ifthenelse{\equal{\jb@val}{long}}{%
                  \jb@kv@recognizedtrue
                  \AtBeginDocument{%
                   \ifjb@dynamic@crossrefs
                       \renewcommand*{\bibcrossrefcite}{\fullcite}%
                       \renewcommand*{\bibincollcrossrefcite}{\fullcite}%
                       \renewcommand*{\bibcrossrefciteagain}{\citetitle}%
                       \renewcommand*{\bibincollcrossrefciteagain}{\citetitle}%
                       \let\jbedbyincollcrossrefcite\jbedbyincollcrossreflong
                       \let\jbedbyincollcrossrefciteagain\jbedbyincollcrossrefshortwithapy
                   \else
                       \renewcommand*{\bibcrossrefcite}{\fullcite}%
                       \renewcommand*{\bibincollcrossrefcite}{\fullcite}%
                       \renewcommand*{\bibcrossrefciteagain}{\fullcite}%
                       \renewcommand*{\bibincollcrossrefciteagain}{\fullcite}%
                       \let\jbedbyincollcrossrefcite\jbedbyincollcrossreflong
                       \let\jbedbyincollcrossrefciteagain\jbedbyincollcrossreflong
                   \fi
                  }%
          }{\relax}}}}%
 \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{crossref}\fi
 }%
}%
\define@key{jb}{pages}{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{format}}{%
      \jb@kv@recognizedtrue
      \jb@formatted@pagestrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{always}}{%
      \jb@kv@recognizedtrue
      \jb@always@pagerangestrue
  }{\relax}%
  \ifthenelse{\equal{\jb@val}{test}}{%
      \jb@kv@recognizedtrue
      \jb@tested@pagerangestrue
  }{\relax}%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{pages}\fi
 }%
}%
\define@key{jb}{oxford}[true]{%
  \jb@kv@recognizedtrue
  \global\jbhumtrue
  \global\jboxfordtrue\global\jbchicagofalse
  \setkeys{jb}{%
      authorformat={citationreversed},see,%
      titleformat=commasep,%
  }%
  \jbdotafterbibentry
  \AtEndOfPackage{%
   \ifjboxford
   \ifjb@biblikecite\else
    \jb@info{*** jurabib set up for oxford style ***}%
    \renewcommand*{\bibfnfont}{}%                 first name font
    \renewcommand*{\biblnfont}{}%                 last name font
    \renewcommand*{\bibefnfont}{}%                editor first name font
    \renewcommand*{\bibelnfont}{}%                editor last name font
    \renewcommand*{\bibtfont}{\textit}%           title font
    \renewcommand*{\bibbtfont}{\textit}%          booktitle font
    \renewcommand*{\bibjtfont}{\textit}%          journal title font
    \renewcommand*{\bibapifont}[1]{`##1'}%        bib article/incollection title font
    \renewcommand*{\jbapifont}[1]{`##1'}%         text article/incollection title font
    \renewcommand*{\jbtitlefont}{}%               text title font
    \renewcommand*{\bibansep}{,}%                 author name sep
    \renewcommand*{\bibaesep}{, }%                after editor sep
    \renewcommand*{\bibatsep}{,}%                 after title sep
    \DeclareRobustCommand{\bibapyldelim}{(}%      always parentheses for oxford!
    \DeclareRobustCommand{\bibapyrdelim}{)}%      always parentheses for oxford!
    \DeclareRobustCommand{\dateldelim}{(}%        enclose the date in parentheses
    \DeclareRobustCommand{\daterdelim}{)}%        enclose the date in parentheses
    \renewcommand*{\bibbtasep}{ \ }%              between two authors sep
    \renewcommand*{\bibbfsasep}{, }%              between first and second author sep
    \renewcommand*{\bibbstasep}{ \ }%             between second and third author sep
    \renewcommand*{\bibbtesep}{ \ }%              between two editors sep
    \renewcommand*{\bibbfsesep}{, }%              between first and second editor sep
    \renewcommand*{\bibbstesep}{ \ }%             between second and third editor sep
    \renewcommand*{\bibbtsep}{\inname{} }%        booktitle sep
    \renewcommand*{\jb@cr@open}{}%                crossref left delimiter
    \renewcommand*{\jb@cr@close}{}%               crossref right delimiter
    \renewcommand*{\jb@art@cr@open}{}%            article crossref left delimiter
    \renewcommand*{\jb@art@cr@close}{}%           article crossref right delimiter
    \renewcommand*{\jb@incoll@cr@open}{}%         incoll crossref left delimiter
    \renewcommand*{\jb@incoll@cr@close}{}%        incoll crossref right delimiter
    \renewcommand*{\bibaldelim}{(}%               article year left delimiter
    \renewcommand*{\bibardelim}{)}%               article year right delimiter
   \fi\fi
  }%
  \addto\jbonlyforbib{\renewcommand*{\bibansep}{, }}% make sure that a space appear
  \DeclareRobustCommand{\artnumberformat}[1]{\unskip:##1}%
  \ifjb@kv@recognized\else\jb@kv@warning{#1}{oxford}\fi
}%
\define@key{jb}{chicago}[true]{%
  \jb@kv@recognizedtrue
  \global\jbchicagotrue\global\jboxfordfalse
  \setkeys{jb}{%
      authorformat={citationreversed,firstnotreversed},edby,see,%
      bibformat=ibidem,%
      citefull=first,%
      titleformat=commasep,%
      commabeforerest,%
  }%
  \jb@package@warningNoLine{%
    'chicago' style is still experimental! Do not use together with jox.bst!%
  }%
  \jbdotafterbibentry%
  \AtEndOfPackage{%
   \ifjbchicago
   \ifjb@biblikecite\else
    \jb@info{*** jurabib set up for chicago style ***}%
    \renewcommand*{\bibfnfont}{}%                                first name font
    \renewcommand*{\biblnfont}{}%                                last name font
    \renewcommand*{\bibefnfont}{}%                               editor first name font
    \renewcommand*{\bibelnfont}{}%                               editor last name font
    \renewcommand*{\bibtfont}{\textit}%                          title font
    \renewcommand*{\bibbtfont}{\textit}%                         booktitle font
    \renewcommand*{\bibjtfont}{\textit}%                         journal title font
    \renewcommand*{\bibapifont}[1]{``##1''}%                     bib article/incollection title font
    \renewcommand*{\bibsnfont}{}%                                series name font
    \renewcommand*{\jbapifont}[1]{``##1''}%                      text article/incollection title font
    \renewcommand*{\jbtitlefont}{}%                              text title font
    \renewcommand*{\bibansep}{. }%                               author name sep
    \renewcommand*{\bibaesep}{, }%                               after editor sep
    \renewcommand*{\bibatsep}{,}%                                after title sep
    \renewcommand*{\bibbdsep}{,}%                                before date sep
    \renewcommand*{\bibbtasep}{ \bibIMfont{\bibandname} }%       between two authors sep            
    \renewcommand*{\bibbfsasep}{\unskip\bibIMfont{\commaname} }% between first and second author sep
    \renewcommand*{\bibbstasep}{ \bibIMfont{\bibandname} }%      between second and third author sep
    \renewcommand*{\bibbtesep}{ \bibEIMfont{\bibandname} }%      between two editors sep            
    \renewcommand*{\bibbfsesep}{\unskip\bibEIMfont{\commaname} }%between first and second editor sep
    \renewcommand*{\bibbstesep}{ \bibEIMfont{\bibandname} }%     between second and third editor sep
    \renewcommand*{\jbbtasep}{ \bibIMfont{\textandname} }%       between two authors sep            
    \renewcommand*{\jbbfsasep}{\unskip\bibIMfont{\commaname} }%  between first and second author sep
    \renewcommand*{\jbbstasep}{ \bibIMfont{\textandname} }%      between second and third author sep
    \renewcommand*{\jbbtesep}{ \bibEIMfont{\texteandname} }%     between two editors sep            
    \renewcommand*{\jbbfsesep}{\unskip\bibEIMfont{\commaename} }%between first and second editor sep
    \renewcommand*{\jbbstesep}{ \bibEIMfont{\texteandname} }%    between second and third editor sep
    \renewcommand*{\bibbtsep}{\inname{} }%                       booktitle sep
    \renewcommand*{\jb@cr@open}{}%                               crossref left delimiter
    \renewcommand*{\jb@cr@close}{}%                              crossref right delimiter
    \renewcommand*{\jb@art@cr@close}{}%                          article crossref left delimiter
    \renewcommand*{\jb@art@cr@close}{}%                          article crossref right delimiter
    \renewcommand*{\jb@incoll@cr@open}{}%                        incoll crossref left delimiter
    \renewcommand*{\jb@incoll@cr@close}{}%                       incoll crossref right delimiter
    \renewcommand*{\bibaldelim}{(}%                              article year left delimiter
    \renewcommand*{\bibardelim}{)}%                              article year right delimiter
    \renewcommand*{\artnumberformat}[1]{,\space{}no.~##1}%       article number format
    \renewcommand*{\pernumberformat}[1]{,\space{}no.~##1}%       periodical format
    \renewcommand*{\edbysep}{, }%
    \def\bibauthormultiple{%
        \stepcounter{multiple@author}% to suppress inside bibliographic entry
        \leavevmode\vrule height 2pt depth -1.6pt width 3em\hspace{1pt}.\space}%
    \DeclareRobustCommand{\jbnote}[2]{%
        \ifjbweareinbib
            \unskip\unskip\ifthenelse{\equal{##1}{1}}{\bibatsep{} ##2}{##2}%
        \else
            \unskip\unskip%
        \fi
    }%
% only parentheses in text, not in the bibliography!
    \ifjbweareinbib\else
      \renewcommand*{\bibapyldelim}{\unskip\space(}%
      \renewcommand*{\bibapyrdelim}{)}%
    \fi
    \addto\jbonlyforbib{%
      \DeclareRobustCommand\incollinname{\inname{} }%
      \DeclareRobustCommand{\bibbtsep}{\inname{} }%
      \DeclareRobustCommand{\bibapyldelim}{\unskip\unskip\space}%
      \DeclareRobustCommand{\bibapyrdelim}{}%
      \DeclareRobustCommand{\bibatsep}{.}%
      \DeclareRobustCommand{\dateldelim}{\unskip.}%
      \DeclareRobustCommand{\daterdelim}{}%
    }%
    \AddTo\bibsenglish{%
        \def\incollinname{in}%
        \def\inname{in}%
        \def\editorname{\unskip,\space{}ed.}%
        \def\editorsname{\unskip,\space{}eds.}%
        \def\edbyname{ed.}%
        \def\Edbyname{Ed.}%
        \def\volumename{vol.}%
        \def\Volumename{Vol.}%
        \def\firstedname{1st}%
        \def\secondedname{2nd}%
        \def\thirdedname{3rd}%
        \def\fourthedname{4th}%
        \def\fifthedname{5th}%
        \def\thedname{th}%
%       \def\editionname{ed.}%
        \def\editionname{ed}% dot removed, suggested by Robert Schlicht
   }%
   \fi\fi
  }%
  \addto\jbonlyforbib{\renewcommand*{\bibansep}{. }}% make sure that a space appear
  \ifjb@kv@recognized\else\jb@kv@warning{#1}{chicago}\fi
}%
\define@key{jb}{human}[true]{\global\jbhumtrue}
\define@key{jb}{edby}[true]{\global\jb@edbytrue}
\define@key{jb}{endnote}[true]{%
  \DeclareRobustCommand{\jbnote}[2]{\unskip}%
  \DeclareRobustCommand{\jbendnote}[1]{\def\jb@endnote{\unskip\unskip\ifjb@dot\else,\fi\space##1}}%
}
\define@key{jb}{biblikecite}[true]{%
     \global\jb@biblikecitetrue
     \AtBeginDocument{% <== to make redefintions work
        \global\let\biblnfont\jbauthorfont
        \global\let\bibfnfont\jbauthorfnfont
        \global\let\bibelnfont\jbauthorfont
        \global\let\bibefnfont\jbauthorfnfont
        \global\let\bibbtfont\jbtitlefont
        \global\let\bibtfont\jbtitlefont
        \global\let\bibapifont\jbapifont
     }%
}
\define@key{jb}{opcit}[true]{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{true}}{%
    \jb@kv@recognizedtrue
    \jb@opcittrue
  }{}%
  \ifthenelse{\equal{\jb@val}{chapter}}{%
    \jb@kv@recognizedtrue
    \global\jb@opcittrue
    \@ifundefined{chapter}{%
     \ClassError{\jb@pkg@name}{%
      Sorry, `opcit=chapter' makes no sense for\MessageBreak
      classes without \string\chapter%
     }{Try `opcit=section' for an article class}}{}%
    \@addtoreset{opcit}{chapter}%
    \def\jb@reset@opcit@for{chapter}%
    \def\jb@reset@opcit@label@for{\thechapter}%
  }{%
      \ifthenelse{\equal{\jb@val}{section}}{%
        \jb@kv@recognizedtrue
        \global\jb@opcittrue
        \@ifundefined{chapter}{}{%
         \jb@package@warningNoLine{\jb@pkg@name}{%
          `opcit=section' was designed for use with\MessageBreak
          an article class, note that it's not well\MessageBreak
          tested for use with book or report classes}}%
        \@addtoreset{opcit}{section}%
        \def\jb@reset@opcit@for{section}%
        \def\jb@reset@opcit@label@for{\thesection}%
      }{}%
  }%
  \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{opcit}\fi
 }%
}%
\define@key{jb}{annote}[true]{%
    \renewcommand{\bibAnnote}[1]{%
        \ifjb@tabular
           \par%
           \begin{minipage}[t]{\bibleftcolumn}%
               \renewcommand*{\bibansep}{}%
               \bibleftcolumnadjust\mbox{}%
           \end{minipage}%
           \ifjb@numbered@bib\hspace{15mm}\else\hspace{10mm}\fi
           \begin{minipage}[t]{\bibrightcolumn}%
               \bibrightcolumnadjust%
               \jbannoteformat{##1}%
           \end{minipage}%
        \else
           \par\jbannoteformat{##1}%
        \fi
    }%
    \renewcommand{\bibAnnoteFile}[1]{%
        \ifjb@tabular
           \par%
           \begin{minipage}[t]{\bibleftcolumn}%
               \renewcommand*{\bibansep}{}%
               \bibleftcolumnadjust\mbox{}%
           \end{minipage}%
           \ifjb@numbered@bib\hspace{15mm}\else\hspace{10mm}\fi
           \begin{minipage}[t]{\bibrightcolumn}%
               \bibrightcolumnadjust%
               \begingroup
                  \let\input@path\jb@ann@input@path
                  \IfFileExists{##1}{\ProvidesFile{##1.tex}%
                    [Bibliography annote file]\jbannoteformat{\input{##1}}}{}%
               \endgroup
           \end{minipage}%
        \else
            \begingroup
               \let\input@path\jb@ann@input@path
               \IfFileExists{##1}{\ProvidesFile{##1.tex}%
                 [Bibliography annote file]\par\jbannoteformat{\input{##1}}}{}%
            \endgroup
        \fi
    }%
}
\define@key{jb}{citetoend}[true]{\jb@citetoendtrue}
\define@key{jb}{hypercite}{%
    \ifthenelse{\equal{#1}{true}}{\jb@allow@hyper@citetrue}{%
    \ifthenelse{\equal{#1}{false}}{\jb@allow@hyper@citefalse}{\relax}}}
% NEW 0.6
\define@key{jb}{lookforgender}[true]{\global\jblookforgendertrue}
% NEW 0.6
\define@key{jb}{dotafter}{%
 \@for\jb@val:=#1\do{%
  \jb@kv@recognizedfalse
  \ifthenelse{\equal{\jb@val}{bibentry}}{%
    \jb@kv@recognizedtrue
    \jb@dottrue
  }{%
      \ifthenelse{\equal{\jb@val}{endnote}}{%
        \jb@kv@recognizedtrue
        \def\@endanenote{\unskip.\par\endgroup}%
      }{}%
  }%
     \ifjb@kv@recognized\else\jb@kv@warning{\jb@val}{dotafter}\fi
  }
}%
% NEW 0.6
\define@key{jb}{silent}{\jbsilent}%
% NEW 0.6 automatic translation from in-text citations to footnotes, suggested by Frank Mittelbach
\define@key{jb}{super}[true]{\jb@supertrue}%
\define@key{jb}{nosplit}[true]{\jb@nosplittrue}%
\newcommand*{\jb@config@file}{jurabib.cfg}%
\newcommand*{\jb@own@config@file}{}%
\define@key{jb}{config}[jurabib]{\renewcommand*{\jb@own@config@file}{#1.cfg}}%
\newcommand*{\jb@enotes@warning}{%
    \PackageWarning{\jb@pkg@name}{%
      I assume you know what you are doing!\MessageBreak
      You are using `\string\cite' or something similar inside\MessageBreak
      a footnote while using endnotes.sty. This will\MessageBreak
      produce ambiguous references and not the\MessageBreak
      expected results. If you are unsure what\MessageBreak
      to do, use \string\cite\space or \string\footcite\space\MessageBreak
      instead}%
}
\AtBeginDocument{%
  \setkeys{jb}{crossref=normal}%
  \ifjbhum
    \setkeys{jb}{authorformat=and}%
    \DeclareRobustCommand{\jbbtfont}{\textit}%
    \jb@typeout{^^JPackage jurabib Info: *** jurabib set up for humanities stuff ***^^J}%
  \fi
% REMOVED 0.6, can cause problems when using something like \MakeUpperCase{...\ss...}, thanks to Frank Mittelbach
% \renewcommand*{\SS}{\S\kern-.8pt\S\relax}%
  \providecommand*{\SSS}{\S\kern-.8pt\S\relax}%
  \@ifclassloaded{jura}{\global\jb@juratrue\global\jb@alphanumtrue}{\relax}%
  \@ifpackageloaded{alphanum}{\global\jb@alphanumtrue}{\relax}%
  \@ifpackageloaded{ragged2e}{\global\jb@raggedtrue}{\relax}%
  \@ifpackageloaded{url}{\global\jb@urltrue}{\relax}%
  \@ifpackageloaded{index}{\let\jb@@call@index\jb@@call@type@index}{\let\jb@@call@index\jb@@call@normal@index}
  \@ifpackageloaded{babel}{\global\jb@babeltrue}{\relax}%
  \@ifpackageloaded{varioref}{\ifjb@ignore@varioref\global\jb@variofalse\else\global\jb@variotrue\fi}{\relax}%
  \@ifpackageloaded{hyperref}{%
% NEW 0.6 hyperref disables \Hy@hyperfootnotes if tabularx.sty is loaded, here we have to insert the footnote wrapper again,
% otherwise the footnote counter will be not set appropriate and it appears lower case ibidem instead of upper case ibidem.
    \ifHy@hyperfootnotes\else % tabularx loaded!
      \jb@typeout{^^JPackage jurabib Info: 'hyperref' + 'tabularx' loaded, adapting footnote macro}%
      \let\Orig@tabularx@footnotetext\@footnotetext
      \long\def\@footnotetext#1{%
           \Orig@tabularx@footnotetext{%
              \jb@fntrue
              #1%
              \setcounter{jb@cites@in@footnote}{0}%
           }%
      }%
    \fi
    \@ifpackageloaded{tex4ht}{}{% Hook for tex4ht added
       \global\jb@hypertrue
% CH 0.6 hardcoded hyperref footnote definition removed, wrapper used instead, posted by Heiko Oberdiek in d.c.t.t.
% ???   \let\hyperref@footnotetext\@footnotetext
% ???   \let\@footnotetext\hyperref@footnotetext
       \let\Orig@H@@footnotetext\H@@footnotetext
       \long\def\H@@footnotetext#1{%
         \Orig@H@@footnotetext{%
           \jb@fntrue
           #1%
           \setcounter{jb@cites@in@footnote}{0}%
         }%
       }%
    }{\relax}%
  }{\relax}%
  \ifjb@hyper
% CH 0.6, define only if alphanum is loaded
      \@ifundefined{J@LongToc}{}{%
        \let\J@SetCurrent\relax
        \def\toclevel@lvla{0}\def\toclevel@lvlb{1}
        \def\toclevel@lvlc{2}\def\toclevel@lvld{3}
        \def\toclevel@lvle{4}\def\toclevel@lvlf{5}
        \def\toclevel@lvlg{6}\def\toclevel@lvlh{7}
        \def\toclevel@lvli{8}\def\toclevel@lvlj{9}
        \def\toclevel@lvlj{10}\def\toclevel@lvll{11}
        \newcommand*{\theHlvla}{\J@Number}\newcommand*{\theHlvlb}{\J@Number}
        \newcommand*{\theHlvlc}{\J@Number}\newcommand*{\theHlvld}{\J@Number}
        \newcommand*{\theHlvle}{\J@Number}\newcommand*{\theHlvlf}{\J@Number}
        \newcommand*{\theHlvlg}{\J@Number}\newcommand*{\theHlvlh}{\J@Number}
        \newcommand*{\theHlvli}{\J@Number}\newcommand*{\theHlvlj}{\J@Number}
        \newcommand*{\theHlvlk}{\J@Number}\newcommand*{\theHlvll}{\J@Number}
        \renewcommand*{\J@LongToc}[2][]{%
         \@startsection{lvl\alph{tiefe}}{\number\value{tiefe}}{0pt}%
         {\ifnum\value{tiefe}=1 -4ex plus-1,5ex minus-0,ex\else%
         -2,7ex plus-0,8ex minus-0,2ex\fi}{\ifnum\value{tiefe}>7 %
         -1em plus-0,5em\relax\else 0,6ex plus0,3ex minus0,1ex\fi}%
         {\sectfont\csname lvl\alph{tiefe}style\endcsname}[#1]{#2}%
        }%
      }%
    \def\BR@@lbibitem[#1]#2#3\par{\BRorg@bibitem[#1]{#2}#3\par}%
  \else
% CH 0.6, wrapper for \@footnotetext, suggested by Frank Mittelbach
      \let\jbsaved@footnotetext\@footnotetext
% CH 0.6, \long added, allow paragraphs [RS]
      \long\def\@footnotetext#1{%
         \begingroup
          \jb@fntrue
          \jbsaved@footnotetext{#1}%
          \setcounter{jb@cites@in@footnote}{0}%
         \endgroup
      }%
% NEW 0.6 reset counter for cites in endnotes too -- dirty
      \ifjb@endnotes\g@addto@macro\enoteformat{\setcounter{jb@cites@in@footnote}{0}}\fi
  \fi
  \@ifpackageloaded{backref}{\global\jb@backreftrue}{\relax}%
  \@ifpackageloaded{bibtopic}{\global\jb@all@titlestrue%
% NEW 0.52o No warning about ambiguous citations if `authorformat=year' is used
    \ifjb@author@year\else
        \jb@package@warningNoLine{\jb@pkg@name}{%
        All titles are cited, you're using `bibtopic'!\MessageBreak
        Make sure that the `shorttitle' fields are not\MessageBreak
        empty, otherwise I'll using the `title' fields for\MessageBreak
        replacement. See the package documentation for\MessageBreak
        further explanation}%
    \fi
  }{\relax}%
  \ifjb@babel
   \jb@typeout{^^JPackage jurabib Info: *** jurabib set up for babel ***^^J}%
% NEW 0.6 added some alternative babel main language values, initially suggested by Harri Kiiskinen
   \ifthenelse{\equal{\bbl@main@language}{german}%
               \TE@or\equal{\bbl@main@language}{germanb}%
               \TE@or\equal{\bbl@main@language}{ngerman}%
               \TE@or\equal{\bbl@main@language}{austrian}%
               \TE@or\equal{\bbl@main@language}{naustrian}%
   }{\@bibsgerman\bibsgerman}{%
      \ifthenelse{\equal{\bbl@main@language}{french}%
                  \TE@or\equal{\bbl@main@language}{francaise}%
                  \TE@or\equal{\bbl@main@language}{canadien}%
                  \TE@or\equal{\bbl@main@language}{acadian}%
      }{\@bibsfrench\bibsfrench}{%
        \ifthenelse{\equal{\bbl@main@language}{english}%
                    \TE@or\equal{\bbl@main@language}{USenglish}%
                    \TE@or\equal{\bbl@main@language}{american}%
                    \TE@or\equal{\bbl@main@language}{UKenglish}%
                    \TE@or\equal{\bbl@main@language}{british}%
                    \TE@or\equal{\bbl@main@language}{canadian}%
        }{\@bibsenglish\bibsenglish}{%
          \ifthenelse{\equal{\bbl@main@language}{dutch}%
          }{\@bibsdutch\bibsdutch}{%
            \ifthenelse{\equal{\bbl@main@language}{spanish}%
            }{\@bibsspanish\bibsspanish}{%
              \ifthenelse{\equal{\bbl@main@language}{portuges}%
                          \TE@or\equal{\bbl@main@language}{portuguese}%
                          \TE@or\equal{\bbl@main@language}{brazilian}%
                          \TE@or\equal{\bbl@main@language}{brazil}%
              }{\@bibsportuguese\bibsportuguese}{%
                \ifthenelse{\equal{\bbl@main@language}{italian}%
                }{\@bibsitalian\bibsitalian}{%
                  \ifthenelse{\equal{\bbl@main@language}{norsk}%
                              \TE@or\equal{\bbl@main@language}{nynorks}%
                  }{\@bibsnorsk\bibsnorsk}{%
                    \ifthenelse{\equal{\bbl@main@language}{finnish}%
                    }{\@bibsfinnish\bibsfinnish}{%
                      \ifthenelse{\equal{\bbl@main@language}{danish}%
                      }{\@bibsdanish\bibsdanish}{%
% NEW 0.6 fallback to English for not known languages and warning inserted
              \jb@package@warningNoLine{\jb@pkg@name}{%
                The language you declared as babel main language\MessageBreak
                is not yet supported by jurabib, please contact \MessageBreak
                the maintainer! We're using english as the default now.}%
              \@bibsenglish\bibsenglish%
            }}}}}}}}}}%
  \else
    \@ifpackageloaded{german}{\@bibsgerman\bibsgerman\renewcommand{\bbl@main@language}{german}}{%
     \@ifpackageloaded{ngerman}{\@bibsgerman\bibsgerman\renewcommand{\bbl@main@language}{german}}{
      \@ifpackageloaded{french}{\@bibsfrench\bibsfrench\renewcommand{\bbl@main@language}{french}}{%
       \@ifpackageloaded{frenchle}{\@bibsfrench\bibsfrench\renewcommand{\bbl@main@language}{french}}{%
          \@bibsenglish\bibsenglish}}}}%
  \fi
  \@ifundefined{chapter}{%
      \let\jb@orig@section\section % chapterbib.sty + numberedbib
      \renewcommand*{\section}{\setcounter{jbbibcnta}{0}\jb@orig@section}%
  }{%
      \let\jb@orig@chapter\chapter % chapterbib.sty + numberedbib
       \renewcommand*{\chapter}{\setcounter{jbbibcnta}{0}\jb@orig@chapter}%
  }%
% 0.5e: moved from \AtEndOfPackage because of problems, if setspace.sty is loaded after jurabib
% reported by Hubert Selhofer
% NEW 0.5f \jb@enote@hook introduced for compatibility with endnotes.sty
  \@ifundefined{@xendnotenext}{\relax}{%
    \global\jb@endnotestrue
    \let\jb@orig@citex\@citex
    \let\orig@emulate@nat@cite\jb@emulate@nat@cite
    \def\@citex[#1][#2]#3{%
        \ifjbcross % no extra endnote for crossref's
            \jb@orig@citex[#1][#2]{#3}%
        \else
          \ifjbweareinbib % no extra endnote for howcited's
            \jb@orig@citex[#1][#2]{#3}%
          \else
              \ifjb@fn
                    \jb@enotes@warning\jb@orig@citex[#1][#2]{#3}%
              \else
                  \ifthenelse{\boolean{jb@foot}\or\boolean{jb@citetoend}\or\boolean{jb@super}}{%
                    \expandafter\endnote\expandafter{\jb@enote@hook\jb@orig@citex[#1][#2]{#3}}%
                  }{\jb@enote@hook\jb@orig@citex[#1][#2]{#3}}%
              \fi
          \fi
        \fi
    }%
    \def\jb@emulate@nat@cite[#1][#2]#3{%
        \ifjbcross % no extra endnote for crossref's
            \orig@emulate@nat@cite[#1][#2]{#3}%
        \else
          \ifjbweareinbib % no extra endnote for howcited's
            \orig@emulate@nat@cite[#1][#2]{#3}%
          \else
              \ifjb@fn
                    \jb@enotes@warning\orig@emulate@nat@cite[#1][#2]{#3}%
              \else
                  \ifthenelse{\boolean{jb@foot}\or\boolean{jb@citetoend}\or\boolean{jb@super}}{%
                      \expandafter\endnote\expandafter{\jb@enote@hook\orig@emulate@nat@cite[#1][#2]{#3}}%
                  }{\jb@enote@hook\orig@emulate@nat@cite[#1][#2]{#3}}%
              \fi
          \fi
        \fi
    }%
  }%
% NEW 0.5f a warning if makeidx.sty isn't loaded
  \@ifpackageloaded{index}{\relax}{%
    \ifjb@index
     \@ifundefined{@indexfile}{%
       \jb@package@warningNoLine{\jb@pkg@name}{%
         The `makeidx' package is not loaded,\MessageBreak
          `authorformat=indexed' will not work}%
     }{}%
    \fi
  }%
}%
\AtEndOfPackage{%
  \ifjb@ragged
    \renewcommand*{\bibleftcolumnadjust}{\RaggedRight}%
    \renewcommand*{\bibrightcolumnadjust}{\RaggedRight}%
  \fi
}%
\@ifundefined{bib@heading}{%
  \@ifundefined{chapter}{%
    \newcommand*{\bib@heading}%
      {\section*{\refname\@mkboth{\refname}{\refname}}}%
  }{%
    \newcommand*{\bib@heading}%
      {\chapter*{\bibname\@mkboth{\bibname}{\bibname}}}%
  }%
}{%
   \relax
}%
% Hook for memoir.cls, suggested by Robert Schlicht, requires mempatch.sty
\@ifundefined{bibsection}{}{\let\bib@heading\bibsection}%
\newcommand*{\jbmakeinbiblist}{}%
\newcommand*{\jbmakeinbib}{%
  \jbweareinbibtrue
  \jbonlyforbib%
  \let\jbPAGES\origPAGES
  \let\jbpages\origpages
  \let\jbPages\origPages
% NEW 0.5f Reduced to one command, formatting by \jbprformat
%  \let\jbPage\origPage
% NEW 0.5f
  \let\jbartPages\origartPages
% NEW 0.5f Reduced to one command, formatting by \jbprformat
%  \let\jbartPage\origartPage
  \jb@lookatfalse
  \let\jbatsep\@empty
  \jb@third@extra@spacefalse
  \jb@ibidemfalse
  \jb@ibidem@pagewisefalse
  \jb@ibidem@double@pagewisefalse
  \jb@ibidem@with@namefalse
  \jb@ibidem@with@short@namefalse
  \jb@ibidem@with@name@and@titlefalse
  \jb@no@lookat@for@bibtrue
% NEW 0.5e: disable `crossref=dynamic' for bibliography
% NEW 0.5f: different handling for oxford crossrefs (do we need `ed.' inside the crossref)????
  \ifjb@dynamic@crossrefs
%      \ifjboxford
%          \renewcommand*{\bibcrossrefcite}{\fullnameoxfordcrossref}%
%          \renewcommand*{\bibincollcrossrefcite}{\fullnameoxfordcrossref}%
%          \renewcommand*{\bibcrossrefciteagain}{\fullnameoxfordcrossref}%
%          \renewcommand*{\bibincollcrossrefciteagain}{\fullnameoxfordcrossref}%
%      \else
          \renewcommand*{\bibcrossrefcite}{\citetitle}%
          \renewcommand*{\bibincollcrossrefcite}{\citetitle}%
          \renewcommand*{\bibcrossrefciteagain}{\citetitle}%
          \renewcommand*{\bibincollcrossrefciteagain}{\citetitle}%
%      \fi
  \fi
% NEW 0.5f make memory empty when starting bibliography
  \let\jb@last@ibidem@author\@empty
  \let\jb@ibidem@author\@empty
}%
\renewenvironment{thebibliography}[1]{%
  \bib@heading
  \jbmakeinbib%
% NEW 0.6 we have to make the \jb@inside@*-macros empty, otherwise idem is
% used if the last cited author is the same as the first author in the bibliography.
  \gdef\jb@inside@author{}%
  \gdef\jb@inside@editor{}%
% INSERTED because of problems using \typearea from the KOMA-bundle after loading jurabib
% calculation should be done here, suggested by Tilman Finke
  \addtolength{\jb@biblaw@entry@width}{\textwidth}%
  \list{\relax}{%
% NEW 0.5e compressed bibliography
     \ifjb@compressed@bib
        \setlength{\parsep}{0.2ex plus 0.1ex minus 0.1ex}%
        \setlength{\itemsep}{0.2ex plus 0.1ex minus 0.1ex}%
     \fi
     \jbmakeinbiblist% NEW 0.5e make \itemsep configurable with \addto
     \ifjb@bib@hang%
        \setlength{\itemindent}{-\jbbibhang}%
        \setlength{\leftmargin}{\jbbibhang}%
     \else
        \setlength{\itemindent}{0pt}%
        \setlength{\leftmargin}{0pt}%
     \fi
    }%
  \sloppy\clubpenalty4000\widowpenalty4000%
  \sfcode`\.=\@m%
 }%
 {\def\@noitemerr
   {\@latex@warning{Empty `thebibliography' environment}%
 }\endlist\jbweareinbibfalse%
}%
\newcommand*{\jb@make@howcited}{% @* except of ...
 \renewcommand*{\bibhowcited}{%
   \jbweareinhowcitedtrue
   \howcitedprefix%
   \jb@specialcite{\jb@key}%
   \howcitedsuffix\jbweareinhowcitedfalse}}%
\newcommand*{\jb@make@comment@howcited}{% ... @COMMENTED
   \renewcommand*{\bibcommenthowcited}{%
     \jbweareinhowcitedtrue
     \howcitedprefix%
     \jb@specialcite[Bearbeiter][]{\jb@key}%
     \howcitedsuffix\jbweareinhowcitedfalse}}%
\newcommand*{\jb@make@artperiod@howcited}{% ... @ARTICLE and @PERIODICAL
 \ifjb@allow@howcited@art@period
    \renewcommand*{\bibartperiodhowcited}{%
      \jbweareinhowcitedtrue
      \howcitedprefix%
      \jb@specialcite{\jb@key}%
      \howcitedsuffix\jbweareinhowcitedfalse}%
 \fi}%
\newcommand*{\jb@make@all@howcited@empty}{%
 \let\bibhowcited\@empty
 \let\bibcommenthowcited\@empty
 \ifjb@allow@howcited@art@period
   \let\bibartperiodhowcited\@empty
 \fi
}%
% NEW 0.5c; special command, inspired by Christian Meyn, declares a work which isn't really cited, but
% should appear in the bibliography _with_ a howcited note (perhaps given by the howcited field),
% see also the changed command \jb@make@howcited@compare
% Usage: \nocitebuthowcited{<key>}
\newcommand*{\nocitebuthowcited}[1]{%
  \if@filesw\immediate\write\@newciteauxhandle{%
      \string\citation{#1}^^J%
      \string\jbrealcitation{cite}{#1}}
  \fi
}%
\newcommand*{\jbhowcitedcomparepart}{%
  \ifthenelse{\equal{\jb@@howcited}{}}{%
     \ifthenelse{\equal{\jb@@shorttitle}{\@empty}}{%
         \jb@make@all@howcited@empty
     }{%
         \ifthenelse{\equal{\jb@@shorttitle}{\jb@@title}}{%
            \jb@make@all@howcited@empty
         }{%
            \ifthenelse{\equal{\jb@@author}{empty}}{%
               \jb@make@all@howcited@empty
            }{%
% NEW 0.5f: only howcited remark, if shorttitle != title AND shorttitle was _used_!
               \ifthenelse{%
                   \equal{\@nameuse{TITLE@\jb@key}}{used}%
%                   \and\not
% NEW 0.5f: should compare ignore multiple citations???
%                   \equal{\jb@@mult@switch}{1}%
               }{%
                   \jb@suppress@dot@for@howcitedtrue
                   \jb@make@howcited%
                   \jb@make@comment@howcited%
                   \jb@make@artperiod@howcited%
               }{%
                   \jb@make@all@howcited@empty
               }%
            }%
         }%
     }%
  }{%
     \ifthenelse{\equal{\jb@@howcited}{1}}{%
% should the howcited field be ignored in compare mode???
          \ifthenelse{%
              \equal{\@nameuse{TITLE@\jb@key}}{used}%
          }{%
              \jb@suppress@dot@for@howcitedtrue
              \jb@make@howcited%
              \jb@make@comment@howcited%
              \jb@make@artperiod@howcited%
          }{%
              \jb@make@all@howcited@empty
          }%
     }{%
          \renewcommand*{\bibhowcited}{%
            \howcitedprefix \jb@@howcited\howcitedsuffix}%
          \renewcommand*{\bibcommenthowcited}{%
            \howcitedprefix \jb@@howcited\howcitedsuffix}%
          \ifjb@allow@howcited@art@period
            \renewcommand*{\bibartperiodhowcited}{%
              \howcitedprefix \jb@@howcited\howcitedsuffix}%
          \fi
     }%
  }%
}%
\newcommand*{\jbhowcitednormalpart}{%
  \ifthenelse{\equal{\jb@@howcited}{}}{% %
     \jb@make@all@howcited@empty
  }{%
     \ifthenelse{\equal{\jb@@howcited}{1}}{%
        \jb@suppress@dot@for@howcitedtrue
        \jb@make@howcited%
        \jb@make@comment@howcited%
        \jb@make@artperiod@howcited%
     }{%
        \renewcommand*{\bibhowcited}{%
          \howcitedprefix \jb@@howcited\howcitedsuffix}%
        \renewcommand*{\bibcommenthowcited}{%
          \howcitedprefix \jb@@howcited\howcitedsuffix}%
        \ifjb@allow@howcited@art@period
          \renewcommand*{\bibartperiodhowcited}{%
            \howcitedprefix \jb@@howcited\howcitedsuffix}%
        \fi
     }%
  }%
}
\newcommand*{\jbaddtomakehowcited}{}
\newcommand*{\jb@make@the@howcited}{%
  \ifthenelse{\boolean{jb@howcited@normal}}{%
      % NORMAL=TRUE
      \ifthenelse{\boolean{jb@howcited@compare}}{%
          % NORMAL=TRUE, COMPARE=TRUE
          \ifthenelse{\boolean{jb@howcited@multiple}}{%
              % NORMAL=TRUE, COMPARE=TRUE, MULTIPLE=TRUE
%              \jb@typeout{Using howcited=normal AND howcited=compare AND howcited=multiple}%
              \ifthenelse{\equal{\jb@@mult@switch}{1}}{% multiple part start
                 \jb@make@howcited
                 \jb@make@comment@howcited
                 \jb@make@artperiod@howcited   % multiple part end
              }{%
                  \jbhowcitednormalpart%
                  \jbhowcitedcomparepart%
              }%
          }{% NORMAL=TRUE, COMPARE=TRUE, multiple=false
%              \jb@typeout{Using howcited=normal AND howcited=compare}%
              \jbhowcitednormalpart%
              \jbhowcitedcomparepart%
          }%
      }{%
          % NORMAL=TRUE, compare=false
          \ifthenelse{\boolean{jb@howcited@multiple}}{%
              % NORMAL=TRUE, compare=false, MULTIPLE=TRUE
              % howcited=normal AND howcited=multiple
%              \jb@typeout{Using howcited=normal AND howcited=multiple}%
              \ifthenelse{\equal{\jb@@mult@switch}{1}}{% multiple part start
                 \jb@make@howcited
                 \jb@make@comment@howcited
                 \jb@make@artperiod@howcited   % multiple part end
              }{%
                 \jbhowcitednormalpart%
              }%
          }{%   NORMAL=TRUE, compare=false, multiple=false
%              \jb@typeout{Using ONLY howcited=normal}
              \jbhowcitednormalpart%
          }%
      }%
  }{%
  %   normal=false
      \ifthenelse{\boolean{jb@howcited@compare}%
      }{% normal=false, COMPARE=TRUE
          \ifthenelse{\boolean{jb@howcited@multiple}}{%
             % normal=false, COMPARE=TRUE, MULTIPLE=TRUE
%             \jb@typeout{Using howcited=compare AND howcited=multiple}
             \ifthenelse{\equal{\jb@@mult@switch}{1}}{% multiple part start
                \jb@make@howcited
                \jb@make@comment@howcited
                \jb@make@artperiod@howcited   % multiple part end
             }{%
                \jbhowcitedcomparepart%
             }%
          }{% normal=false, COMPARE=TRUE, multiple=false
%              \jb@typeout{Using ONLY howcited=compare}
              \jbhowcitedcomparepart%
          }%
      }{% normal=false, compare=false
          \ifthenelse{\boolean{jb@howcited@multiple}}{%
              % normal=false, compare=false, MULTIPLE=TRUE
%              \jb@typeout{Using ONLY howcited=multiple}
              \jb@suppress@dot@for@howcitedtrue
              \ifthenelse{\equal{\jb@@mult@switch}{1}}{% multiple part start
                  \jb@make@howcited
                  \jb@make@comment@howcited
                  \jb@make@artperiod@howcited  % multiple part end
              }{%
                  \jb@make@all@howcited@empty
              }%
% CH 0.6 call \jb@make@comment@howcited again, documentation says @commented has to get an howcited always!
% reported by Holger Pollmann
              \jb@make@comment@howcited
          }{% normal=false, compare=false, multiple=false, all=true
            \ifthenelse{\boolean{jb@howcited@all}}{%
               \jb@suppress@dot@for@howcitedtrue
               \jb@make@howcited
               \jb@make@comment@howcited
% we have to switch on `howcited' for articles and periodicals
               \jb@allow@howcited@art@periodtrue
               \jb@make@artperiod@howcited
            }{%
                % normal=false, compare=false, multiple=false, all=false
                % no howcited option
                \relax
            }%
          }%
      }%
  }%
  \jbaddtomakehowcited%
}%
%\newcommand*{\jb@make@howcited@all}{%
%   \jb@suppress@dot@for@howcitedtrue
%   \jb@make@howcited
%   \jb@make@comment@howcited
%% we have to switch on `howcited' for articles and periodicals
%   \jb@allow@howcited@art@periodtrue
%   \jb@make@artperiod@howcited
%}%
\newcommand*{\jb@detect@used@cite@commands}{%
  \ifthenelse{\equal{\@nameuse{b@\jb@key @C}}{cite}}{%
     \let\jb@specialcite\cite}{\relax}%
  \ifthenelse{\equal{\@nameuse{b@\jb@key @C}}{citetitle}}{%
     \let\jb@specialcite\citetitle}{\relax}%
  \ifthenelse{\equal{\@nameuse{b@\jb@key @C}}{citenotitle}}{%
     \let\jb@specialcite\jbcitenotitle}{\relax}%
}%
\newcommand*{\jb@last@label}{}
\newcommand*{\jb@last@mult@author}{}
\AtEndDocument{\let\jb@chk@multiple\@gobbletwo}
\newcommand*{\jb@chk@multiple}[2]{%
   \ifthenelse{\equal{#1}{\jb@last@mult@author}}{%
       \global\@namedef{jb@fm@\jb@last@label}{}%
       \global\@namedef{jb@fm@#2}{}%
   }{%
       \relax
   }%
   \def\jb@last@mult@author{#1}%
   \def\jb@last@label{#2}%
}%
\newcommand*\jb@chk@bibetal[2]{%
    \begingroup
    \protected@edef\x{%
        \endgroup
        \def\noexpand\jb@@chk@bibetal####1\Bibetal####2\noexpand\end{%
            \noexpand\jb@@bibetal@argcheck{####1}{####2}{#2}%
        }%
    }\x
    \protected@edef\@tempa{#1}%
    \protected@edef\@tempb{\Bibetal}%
    \expandafter\expandafter\expandafter
    \jb@@chk@bibetal\expandafter\@tempa\@tempb\end
}
\newcommand*\jb@@bibetal@argcheck[3]{%
    \ifthenelse{\equal{#2}{}}{%
%        \jb@typeout{---NO bibetal in citation |#1|#2|}%
    }{%
%        \jb@typeout{--- bibetal in citation |#1|#2|}%
        \if@filesw{%
            \let\protect\noexpand
            \immediate\write\@auxout{\string\jb@chk@multiple{#1#2}{#3}}%
        }%
        \fi
    }%
}
\newcommand*{\jb@@name}{}%
\newcommand*{\jb@last@fullname}{}%
% NEW 0.5e biblaw commands contributed by Tilman Finke
\newcommand*{\jb@biblaw@item}{\hspace{0.5em}$\triangleright$\hspace{0.5em}}
\newlength{\jb@biblaw@entry@width}
\newlength{\jb@biblaw@item@width}
\settowidth{\jb@biblaw@item@width}{\jb@biblaw@item}
\setlength{\jb@biblaw@entry@width}{\jb@biblaw@item@width}
\setlength{\jb@biblaw@entry@width}{-\jb@biblaw@entry@width}
%\addtolength{\jb@biblaw@entry@width}{\columnwidth}
% REMOVED because of problems using \typearea from the KOMA-bundle after loading jurabib
% calculation should be done inside \thebibliography, suggested by Tilman Finke
% \addtolength{\jb@biblaw@entry@width}{\textwidth}%
\newcolumntype{j}[1]{>{\bibaltformatalign\hspace{0pt}}p{#1}}
% NEW 0.5f changed item to make consecutive bibliographies possible
\newcommand*{\jb@item}{\item}%
\newcommand\jb@deactivate@babel{%
  %FIXME: \noextrasfrench or \bbl@deactivate don't work here?? just do it the low-level way:
  \let\do\@makeother\do\:\do\;\do\!\do\?\do\"\do\`\do\'\do\^%<---! solved in 0.51r (bug reported by Andreas Altenburger)
%  \do\~ % 0.51r removed, causes problems with ~ from .bst
}
\newcommand*{\bibnumberformat}[1]{\biblnfont{#1.}}%
\newcommand\jb@@test@fullname{}
\newcommand\jb@@testlast@fullname{}
\newcommand\jb@@test@au@or@ed{}
\newcommand\jb@@testlast@au@or@ed{}
\newcommand*{\jb@index@authors}[2]{%
  \ifjb@do@authors@index
    \if@filesw\let\protect\noexpand\immediate\write\@auxout{\string\jb@index{aut}{#1}#2}\fi
  \fi
}
\newcommand*{\jb@index@editors}[2]{%
  \ifjb@do@editors@index
      \if@filesw\let\protect\noexpand\immediate\write\@auxout{\string\jb@index{ed}{#1}#2}\fi
  \fi
}
\newcommand*{\jb@index@organization}[2]{%
  \ifjb@do@organizations@index
    \if@filesw\let\protect\noexpand\immediate\write\@auxout{\string\jb@index{org}{#1}#2}\fi
  \fi
}
\newcommand*{\jbdoitem}{\begingroup\@makeother\\\@makeother\"\def~{\string~}\jb@doitem}%
\newcommand*{\jb@doitem}[3]{%
  \ifjb@debug\typeout{========================^^Jauthor:#1^^Jeditor:#2^^Jorganization:#3^^J}\fi
  \ifjb@index\protected@xdef\curr@key{\jb@key}%
     \@ifundefined{jb@key}{\relax}{%
     % the \@empty test is to remove empty entries in the .bbl between ';' (just for safety)
     \begingroup % make \@tempa assignment local
         \jb@for\@tempa:=#1\do{\ifx\@tempa\@empty\else\jb@index@authors{\jb@key}{\@tempa}\fi}%
         \jb@for\@tempa:=#2\do{\ifx\@tempa\@empty\else\jb@index@editors{\jb@key}{\@tempa}\fi}%
         \jb@for\@tempa:=#3\do{\ifx\@tempa\@empty\else\jb@index@organization{\jb@key}{\@tempa}\fi}%
     \endgroup
 }%
 \fi
 \endgroup % matches the \begingroup in \jbdoitem
 \jb@do@post@item
}
\newcommand*\jb@do@post@item{%
 \ifjb@no@bib\relax\else
  \ifthenelse{\equal{\@nameuse{NOBIB@\jb@key}}{suppress}}{}{%
% NEW 0.5f changed item to make consecutive bibliographies possible
   \jb@item\hyper@jbanchorstart{\jb@key}\hyper@jbanchorend
   \ifjb@howcited
     \@ifundefined{b@\jb@key @C}{%
%        the work \jb@key isn't cited
         \renewcommand*{\bibhowcited}{%
                 \bibnotcited}%
         \renewcommand*{\bibcommenthowcited}{%
                 \bibnotcited}%
         \ifjb@allow@howcited@art@period
           \renewcommand*{\bibartperiodhowcited}{%
                    \bibnotcited}%
         \fi
     }{%
%      the work \jb@key is cited
       \jb@detect@used@cite@commands
       \jb@handle@superscript@ed
       \jb@make@the@howcited
% NEW 0.5f no op. cit. in howcited remark!
       \let\OpCit\@empty
     }%
   \fi
   \protected@edef\jb@tempcntc{\thebibnamereplace}%
   \stepcounter{bibnamereplace}%
   \label{jbib:\thebibnamereplace}%
   \@tempcnta=\jb@tempcntc
   \advance\@tempcnta\@ne
   \protected@edef\jb@tempcntd{\the\@tempcnta}%
   \ifthenelse{\boolean{jb@bibformat@ibidem}%
% NEW 0.6
               \and\not\equal{\jb@@type}{archival}%
   }{%
% 0.5e completely rewritten bibformat=ibidem
       \ifthenelse{%
          \equal{\jb@simple@pageref@by@heiko{jbib:\jb@tempcntc}}{%
            \jb@simple@pageref@by@heiko{jbib:\thebibnamereplace}}%
       }{%
           \ifjb@debug SAME PAGE/\fi
           \ifthenelse{\equal{\jb@@test@fullname}{\jb@@testlast@fullname}}{%
                 \ifjb@debug SAME AUTHOR \fi
                 \ifthenelse{\equal{\jb@@fullname}{}}{}{%
                     \ifthenelse{%
                          \boolean{jbaltformat}%
                     }{%
                          \def\jb@@name{}%
                     }{%
                          \def\jb@@name{\bibauthormultiple}%
                     }%
                }%
           }{%
                 \ifjb@debug AUTHOR DIFFERS \fi
                 \ifthenelse{\equal{\jb@@fullname}{}}{%
                     \def\jb@@name{}%
                 }{%
                     \def\jb@@name{\jb@@fullname\bibansep}%
                 }%
           }%
       }{% DIFFERENT PAGES !!!!!
            \ifthenelse{%
                \boolean{@twoside}%
                \and
                \isodd{\jb@simple@pageref@by@heiko{jbib:\thebibnamereplace}}%
                \and
                \equal{%
                    \jb@simple@pageref@by@heiko{jbib:\jb@tempcntd}}{%
                    \jb@simple@pageref@by@heiko{jbib:\thebibnamereplace}}%
            }{%
                \ifjb@debug DIFF AND ODD/\fi
                \ifthenelse{%
                     \equal{\jb@@test@fullname}{\jb@@testlast@fullname}%
                }{%
                     \ifjb@debug SAME AUTHOR \fi
                     \ifthenelse{\equal{\jb@@fullname}{}}{}{%
                        \ifthenelse{%
                            \boolean{jbaltformat}%
                        }{%
                           \def\jb@@name{%
                               \jb@@fullname%
                               \space%
                               \bibfnfont{\bibcontinuedname}%
                               \bibansep%
                           }%
                        }{%
                            \def\jb@@name{\bibauthormultiple}%
                        }%
                     }%
                }{%
                    \ifjb@debug AUTHORS DIFFERS \fi
                    \ifthenelse{\equal{\jb@@fullname}{}}{%
                        \def\jb@@name{}%
                    }{%
                        \def\jb@@name{\jb@@fullname\bibansep}%
                    }%
                }%
            }{%
                \ifjb@debug DIFF AND EVEN/\fi
                \ifthenelse{%
                     \equal{\jb@@test@fullname}{\jb@@testlast@fullname}%
                }{%
                     \ifjb@debug SAME AUTHOR \fi
                     \ifthenelse{\equal{\jb@@fullname}{}}{}{%
                        \ifthenelse{%
                            \boolean{jbaltformat}%
                        }{%
                           \def\jb@@name{%
                               \jb@@fullname%
                               \space%
                               \bibfnfont{\bibcontinuedname}%
                               \bibansep%
                           }%
                        }{%
                            \def\jb@@name{\jb@@fullname\bibansep}%
                        }%
                     }%
                }{%
                    \ifjb@debug AUTHORS DIFFERS \fi
                    \ifthenelse{\equal{\jb@@fullname}{}}{%
                        \def\jb@@name{}%
                    }{%
                        \def\jb@@name{\jb@@fullname\bibansep}%
                    }%
                }%
            }%
        }%
   }{% bibformat=ibidem false
       \ifthenelse{\equal{\jb@@fullname}{}}{%
           \def\jb@@name{}%
       }{%
           \def\jb@@name{\jb@@fullname\bibansep}%
       }%
   }%
   \ifjb@babel
     \ifthenelse{\equal{\jb@@language}{\@empty}}{%
         \expandafter\jbselectlanguage\expandafter{\bbl@main@language}%
     }{%
         \language=\csname l@\jb@@language\endcsname\relax%
     }%
   \fi
   \ifjbaltformat\else
     \ifjb@numbered@bib
         \begin{minipage}[t]{\bibnumberwidth}%
           \stepcounter{jbbibcnta}\bibnumberformat{\thejbbibcnta}%
         \end{minipage}%
     \fi
   \fi
   \ifjb@tabular
            \begin{minipage}[t]{\bibleftcolumn}%
                \renewcommand*{\bibansep}{}%
% NEW 0.6 configure linestrech in tabular mode
                \bibleftcolumnadjust\bibleftcolumnstretch\mbox{}%
                \jb@@name%
            \end{minipage}
            \hspace{\bibcolumnsep}%
            \begin{minipage}[t]{\bibrightcolumn}%
% NEW 0.6 configure linestrech in tabular mode
                \bibrightcolumnadjust\bibleftcolumnstretch%
%               no linebreak in right column
                \let\jblinebreak\@empty
                \jb@@fulltitle%
                \begingroup
                  \let\hyper@jblinkstart\@gobble
                  \let\hyper@jblinkend\relax
                  \jb@bibarg@howcited%
                \endgroup
                \ifjb@dot\unskip\unskip\unskip.\fi
% NEW 0.5e
                \jb@endnote%
                \ifjb@backref~\backref{\csname br@\jb@key\endcsname}\fi
            \end{minipage}%
% NEW 0.6 to configure itemsep in tabular mode
            \bibtabularitemsep
   \else
       \ifjbaltformat
            \ifx\jb@@name\@empty\else\medskip\fi % add some vertical space between different authors
            \let\jblinebreak\@empty\setlength{\tabcolsep}{0pt}\mbox{}\noindent
            \begin{tabular}{p{\jb@biblaw@item@width}j{\jb@biblaw@entry@width}}
            \ifx\jb@@name\@empty\else\multicolumn{2}{p{\columnwidth}}{\jb@@name}\\\fi
            \jb@biblaw@item & \jb@@fulltitle%
                              \begingroup
                                 \let\hyper@jblinkstart\@gobble
                                 \let\hyper@jblinkend\relax
                                 \jb@bibarg@howcited%
                               \endgroup
                               \ifjb@dot\unskip\unskip\unskip.\fi
                               \jb@endnote%
                               \ifjb@backref
                                 ~\backref{\csname br@\jb@key\endcsname}%
                               \fi
            \end{tabular}
       \else
            \jb@@name\jb@@fulltitle%
            \begingroup
              \let\hyper@jblinkstart\@gobble
              \let\hyper@jblinkend\relax
              \jb@bibarg@howcited%
            \endgroup
%            \ifjb@dot\unskip\unskip\unskip.\fi
% NEW 0.6
            \ifthenelse{\equal{\jb@@type}{archival}}{}{\ifjb@dot\unskip\unskip\unskip.\fi}%
            \jb@endnote%
            \ifjb@backref~\backref{\csname br@\jb@key\endcsname}\fi
       \fi
   \fi
   \gdef\jb@endnote{}%
   \protected@edef\jb@@testlast@fullname{\jb@@test@fullname}%
   \protected@edef\jb@@testlast@au@or@ed{\jb@@test@au@or@ed}%
  }%
 \fi
 \if@filesw{\let\protect\noexpand\immediate\write\@newciteauxhandle{%
    \string\bibcite{\jb@key}{\jb@tempa}}}%
 \fi
 \ignorespaces
}%
\newcommand*{\jbbibargs}[5]{%
  \protected@edef\jb@tempa{\jb@tempb{#1}{#4}}%
  \protected@edef\jb@tempb{\expandafter\jb@thirdofseven\jb@tempa\@empty}%
  \protected@edef\jb@tempc{\expandafter\jb@fourthofseven\jb@tempa\@empty}%
  \def\jb@bibarg@howcited{#5}%
  \ifthenelse{\equal{#2}{jureco}}{\global\jb@bibformat@ibidemfalse\global\jbaltformatfalse}{\gdef\jb@@test@fullname{#2}}%
  \ifthenelse{\equal{#3}{}}{}{\gdef\jb@@test@au@or@ed{#3}}%
  \jb@chk@bibetal{\jb@@author}{\jb@key}%
  \let\jb@first@author\@undefined
  \let\jb@first@editor\@undefined
  \setcounter{ibidem@author}{0}%
  \setcounter{multiple@author}{0}%
}%
\def\@lbibitem{%
  \begingroup
    \jb@deactivate@babel
    \jb@lbibitem
}
\def\jb@lbibitem[#1]#2{%
    \gdef\jb@tempb{#1}%
    \gdef\jb@key{#2}%
    \ifjb@index@bib
       \jb@call@index{aut}{#2}%
       \jb@call@index{ed}{#2}%
       \jb@call@index{org}{#2}%
    \fi
  \endgroup
}%

\newcommand*{\nobibliography}[1]{%
  \ifjb@allow@nobib
   \global\jb@no@bibtrue
%  no hyperlinks if bibliography is suppressed
   \if@filesw\immediate\write\@newciteauxhandle{%
% NEW 0.51v switch off hypercite when \nobibliography is used
         \string\global\string\jb@allow@hyper@citefalse^^J%
         \string\global\string\jb@allow@hyper@cite@nobibfalse^^J%
         \string\global\string\jb@no@bibtrue
%        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ indexing for \nobibliography too
     }%
   \fi
  \begingroup
    \renewenvironment{thebibliography}[1]{%
     \usecounter{enumiv}%
     \renewcommand*{\item}[1][]{%
       \ifx\relax####1\relax\stepcounter\@listctr\fi
     }%
    }{\relax}%
    \bibliography{#1}%
  \endgroup
  \else
  \jb@package@warningNoLine{\jb@pkg@name}{%
    You are using the `\string\nobibliography' command\MessageBreak
    without using one of the `citefull' options.\MessageBreak
    Choose `citefull=first' or `citefull=all'.\MessageBreak
    I'm putting out the normal `\string\bibliography'%
  }%
  \bibliography{#1}%
 \fi
}%
% NEW 0.5f \jb@enote@hook introduced for compatibility with endnotes.sty
\newcommand\jb@enote@hook{}
% *******************************************************
%           THE CITE COMMANDS
% *******************************************************
%          \cite section
% *******************************************************
%\def\cite{%
% CH 0.6 Make it robust! [SU]
\DeclareRobustCommand\cite{%
  \@ifstar{%
    \begingroup
      \jb@deactivate@babel%
      \jb@starred@citetrue
      \@ifnextchar[{\jb@cite@no@title}{\jb@cite@no@title[]}%
  }{%
    \begingroup
      \jb@deactivate@babel%
      \@ifnextchar[{\jb@cite}{\jb@cite[]}%
  }%
}%
\newcommand*{\jb@cite}{}%
%
\def\jb@cite{%
  \@ifnextchar[{\jb@@cite}{\jb@@cite[]}%
}
\def\jb@@cite[#1]{%
  \@ifnextchar[{\jb@@@cite[#1]}{\jb@@@cite[][#1]}%
}
\def\jb@@@cite[#1][#2]#3{%
 \def\jb@enote@hook{%
     \ifjb@all@full
        \jb@change@fonts@for@fullcitetrue
        \jb@fullcite@againtrue
        \jb@citefalse
     \else
        \jb@citetrue
        \jb@fullcite@againfalse
     \fi
     \jb@cite@titlefalse
     \jb@cite@no@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \ifjb@super\jb@footnote@periodtrue\fi
 \jb@footfalse     % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
% *******************************************************
%          \cite* section
% *******************************************************
\newcommand*{\jb@cite@no@title}{}%
\def\jb@cite@no@title{%
  \@ifnextchar[{\jb@@cite@no@title}{\jb@@cite@no@title[]}%
}
\def\jb@@cite@no@title[#1]{%
  \@ifnextchar[{\jb@@@cite@no@title[#1]}{\jb@@@cite@no@title[][#1]}%
}
\def\jb@@@cite@no@title[#1][#2]#3{%
 \def\jb@enote@hook{%
     \ifjb@all@full
        \jb@change@fonts@for@fullcitetrue
        \jb@fullcite@againtrue
        \jb@cite@no@titlefalse
     \else
        \jb@cite@no@titletrue
        \jb@fullcite@againfalse
     \fi
     \jb@citefalse
     \jb@cite@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \ifjb@super\jb@footnote@periodtrue\fi
 \jb@footfalse % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
% *******************************************************
%          \citetitle section
% *******************************************************
\newcommand*{\jbcitetitle}{%
 \begingroup
  \jb@deactivate@babel%
  \@ifnextchar[{\jb@cite@title}{\jb@cite@title[]}%
}
\newcommand*{\jb@cite@title}{}%
%
\def\jb@cite@title{%
  \@ifnextchar[{\jb@@cite@title}{\jb@@cite@title[]}%
}
\def\jb@@cite@title[#1]{%
  \@ifnextchar[{\jb@@@cite@title[#1]}{\jb@@@cite@title[][#1]}%
}
\def\jb@@@cite@title[#1][#2]#3{%
 \def\jb@enote@hook{%
     \ifjb@all@full
        \jb@change@fonts@for@fullcitetrue
        \jb@fullcite@againtrue
        \jb@cite@titlefalse
     \else
        \jb@cite@titletrue
        \jb@fullcite@againfalse
     \fi
     \jb@citefalse
     \jb@cite@no@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \ifjb@super\jb@footnote@periodtrue\fi
 \jb@footfalse % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
% *******************************************************
%          \fullcite section
% *******************************************************
\newcommand*{\jbfullcite}{%
 \begingroup
  \jb@deactivate@babel%
  \@ifnextchar[{\jb@fullcite}{\jb@fullcite[]}%
}
\newcommand*{\jb@fullcite}{}%
%
\def\jb@fullcite{%
  \@ifnextchar[{\jb@@fullcite}{\jb@@fullcite[]}%
}
\def\jb@@fullcite[#1]{%
  \@ifnextchar[{\jb@@@fullcite[#1]}{\jb@@@fullcite[][#1]}%
}
\def\jb@@@fullcite[#1][#2]#3{%
 \def\jb@enote@hook{%
     \noibidem%
     \jb@change@fonts@for@fullcitetrue
     \jb@cite@no@titlefalse
     \jb@fullcite@againtrue
     \jb@citefalse
     \jb@cite@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \ifjb@super\jb@footnote@periodtrue\fi
 \jb@footfalse % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
% *******************************************************
%           THE FOOT CITE COMMANDS
% *******************************************************
%          \footcite section
% *******************************************************
\newcommand*{\jbfootcite}{%
 \begingroup
  \jb@deactivate@babel%
  \@ifstar{\jbfootcitenotitle}{%
  \@ifnextchar[{\jb@footcite}{\jb@footcite[]}}}%
\newcommand*{\jb@footcite}{}%
%
\def\jb@footcite{%
  \@ifnextchar[{\jb@@footcite}{\jb@@footcite[]}%
}
\def\jb@@footcite[#1]{%
  \@ifnextchar[{\jb@@@footcite[#1]}{\jb@@@footcite[][#1]}%
}
\def\jb@@@footcite[#1][#2]#3{%
 \ifjb@fn\ClassError{\jb@pkg@name}{%
  You are using `\string\footcite' inside a footnote}{%
  Sorry, that makes no sense.}\fi
 \def\jb@enote@hook{\unskip%
     \ifjb@all@full
      \jb@change@fonts@for@fullcitetrue
      \jb@fullcite@againtrue
      \jb@citefalse
     \else
      \jb@citetrue
      \jb@fullcite@againfalse
     \fi
     \jb@cite@titlefalse
     \jb@cite@no@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \jb@footnote@periodtrue
 \jb@foottrue % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
% *******************************************************
%          \footcitetitle section
% *******************************************************
\newcommand*{\jbfootcitetitle}{%
 \begingroup
  \jb@deactivate@babel%
  \@ifnextchar[{\jb@footcitetitle}{\jb@footcitetitle[]}%
}%
\newcommand*{\jb@footcitetitle}{}%
%
\def\jb@footcitetitle{%
  \@ifnextchar[{\jb@@footcitetitle}{\jb@@footcitetitle[]}%
}
\def\jb@@footcitetitle[#1]{%
  \@ifnextchar[{\jb@@@footcitetitle[#1]}{\jb@@@footcitetitle[][#1]}%
}
\def\jb@@@footcitetitle[#1][#2]#3{%
 \ifjb@fn\ClassError{\jb@pkg@name}{%
  You are using `\string\footcitetitle' inside a footnote}{%
  Sorry, that makes no sense.}\fi
 \def\jb@enote@hook{\unskip% <== added to skip spaces before endnotes
     \ifjb@all@full
       \jb@change@fonts@for@fullcitetrue
       \jb@fullcite@againtrue
       \jb@cite@titlefalse
     \else
       \jb@cite@titletrue
       \jb@fullcite@againfalse
     \fi
     \jb@citefalse
     \jb@cite@no@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \jb@footnote@periodtrue
 \jb@foottrue % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
% *******************************************************
%          \footcite* section
% *******************************************************
\newcommand*{\jbfootcitenotitle}{%
 \begingroup
  \jb@deactivate@babel%
  \jb@starred@citetrue
  \@ifnextchar[{\jb@footcitenotitle}{\jb@footcitenotitle[]}}%
\newcommand*{\jb@footcitenotitle}{}%
%
\def\jb@footcitenotitle{%
  \@ifnextchar[{\jb@@footcitenotitle}{\jb@@footcitenotitle[]}%
}
\def\jb@@footcitenotitle[#1]{%
  \@ifnextchar[{\jb@@@footcitenotitle[#1]}{\jb@@@footcitenotitle[][#1]}%
}
\def\jb@@@footcitenotitle[#1][#2]#3{%
 \ifjb@fn\ClassError{\jb@pkg@name}{%
  You are using `\string\footcite*' inside a footnote}{%
  Sorry, that makes no sense.}\fi
 \def\jb@enote@hook{\unskip%
     \ifjb@all@full
      \jb@change@fonts@for@fullcitetrue
      \jb@fullcite@againtrue
      \jb@cite@no@titlefalse
     \else
      \jb@cite@no@titletrue
      \jb@fullcite@againfalse
     \fi
     \jb@citefalse
     \jb@cite@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \jb@footnote@periodtrue
 \jb@foottrue % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
% *******************************************************
%          \footfullcite section
% *******************************************************
\newcommand*{\jbfootfullcite}{%
 \begingroup
  \jb@deactivate@babel%
  \@ifnextchar[{\jb@footfullcite}{\jb@footfullcite[]}%
}%
\newcommand*{\jb@footfullcite}{}%
%
\def\jb@footfullcite{%
  \@ifnextchar[{\jb@@footfullcite}{\jb@@footfullcite[]}%
}
\def\jb@@footfullcite[#1]{%
  \@ifnextchar[{\jb@@@footfullcite[#1]}{\jb@@@footfullcite[][#1]}%
}
\def\jb@@@footfullcite[#1][#2]#3{%
 \ifjb@fn\ClassError{\jb@pkg@name}{%
  You are using `\string\footfullcite' inside a footnote}{%
  Sorry, that makes no sense.}\fi
 \def\jb@enote@hook{\unskip%
     \noibidem%
     \jb@change@fonts@for@fullcitetrue
     \jb@cite@no@titlefalse
     \jb@fullcite@againtrue
     \jb@citefalse
     \jb@cite@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \jb@footnote@periodtrue
 \jb@foottrue % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
% CH 0.6 rewritten
\newcommand*{\citetitleonly}{%
 \begingroup
  \jb@deactivate@babel%
  \@ifnextchar[%
   {\jb@cite@titlewithoutauthor}{\jb@cite@titlewithoutauthor[]}%
}
\newcommand*{\jb@cite@titlewithoutauthor}{}%
\def\jb@cite@titlewithoutauthor{%
  \@ifnextchar[{\jb@@cite@titlewithoutauthor}{\jb@@cite@titlewithoutauthor[]}%
}
\def\jb@@cite@titlewithoutauthor[#1]{%
  \@ifnextchar[{\jb@@@cite@titlewithoutauthor[#1]}{\jb@@@cite@titlewithoutauthor[][#1]}%
}
\def\jb@@@cite@titlewithoutauthor[#1][#2]#3{%
 \def\jb@enote@hook{%
     \ifjb@all@full
        \jb@change@fonts@for@fullcitetrue
        \jb@fullcite@againtrue
        \jb@cite@titlefalse
     \else
        \jb@cite@titletrue
        \jb@noauthorforcitetitletrue
        \jb@fullcite@againfalse
     \fi
     \jb@citefalse
     \jb@cite@no@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \ifjb@super\jb@footnote@periodtrue\fi
 \jb@footfalse % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
% NEW 0.6
\newcommand*{\footcitetitleonly}{%
 \begingroup
  \jb@deactivate@babel%
  \@ifnextchar[%
   {\jb@foot@cite@titlewithoutauthor}{\jb@foot@cite@titlewithoutauthor[]}%
}
\newcommand*{\jb@foot@cite@titlewithoutauthor}{}%
\def\jb@foot@cite@titlewithoutauthor{%
  \@ifnextchar[{\jb@@foot@cite@titlewithoutauthor}{\jb@@foot@cite@titlewithoutauthor[]}%
}
\def\jb@@foot@cite@titlewithoutauthor[#1]{%
  \@ifnextchar[{\jb@@@foot@cite@titlewithoutauthor[#1]}{\jb@@@foot@cite@titlewithoutauthor[][#1]}%
}
\def\jb@@@foot@cite@titlewithoutauthor[#1][#2]#3{%
 \def\jb@enote@hook{%
     \ifjb@all@full
        \jb@change@fonts@for@fullcitetrue
        \jb@fullcite@againtrue
        \jb@cite@titlefalse
     \else
        \jb@cite@titletrue
        \jb@noauthorforcitetitletrue
        \jb@fullcite@againfalse
     \fi
     \jb@citefalse
     \jb@cite@no@titlefalse
     \jb@footfalse % works for endnotes too
     \jbweareinendnotestrue
 }%
 \jb@enote@hook
 \jb@footnote@periodtrue
 \jb@foottrue % works only for non-endnotes
 \jbweareinendnotesfalse
 \@citex[#1][#2]{#3}%
 \endgroup
}
\newcommand*{\citefield}[3][]{%
  \renewcommand*{\@cite}[2]{##1##2}%
  \let\@citea\@empty\@cite{\@for\@citeb:=#3\do{%
  \@citea\def\@citea{;\penalty\@m\ }%
  \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
  \if@filesw\immediate\write\@newciteauxhandle{\jb@makehowcited%
  \string\citation{\@citeb}}\fi
  \@ifundefined{b@\@citeb\@extra@b@citeb}{%
  \mbox{\reset@font{\bfseries ?}, #1}\G@refundefinedtrue\@latex@warning%
  {Citation `\@citeb' on page \thepage \space undefined}}{%
  \begingroup
% NEW 0.5e only for \jb@checked@title, otherwise \jb@@newauthorcite is undefined
   \def\jb@@newauthorcite{#3}%
   \ifjb@allow@hyper@cite\hyper@jblinkstart{\@citeb}\fi
%   \protected@edef\jb@tempa{\csname b@\@citeb\@extra@b@citeb\endcsname}%
%   \protected@edef\jb@tempb{\expandafter\jb@thirdofseven\jb@tempa\@empty}%
% NEW 0.5f revised for more arguments from .bbl
%   \protected@edef\jb@tempc{\expandafter\jb@fourthofseven\jb@tempa\@empty}%
% NEW 0.5f new command because of increasing use
   \jb@extract
% NEW 0.6 babel support for citefield command added, bug reported by Frank Mittelbach
   \ifjb@babel
     \ifthenelse{\equal{\jb@@language}{\bbl@main@language}}{}{%
       \ifthenelse{\equal{\jb@@language}{\@empty}}{%
          \expandafter\jbselectlanguage%
          \expandafter{\bbl@main@language}%
       }{%
          \language=\csname l@\jb@@language\endcsname\relax%
       }%
     }%
   \fi
   \ifthenelse{\equal{#2}{}}{???}{%
       \ifthenelse{\equal{#2}{title}}{%
           \jbfulltitlefont{\jb@@title}%
       }{%
            \ifthenelse{\equal{#2}{juratitle}
                        \or\equal{#2}{shorttitle}}{%
                \jbshorttitlefont{\jb@@shorttitle}%
            }{%
                 \ifthenelse{\equal{#2}{year}}{%
                    \ifx\jb@@year\@empty\else
                     \textup{\jbcitationyearformat{\jb@@year}}\fi
                 }{%
                       \ifthenelse{\equal{#2}{author}}{%
                           \let\biblnfont\jbauthorfont
                           \let\bibfnfont\jbauthorfnfont
                           \let\bibelnfont\jbauthorfont
                           \let\bibefnfont\jbauthorfnfont
% NEW 0.5f \jb@checked@author introduced for oxford crossrefs
                           \ifjbcross
                                \jb@checked@author%
                             \else
                                \jbauthorfont{\jb@@fullname}%
                           \fi
                       }{%
                             \ifthenelse{\equal{#2}{juraauthor}\or\equal{#2}{shortauthor}}{%
% NEW 0.5e to avoid ambiguous author ``\citefield's''
                                 \ifthenelse{\equal{\jb@@mult@switch}{1}\or\equal{\jb@@title@switch}{1}}{%
                                     \jbauthorfont{\jb@@author}%
% later in 0.5e: check for crossref's added, because outside crossref's the title is unwanted!
                                     \ifjbcross\jb@checked@title\fi%
                                 }{%
                                     \jbauthorfont{\jb@@author}%
                                 }%
                             }{%
                                  \ifthenelse{\equal{#2}{apy}}{%
                                      \apyformat{\jb@@apy}%
                                  }{%
% NEW 0.51r access to url field added, suggested by Andreas Altenburger
                                      \ifthenelse{\equal{#2}{url}}{%
                                          \jburluse{#3}%
                                      }{%
                                          #2%
                                      }%
                                  }%
                             }%
                       }%
                 }%
            }%
       }%
   }%
   \ifjb@allow@hyper@cite\hyper@jblinkend\fi
  \endgroup
%  \ifthenelse{\equal{#1}{\@empty}}{\relax}{,\space #1}%
% CH 0.52p, check for `commabeforerest' introduced
  \ifthenelse{\equal{#1}{\@empty}}{\relax}{\ifjb@comma@before@rest,\fi\space #1}%
  }}}{}}%
% NEW 0.5f emulate the most important natbib citation commands
\newcommand{\jb@nat@cite@left@sep}{}%
\newcommand{\jb@nat@cite@right@sep}{}%
\newcommand{\jb@nat@citep@left@sep}{}%
\newcommand{\jb@nat@citep@right@sep}{}%
\newcommand*{\citep}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@citep}{\jb@citep[]}}%
\def\jb@citep[#1]{\@ifnextchar[{\jb@@citep[#1]}{\jb@@citep[][#1]}}%
\def\jb@@citep[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}\ifthenelse{\equal{\jb@@year}{}}{}{,\space\jb@@year}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{(}\renewcommand{\jb@nat@citep@right@sep}{)}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@footfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
%    \futurelet\@let@token\@next@footnote
}%
\newcommand*{\citet}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@citet}{\jb@citet[]}}%
\def\jb@citet[#1]{\@ifnextchar[{\jb@@citet[#1]}{\jb@@citet[][#1]}}%
\def\jb@@citet[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}\ifthenelse{\equal{\jb@@year}{}}{}{\space(\jb@@year}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{)}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@footfalse
    \jbweareinendnotesfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
    \jb@nat@use@year@commandtrue
}%
\newcommand*{\citealt}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@citealt}{\jb@citealt[]}}%
\def\jb@citealt[#1]{\@ifnextchar[{\jb@@citealt[#1]}{\jb@@citealt[][#1]}}%
\def\jb@@citealt[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}\ifthenelse{\equal{\jb@@year}{}}{}{\space\jb@@year}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@footfalse
    \jbweareinendnotesfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
    \jb@nat@use@year@commandtrue
}%
\newcommand*{\citealp}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@citealp}{\jb@citealp[]}}%
\def\jb@citealp[#1]{\@ifnextchar[{\jb@@citealp[#1]}{\jb@@citealp[][#1]}}%
\def\jb@@citealp[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}\ifthenelse{\equal{\jb@@year}{}}{}{,\space\jb@@year}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@footfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
    \jb@nat@use@year@commandtrue
}%
\newcommand*{\citeauthor}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@citeauthor}{\jb@citeauthor[]}}%
\def\jb@citeauthor[#1]{\@ifnextchar[{\jb@@citeauthor[#1]}{\jb@@citeauthor[][#1]}}%
\def\jb@@citeauthor[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@footfalse
    \jbweareinendnotesfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
%    \futurelet\@let@token\@next@footnote
}%
\newcommand*{\citeyear}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@citeyear}{\jb@citeyear[]}}%
\def\jb@citeyear[#1]{\@ifnextchar[{\jb@@citeyear[#1]}{\jb@@citeyear[][#1]}}%
\def\jb@@citeyear[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\ifthenelse{\equal{\jb@@year}{}}{?}{\jb@@year}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@footfalse
    \jbweareinendnotesfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
    \jb@nat@use@year@commandtrue
}%
\newcommand*{\citeyearpar}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@citeyearpar}{\jb@citeyearpar[]}}%
\def\jb@citeyearpar[#1]{\@ifnextchar[{\jb@@citeyearpar[#1]}{\jb@@citeyearpar[][#1]}}%
\def\jb@@citeyearpar[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\ifthenelse{\equal{\jb@@year}{}}{?}{(\jb@@year)}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@footfalse
    \jbweareinendnotesfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
    \jb@nat@use@year@commandtrue
}%
\newcommand*{\footcitep}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@footcitep}{\jb@footcitep[]}}%
\def\jb@footcitep[#1]{\@ifnextchar[{\jb@@footcitep[#1]}{\jb@@footcitep[][#1]}}%
\def\jb@@footcitep[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}\ifthenelse{\equal{\jb@@year}{}}{}{,\space\jb@@year}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{(}\renewcommand{\jb@nat@citep@right@sep}{)}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@foottrue
    \jbweareinendnotesfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
    \jb@nat@use@year@commandtrue
}%
\newcommand*{\footcitet}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@footcitet}{\jb@footcitet[]}}%
\def\jb@footcitet[#1]{\@ifnextchar[{\jb@@footcitet[#1]}{\jb@@footcitet[][#1]}}%
\def\jb@@footcitet[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}\ifthenelse{\equal{\jb@@year}{}}{}{\space(\jb@@year)}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@foottrue
    \jbweareinendnotesfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
    \jb@nat@use@year@commandtrue
}%
\newcommand*{\footcitealt}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@footcitealt}{\jb@footcitealt[]}}%
\def\jb@footcitealt[#1]{\@ifnextchar[{\jb@@footcitealt[#1]}{\jb@@footcitealt[][#1]}}%
\def\jb@@footcitealt[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}\ifthenelse{\equal{\jb@@year}{}}{}{\space\jb@@year}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@foottrue
    \jbweareinendnotesfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
    \jb@nat@use@year@commandtrue
}%
\newcommand*{\footcitealp}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@footcitealp}{\jb@footcitealp[]}}%
\def\jb@footcitealp[#1]{\@ifnextchar[{\jb@@footcitealp[#1]}{\jb@@footcitealp[][#1]}}%
\def\jb@@footcitealp[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}\ifthenelse{\equal{\jb@@year}{}}{}{,\space\jb@@year}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse % works for endnotes too
    }%
    \jb@enote@hook
    \jb@foottrue
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
    \jb@nat@use@year@commandtrue
}%
\newcommand*{\footciteauthor}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@footciteauthor}{\jb@footciteauthor[]}}%
\def\jb@footciteauthor[#1]{\@ifnextchar[{\jb@@footciteauthor[#1]}{\jb@@footciteauthor[][#1]}}%
\def\jb@@footciteauthor[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\jbauthorfont{\jb@@author}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \renewcommand{\jb@nat@citep@left@sep}{}\renewcommand{\jb@nat@citep@right@sep}{}%
        \jb@footfalse
        \jbweareinendnotestrue
    }%
    \jb@enote@hook
    \jb@foottrue
    \jbweareinendnotesfalse
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
}%
\newcommand*{\jb@emulate@nat@cite}{\@ifnextchar[{\jb@@emulate@nat@cite}{\jb@@emulate@nat@cite[]}}%
\def\jb@@emulate@nat@cite[#1]{\@ifnextchar[{\jb@@@emulate@nat@cite[#1]}{\jb@@@emulate@nat@cite[][#1]}}%
\def\jb@@@emulate@nat@cite[#1][#2]#3{%
  \ifthenelse{\boolean{jb@foot}\or\(\boolean{jb@super}\and\not\boolean{jb@fn}\and\not\boolean{jbweareinbib}\and\not\boolean{jbweareinendnotes}\)}{%
    \renewcommand*{\@cite}[2]{\unskip\footnote{##1##2.}}%
  }{%
    \renewcommand*{\@cite}[2]{##1##2}%
  }%
  \let\@citea\@empty
  \jb@nat@citep@left@sep%
  \@cite{%
    \@for\@citeb:=#3\do{%
        \@citea\def\@citea{;\penalty\@m\ }%
        \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
        \if@filesw
            \immediate\write\@newciteauxhandle{%
                \jb@makehowcited\string\citation{\@citeb}}%
        \fi
        \@ifundefined{b@\@citeb\@extra@b@citeb}{%
          \mbox{\reset@font{\bfseries ?}, #1}%
          \G@refundefinedtrue
          \@latex@warning{Citation `\@citeb' on page \thepage \space undefined}%
        }{%
          \begingroup
           \jb@call@index{aut}{\@citeb}%
           \jb@call@index{ed}{\@citeb}%
           \jb@call@index{org}{\@citeb}%
           \ifjb@allow@hyper@cite\hyper@jblinkstart{\@citeb}\fi
           \jb@extract%
           \jb@nat@cite@left@sep%
           \ifjb@see
                 \ifthenelse{\equal{#1}{\@empty}}{}{#1\space}%
           \else
              \ifthenelse{\equal{#1}{\@empty}}{}{#1\space}%
           \fi
           \jb@nat@commands%
             \ifthenelse{\equal{#2}{\@empty}}{}{,\space\jbprformat{#2}}%
           \jb@nat@cite@right@sep%
           \ifjb@allow@hyper@cite\hyper@jblinkend\fi
          \endgroup
        }%
    }%
  }{}%
  \jb@nat@citep@right@sep%
}%
\newcommand*{\jb@makehowcited}{%
\ifjb@howcited
 \ifjbcross\else
% NEW 0.51c new switch for suppressing howcited while using \nobibliography,
% `jb@allow@hyper@cite' is used by the new option `hypercite=false'
  \ifjb@allow@hyper@cite@nobib
%   no need to write out if \nobibliography is used.
   \ifjb@cite\string\jbrealcitation{cite}{\@citeb}^^J\fi
   \ifjb@cite@title\string\jbrealcitation{citetitle}{\@citeb}^^J\fi
   \ifjb@cite@no@title\string\jbrealcitation{citenotitle}{\@citeb}^^J\fi
  \fi
 \fi
\fi
}%
\newcommand*{\jb@changefontsforfullcite}{%
  \ifjb@reverse@names@in@citation
      \let\bibnf\bibrnf
      \let\bibenf\bibrenf
  \fi
  \let\bibansep\jbhowsepbeforetitle
  \let\bibbtasep\jbbtasep
  \let\bibbfsasep\jbbfsasep
  \let\bibbstasep\jbbstasep
  \let\bibbtesep\jbbtesep
  \let\bibbfsesep\jbbfsesep
  \let\bibbstesep\jbbstesep
  \let\jblinebreak\@empty
  \ifjb@change@fonts@for@fullcite
  \let\biblnfont\jbauthorfont%
  \let\bibfnfont\jbauthorfnfont%
  \let\bibelnfont\jbauthorfont%
  \let\bibefnfont\jbauthorfnfont%
  \let\bibtfont\jbtitlefont%
  \let\bibbtfont\jbbtitlefont%
  \let\bibapifont\jbapifont%
    \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{%
    \ifjb@dynamic@author@fonts
      \let\jbauthorfont\jbactualauthorfont
      \let\biblnfont\jbactualauthorfont
      \let\bibfnfont\jbactualauthorfnfont
%      \let\bibelnfont\jbactualauthorfont
%      \let\bibefnfont\jbactualauthorfnfont
    \fi
    }{%
    \ifjb@dynamic@author@fonts
      \ifjb@see
      \let\biblnfont\jbactualauthorfont
      \else
      \let\jbannotatorfont\jbactualauthorfont
      \let\jbauthorfont\jbauthorfontifannotator
      \fi
    \fi
    }%
  \fi
}%
\newcommand*{\jb@test@last@author@ibidem}{%
   \ifjb@see
     \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{}{%
       \jb@formatted@co@author%
%      if 2nd opt. arg (via option `see') is given, switch to lower case ibid.
%      thanks to Alexander Wisspeintner (wisspein@informatik.tu-muenchen.de)
       \let\IbidemName\IbidemMidName
     }%
   \fi
   \ifthenelse{\equal{\jb@@newannotatorcite}{\jb@@lastannotatorcite}\or\boolean{jb@see}}{%
%                                                                 ^^^^^^^^^^^^^^^^^^^
% NEW 0.5e: if `see' is active, allow immediately following ibidem for different `annotators'
% Example: \footcite[][see]{inbook-minimal}
%          \footcite{inbook-minimal}        <=== ibid. for humanities (if `see' is active), NOT for lawyers!
%          \footcite{inbook-minimal}        <=== ibid. for both!
     \let\jb@@newannotatorcite\@empty
     \@ifundefined{ibidem}{\@namedef{ibidem}{}}{\relax}%
     \ifjb@debug
       \textcolor[named]{WildStrawberry}{%
       \ifjb@debug@br[\fi\ifthenelse{\thejb@cites@in@footnote<2}{\IbidemName}{\IbidemMidName}\ifjb@debug@br]\fi}%
     \else
%       \IbidemName
% NEW 0.52k+l lowercase ibidem for inline citations or \cite's inside the same footnote. (reported by Matthias Damm)
       \ifthenelse{\thejb@cites@in@footnote<2}{\IbidemName}{\IbidemMidName}%
% NEW 0.51 Ibidem/Idem-bugfix. Bug reported by Sönke Schaal (<s.schaal@freenet.de>)
% When using German and `ibidem' and `idem' are used together, it appears `A.a.O.Ders.'
% because of ``hardcoded'' gender macros for German in dejbbib.ldf. In all other languages
% the gender macros were linked to \idem[mid]name, which was \@empty'ed here in this
% macro. Now they are disabled all in the same way, by using:
       \jb@switchidemofflocallytrue
% NEW 0.52i while we suppressing output of startpages for ibidem citations now,
% we have to switch off the mechanism to suppress formatted pages after startpages
       \jbnoformatafterstartpagefalse
     \fi
% NEW 0.5f if the pages are also the same, suppress them!
     \ifthenelse{\equal{\jb@@newpagecite}{\jb@@lastpagecite}}{\let\jb@@newpagecite\@empty}{}%
% CHANGED 0.51h kerning routine removed
%     \ifjb@ssed@kerning@wanted
%          \renewcommand*{\jb@kern@before@sepi}{}%
%          \renewcommand*{\jb@kern@before@sepii}{}%
%          \renewcommand*{\jb@kern@before@sepiii}{}%
%          \renewcommand*{\jb@kern@after@sepi}{ }%
%          \renewcommand*{\jb@kern@after@sepii}{ }%
%          \renewcommand*{\jb@kern@after@sepiii}{ }%
%     \fi
     \let\jb@extraspace\@empty
%     \jb@footnote@period@ibidemfalse
% NEW 0.5e humanities stuff
     \let\jbapifont\@empty% <== remove single quotes after ibid.
     \let\jbbtfont\@empty % <== remove single quotes after ibid.
     \ifjb@ibidem@with@name
       \let\jb@@fullname\@empty
       \let\IbidemName\@empty
       \let\jbatsep\@empty
       \jb@second@extra@spacefalse
     \fi
     \let\jb@use@fullcite\@empty
     \let\jb@@author\@empty
     \let\jb@aftertitleedition\@empty
     \let\jb@checked@edition\@empty
     \let\jbhowsepbeforetitle\@empty
     \let\jb@@title\@empty
% NEW 0.5e bug removed for ibidem'ed citations, wrong error message about missing shorttitle
% (although given), submitted by Andreas K. Foerster (<AKFoerster@nikocity.de>)
% changed \@empty to \relax
     \let\jb@@shorttitle\relax
% NEW 0.5e for use with jchicago.bst
     \let\jb@formatted@year\@empty
% NEW 0.5e idem feature
% REMOVED 0.5f See => Ibidem/Idem-bugfix some lines above
%     \let\idemname\@empty
% NEW 0.5e op.cit. feature
     \let\OpCit\relax
% NEW 0.6 remove howcited remark if it should be used for citation
     \ifjbusehowcitedforcite\let\jb@@howcited\@empty\fi
     \ifjb@see\else\let\jb@@newannotatorcite\@empty\fi
     \ifthenelse{%
                 \equal{\jb@@newpagecite}{\jb@@lastpagecite}%
                 \or
                 \equal{\jb@@newpagecite}{}%
     }{%
                 \global\jb@footnote@periodfalse
     }{}%
% NEW 0.5f make sure it is empty (prophylaxe)
     %\let\jb@makeidem\@empty
   }{\relax}%
}%
% NEW 0.5f gender check for idem (necessary only for german users, I think)
\newcommand*{\jb@idem@gender@checked}{%
  \ifjb@noauthorforcitetitle\else
% NEW 0.5f Ibidem/Idem-bugfix
   \ifjb@switchidemofflocally\else
    \ifthenelse{%
        \not\equal{\jb@@gender}{}%
        \and
        \boolean{jblookforgender}%
    }{%
        \ifthenelse{\equal{\jb@@gender}{sm}}{%
           \@ifundefined{jb@morethanonecite}{\idemSmname}{\idemsmname}%
        }{%
            \ifthenelse{\equal{\jb@@gender}{pm}}{%
                \@ifundefined{jb@morethanonecite}{\idemPmname}{\idempmname}%
            }{%
                \ifthenelse{\equal{\jb@@gender}{sf}}{%
                     \@ifundefined{jb@morethanonecite}{\idemSfname}{\idemsfname}%
                }{%
                    \ifthenelse{\equal{\jb@@gender}{pf}}{%
                        \@ifundefined{jb@morethanonecite}{\idemPfname}{\idempfname}%
                    }{%
                        \ifthenelse{\equal{\jb@@gender}{sn}}{%
                            \@ifundefined{jb@morethanonecite}{\idemSnname}{\idemsnname}%
                        }{%
                            \ifthenelse{\equal{\jb@@gender}{pn}}{%
                                \@ifundefined{jb@morethanonecite}{\idemPnname}{\idempnname}%
                            }{%
                                \@ifundefined{jb@morethanonecite}{\idemSmname}{\idemsmname}%
                            }%
                        }%
                    }%
                }%
            }%
        }%
    }{%
% NEW 0.5f
       \ifthenelse{\equal{\bbl@main@language}{english}\and\boolean{jboxford}}{%
           \edfont{\idemname}%
       }{%
           \ifjbcross\edfont{\idemmidname}\else\edfont{\idemname}\fi
       }%
%       \idemname%
    }%
   \fi
  \fi
}
\newcommand*{\jb@do@idem}{%
  \@ifundefined{idem}{\@namedef{idem}{}}{\relax}%
  \ifjb@same@fullauthor
% NEW 0.5f warning about ambiguous citations inserted, if:
    \ifthenelse{%
        \equal{\jb@@mult@switch}{1}%                                    1. author wrote multiple works,
        \and\equal{\jb@@shorttitle}{}%                                   2. shorttitle is empty,
        \and\equal{\@nameuse{citefull@\jb@@newauthorcite}}{citefull}%   3. not the very first citation, and
        \and\boolean{jb@no@title@replace}%                              4. replacing shorttitle by title not possible
    }{%
          \@ifundefined{ETFII@\jb@@newauthorcite}{%        The same warning is placed somewhere else,
            \global\@namedef{ETFII@\jb@@newauthorcite}{}%  but we don't want to disturb the user with warnings.
            \jb@package@warningNoLine{\jb@pkg@name}{%
             *** `\jb@@newauthorcite' ***\on@line\MessageBreak
             is an ambiguous citation! Because you are using\MessageBreak
             `titleformat=noreplace', the title field can't\MessageBreak
             be used to replace the missing shorttitle}%
          }{\relax}%
    }{}%
    \ifjb@debug
      \textcolor[named]{WildStrawberry}{%
          \ifjb@debug@br[\fi
            \jb@idem@gender@checked%
          \ifjb@debug@br]\fi
      }%
    \else
        \jb@idem@gender@checked%
    \fi
    \let\jb@@fullname\@empty
    \let\jb@@author\@empty
%    \let\IbidemName\@empty
%    \let\IbidemMidName\@empty
    \ifthenelse{%
           \equal{\jb@@newpagecite}{\jb@@lastpagecite}%
           \TE@or % normal \or causes problems
           \equal{\jb@@newpagecite}{}%
    }{%
           \ifjb@opcit\else
           \@ifundefined{jb@morethanonecite}{%
             \ifjbidemabbrvwithperiod
% we don't suppress the period, if there are multiple works are cited and the title is printed.
                \ifthenelse{\equal{\jb@@mult@switch}{1}\TE@or\equal{\jb@@title@switch}{1}}{}{%
                   \global\jb@footnote@periodfalse
                }%
             \fi
           }{\global\jb@footnote@periodtrue}%
           \fi
    }{}%
  \fi
}
\newcommand*{\jb@test@last@author@idem}{%
   \ifjb@see
%  for humanities
     \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{}{%
       \jb@formatted@co@author%
       \let\idemname\idemmidname
       \let\jb@@newannotatorcite\@empty
     }%
     \jb@do@idem
   \else
%  for lawyers
     \ifjb@annotator@last
         \jb@do@idem
         \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{}{%
           \jbhowsepannotatorlast%
           \jb@formatted@co@author%
           \let\idemname\idemmidname
           \let\jb@@newannotatorcite\@empty
         }%
     \else
         \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{}{%
           \jb@formatted@co@author%
           \jbhowsepannotatorfirst%
           \let\idemname\idemmidname
           \let\jb@@newannotatorcite\@empty
         }%
         \jb@do@idem
     \fi
   \fi
}%
\newcommand*{\jb@makeibidem}{%
  \ifthenelse{\equal{\jb@@author}{empty}}{%
    \jb@all@titlestrue
    \let\jbhowsepannotatorlast\@empty
    \ifjb@see\else
       \let\jb@@newannotatorcite\@empty
    \fi
  \@ifundefined{MISS@##3}{%
    \global\@namedef{MISS@##3}{}%
    \jb@package@warningNoLine{\jb@pkg@name}{%
    The author of `\jb@@newauthorcite'\MessageBreak
    is missing, I assume you know what %
    you are doing}%
    }{\relax}%
  }{\relax}%
  \ifthenelse{\boolean{jb@ibidem}}{%
    \protected@edef\jb@tempcnt{\thejbbibcnt}%
    \stepcounter{jbbibcnt}%
%   labels only for cites in footnotes !
    \ifjb@fn
      \begingroup
        \label{ibidem:\thejbbibcnt}%
      \endgroup
    \fi
    \ifthenelse{\equal{\jb@@newauthorcite}{\jb@@lastauthorcite}}{%
      \@tempcnta=\jb@tempcnt
        \ifjb@ibidem@double@pagewise
         \advance\@tempcnta\@ne
        \fi
      \protected@edef\jb@idemcnta{\the\@tempcnta}%
      \ifthenelse{\boolean{jb@ibidem@pagewise}}{%
%       true for ibidem=strict[doublepage]
        \ifthenelse{%
           \(%
%           check if on facing pages
%           switch for ibidem=strictdoublepage true?
               \boolean{jb@ibidem@double@pagewise}%
             \and
               \isodd{\jb@simple@pageref@by@heiko{ibidem:\thejbbibcnt}}
             \and
               \equal{%
                  \jb@simple@pageref@by@heiko{ibidem:\jb@idemcnta}}{%
                  \jb@simple@pageref@by@heiko{ibidem:\thejbbibcnt}}%
           \)%
           \or
%            ignoring page breaks
             \equal{%
               \jb@simple@pageref@by@heiko{ibidem:\jb@tempcnt}}{%
               \jb@simple@pageref@by@heiko{ibidem:\thejbbibcnt}}%
        }{%
%         facing pages
          \jb@test@last@author@ibidem
%         no lookat for recently cited works!?
          \jb@lookatfalse
        }{%
%         not on facing pages
          \relax
        }%
      }{%
%       ibidem not pagewise (ibidem=strict[doublepage] false)
        \jb@test@last@author@ibidem
      }% jb@ibidem@pagewise end
  }{\relax}% authors equal
  }{\relax}% jb@ibidem
}%
\newcommand*{\jb@makeidem}{%
% no citation idem's for crossref \cites in bibliography, we are building
% own idem's for bibliography
 \ifjbweareinbib\else
  \ifthenelse{\boolean{jb@idem}}{%
    \protected@edef\jb@idemcnta{\theidemcnt}%
    \stepcounter{idemcnt}%
    \ifjb@fn
      \begingroup
        \label{idem:\theidemcnt}%
      \endgroup
    \fi
    \ifjb@same@fullauthor
      \@tempcnta=\jb@idemcnta
        \ifjb@idem@double@pagewise
            \advance\@tempcnta\@ne
        \fi
      \protected@edef\jb@idemcntb{\the\@tempcnta}%
      \ifthenelse{\boolean{jb@idem@pagewise}}{%
           \ifthenelse{%
                  \boolean{jb@idem@double@pagewise}%
                \and
                  \isodd{\jb@simple@pageref@by@heiko{idem:\theidemcnt}}%
                \and
                  \equal{%
                     \jb@simple@pageref@by@heiko{idem:\jb@idemcntb}}{%
                     \jb@simple@pageref@by@heiko{idem:\theidemcnt}}%
           }{%
               \jb@test@last@author@idem
           }{%
               \ifthenelse{%
                    \equal{\jb@simple@pageref@by@heiko{idem:\jb@idemcnta}}{%
                           \jb@simple@pageref@by@heiko{idem:\theidemcnt}}%
               }{%
                    \jb@test@last@author@idem
               }{}%
           }%
      }{%
           \jb@test@last@author@idem
      }%
    \fi
  }{}%
 \fi
}%
\newcommand{\jb@make@ibidem@name@title}{%
   \jb@relaxforemptyauthor
   \ifthenelse{\equal{\jb@@shorttitle}{}}{%
      \ifjb@no@title@replace\else
% CH 0.6 print title only, if author is cited with at least two works
       \ifthenelse{\equal{\jb@@mult@switch}{1}}{%
         \jbhowsepbeforetitle\jbfulltitlefont{\jb@@title}%
       }{}%
      \fi%
   }{%
% CH 0.6 print title only, if author is cited with at least two works
      \ifthenelse{\equal{\jb@@mult@switch}{1}}{%
         \jbhowsepbeforetitle\jbshorttitlefont{\jb@@shorttitle}%
      }{}%
      \@ifundefined{TITLE@##3}{\global\@namedef{TITLE@##3}{used}}{}%
   }%
  \ifjb@author@year\ifjb@yearaftertitle\jb@formatted@year\fi\fi
}%
\newcommand*{\jb@makecheckednameibidem}{%
 \ifjb@fullcite@again\else
  \ifjb@ibidem@with@name
   \jb@allow@adding@of@pagerangefalse
   \ifthenelse{\equal{\jb@@author}{empty}}{%
    \jb@second@extra@spacefalse}{\relax}%
   \ifjb@debug@br[\fi
   \jb@formatted@co@author@in%
   \ifjb@ibidem@with@short@name
    \ifthenelse{\equal{\jb@@author}{empty}}{%
      \jbauthorfont{\jb@@fullname}%
    }{%
      \jbauthorfont{\jb@@author}%
    }%
   \else
     \jb@@fullname%
   \fi
   \ifjb@author@year\ifjb@yearafterauthor\jb@formatted@year\fi\fi
   \ifthenelse{\equal{\jb@@mult@switch}{1}}{%
    \@ifundefined{MULT@##3}{%
      \global\@namedef{MULT@##3}{}%
      \ifjb@ibidem@with@name@and@title\else
       \ifjb@ibidem@with@name@and@title@auto\else
        \jb@package@warningNoLine{\jb@pkg@name}{%
        The author of `\jb@@newauthorcite'\MessageBreak
        is cited with more than one work, I'm switching\MessageBreak
        to `ibidem=name&title&auto' to avoid\MessageBreak
        ambiguous citations}%
        \global\jb@ibidem@with@name@and@title@autotrue
      \fi\fi
    }{\relax}%
   }{\relax}%
   \ifjb@ibidem@with@name@and@title
        \jb@make@ibidem@name@title%
   \else
      \ifjb@ibidem@with@name@and@title@auto
         \ifjb@same@author@different@work
              \jb@make@ibidem@name@title
         \fi
      \fi
   \fi
     \ifthenelse{\equal{\jb@@title}{}}{%
       \ifthenelse{\equal{\jb@@shorttitle}{}}{%
            \IbidemName%
        }{,\space\IbidemMidName}%
     }{,\space\IbidemMidName}%
   \ifthenelse{%
        \equal{\jb@@newpagecite}{\jb@@lastpagecite}%
        \TE@or % normal \or causes problems
        \equal{\jb@@newpagecite}{}%
   }{%
% NEW 0.6 remove pages (for options ibidem=name*) [RS] 
        \global\let\jb@@newpagecite\@empty
        \ifjb@opcit\else
           \global\jb@footnote@periodfalse
        \fi
   }{}%
   \jb@relaxcommandsforfullcite
   \ifjb@debug@br]\fi
  \fi
 \fi
}%
\newcommand*{\jb@dofullcite}{%
 \ifjb@debug
   \textcolor[named]{Red}{%
   \ifjb@debug@br[\fi
    \jb@formatted@co@author@in\jb@use@fullcite%
   \ifjb@debug@br]\fi}%
 \else
   \jb@formatted@co@author@in\jb@use@fullcite%
 \fi%
 \jb@relaxcommandsforfullcite
 \let\jb@extraspace\@empty
% CHECK WHY!
% \global\jb@fullcite@againfalse %%!!!
 \jb@allow@lookat@for@fullcitefalse
}%
\newcommand*{\jb@makeagainfullcite}{%
 \ifjb@fullcite@again
   \jb@allow@adding@of@pagerangefalse
   \ifthenelse{%
    \equal{\@nameuse{\jb@@newauthorcite}}{allnextshort}}{%
      \relax
   }{%
    \jb@dofullcite%
   }%
 \else
  \ifthenelse{%
    \equal{\@nameuse{\jb@@newauthorcite}}{allnextfull}}{%
    \jb@dofullcite%
  }{%
    \relax
  }%
 \fi
}%
\newcommand*{\jb@relaxforemptyauthor}{%
  \ifthenelse{\equal{\jb@@author}{empty}}{%
    \let\jb@@author\@empty
    \let\jbhowsepbeforetitle\relax
    \let\jb@extraspace\@empty
    }{\relax}%
}%
\newcommand*{\jb@warningfootciteusage}{%
  \ifjb@cite@no@title
   \ifthenelse{%
        \equal{\jb@@mult@switch}{1}%
        \and
% NEW 0.5f superfluous warning about ambiguous citation while using `authorformat=year'
% bug reported by Anneke Emse (<emse@uni-koeln.de>)
        \not\boolean{jb@author@year}%
   }{%
       \jb@package@warning{\jb@pkg@name}{%
       *** `\jb@@newauthorcite' ***\MessageBreak
       is an ambiguous citation! Beware of\MessageBreak
       using \string\[foot]cite*}%
   }{\relax}%
  \fi
}%
\newcommand*{\jb@checktitlefields}{%
 \ifthenelse{\equal{\jb@@mult@switch}{1}}{%
   \ifthenelse{\equal{\jb@@shorttitle}{}\and\not\boolean{jb@author@year}}{%
     \ifthenelse{\equal{\jb@@title}{}}{%
       \let\jb@extraspace\@empty
       \@ifundefined{ETF@\jb@@newauthorcite}{%
         \global\@namedef{ETF@\jb@@newauthorcite}{}%
         \jb@package@warning{\jb@pkg@name}{%
           *** `\jb@@newauthorcite' ***\MessageBreak
           is an ambiguous citation! The `shorttitle'\MessageBreak
           can't be used. I tried to substitute with\MessageBreak
           `title' field - without success, please check the\MessageBreak
           citation}{\relax}%
       }{\relax}%
     }{%
       \ifthenelse{%
          \equal{\@nameuse{citefull@\jb@@newauthorcite}}{citefull}%
            \or
          \boolean{jbcross}%
       }{%
          \ifjbweareinbib\else
           \ifjb@no@title@replace
            \@ifundefined{ETFII@\jb@@newauthorcite}{%
              \global\@namedef{ETFII@\jb@@newauthorcite}{}%
              \jb@package@warningNoLine{\jb@pkg@name}{%
               *** `\jb@@newauthorcite' ***\on@line\MessageBreak
               is an ambiguous citation! Because you are using\MessageBreak
               `titleformat=noreplace', the title field can't\MessageBreak
               be used to replace the missing shorttitle}%
            }{\relax}%
         \fi\fi
       }{\relax}%
     }%
   }{\relax}%
 }{%
     \@ifundefined{jb@fm@\@citeb}{}{%
         \ifthenelse{\equal{\jb@@mult@switch}{0}%
                     \and\not\boolean{jbweareinbib}%
                     \and\boolean{jb@no@title@replace}%
         }{%
              \@ifundefined{ETFII@\jb@@newauthorcite}{%
                \global\@namedef{ETFII@\jb@@newauthorcite}{}%
                \jb@package@warningNoLine{\jb@pkg@name}{%
                 *** `\jb@@newauthorcite' ***\on@line\MessageBreak
                 is an ambiguous citation! Because you are using\MessageBreak
                 `titleformat=noreplace', the title field can't\MessageBreak
                 be used to replace the missing shorttitle}%
              }{\relax}%
         }{\relax}%
     }%
 }%
}%
\newcommand*{\jb@maketitlewishestrue}{%
  \ifjb@all@titles\def\jb@@title@switch{1}\fi
  \ifjb@cite@title\def\jb@@title@switch{1}\fi
  \ifjb@cite@no@title\def\jb@@title@switch{0}\fi
}%
\newcommand*{\jb@makeannotatorlastwithtitle}{%
 \ifjb@noauthorforcitetitle\else
  \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{%
   \jb@make@author@emph%
   \jb@formatted@author%
   \jb@checked@edition%
  }{%
   \jb@formatted@author%
   \ifjb@ssed@after@author\jb@checked@edition\fi
   \jb@make@annotator@emph%
   \jbhowsepannotatorlast%
   \jb@formatted@co@author%
   \ifjb@ssed@after@author\else\jb@checked@edition\fi
  }%
 \fi
 \ifthenelse{%
    \equal{\@nameuse{\jb@@newauthorcite}}{allnextnotitle}}{%
 }{%
    \jb@checked@title%
 }%
}%
\newcommand*{\jb@makeannotatorfirstwithtitle}{%
 \ifjb@noauthorforcitetitle\ifjb@see\jb@formatted@co@author@see\fi\else
  \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{%
   \jb@make@author@emph%
   \jb@formatted@author%
   \jb@checked@edition%
  }{%
   \jb@make@annotator@emph%
   \jb@formatted@co@author%
   \jbhowsepannotatorfirst%
   \jb@formatted@author%
   \jb@checked@edition%
  }%
 \fi
 \ifthenelse{%
    \equal{\@nameuse{\jb@@newauthorcite}}{allnextnotitle}}{%
 }{%
    \jb@checked@title%
 }%
}%
\newcommand*{\jb@makeannotatorlastwithouttitle}{%
 \ifjb@noauthorforcitetitle\else
  \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{%
   \jb@make@author@emph%
   \jb@formatted@author%
   \jb@checked@edition%
  }{%
   \jb@formatted@author%
   \ifjb@ssed@after@author\jb@checked@edition\fi
   \jb@make@annotator@emph%
   \jbhowsepannotatorlast%
   \jb@formatted@co@author%
   \ifjb@ssed@after@author\else\jb@checked@edition\fi
  }%
 \fi
}%
\newcommand*{\jb@makeannotatorfirstwithouttitle}{%
 \ifjb@noauthorforcitetitle\else
  \ifthenelse{\equal{\jb@@newannotatorcite}{\@empty}}{%
   \jb@make@author@emph%
   \jb@formatted@author%
   \jb@checked@edition%
  }{%
   \jb@make@annotator@emph%
   \jb@formatted@co@author%
   \jbhowsepannotatorfirst%
   \jb@formatted@author%
   \jb@checked@edition%
  }%
 \fi
}%
\newcommand*{\jb@makecheckedcite}{%
% NEW 0.6 hook for citing the howcited field for non-first citations added
  \ifthenelse{\not\equal{\jb@@howcited}{}\and\boolean{jbusehowcitedforcite}}{%
     \ifjb@first@cite\else\jb@@howcited\fi
  }{%
% NEW 0.6 archival support added
     \ifthenelse{\equal{\jb@@type}{archival}}{%
       \jb@@title%
     }{%
        \ifthenelse{%
           \equal{\jb@@mult@switch}{1}%
           \or\equal{\jb@@title@switch}{1}%
           \and\not\boolean{jb@starred@cite}%
        }{%
           \ifjb@annotator@last
               \jb@makeannotatorlastwithtitle
           \else
               \jb@makeannotatorfirstwithtitle
           \fi
        }{%
           \ifjb@annotator@last
               \jb@makeannotatorlastwithouttitle
           \else
               \jb@makeannotatorfirstwithouttitle
           \fi
        }%
        \jb@aftertitleedition%
        \ifjb@yearaftertitle\jbyear\fi
     }%
  }%
}%
\newcommand*{\jb@ssed@size}{\tiny}%
\newlength{\jb@length@i}  \settowidth{\jb@length@i}  {\jb@ssed@size 1}%
\newlength{\jb@length@ii} \settowidth{\jb@length@ii} {\jb@ssed@size 11}%
\newlength{\jb@length@iii}\settowidth{\jb@length@iii}{\jb@ssed@size 111}%
\newcommand*{\jb@kern@before@sepi}  {\hspace{-\jb@length@i}}%
\newcommand*{\jb@kern@after@sepi}   {\hspace{\jb@length@i}}%
\newcommand*{\jb@kern@before@sepii} {\hspace{-\jb@length@ii}}%
\newcommand*{\jb@kern@after@sepii}  {\hspace{\jb@length@ii}}%
\newcommand*{\jb@kern@before@sepiii}{\hspace{-\jb@length@iii}}%
\newcommand*{\jb@kern@after@sepiii} {\hspace{\jb@length@iii}}%
\newcommand*{\jb@kern@sep}{}%
\newcommand*{\jb@extract@starting@page}[1]{%
    \protected@edef\sp@tempa{#1}%
    \expandafter\jb@@extract@starting@page\sp@tempa-\end%
}
\newcommand\jb@@start@page@switch{0}%
\newcommand*{\jb@@extract@starting@page}{}% make sure it's undefined
\def\jb@@extract@starting@page#1-#2\end{%
   \def\jb@@start@page{#1}%
}%
\def\sndecmd{}%
\DeclareRobustCommand*{\nopage}{}
\newcommand*{\pageadd}[1]{{\space{}#1}}
\newcommand*{\jbprformat}[1]{%
 \ifjb@formatted@pages
    \if\nopage#1\else
        \jb@parse@page{#1}%
    \fi
 \else
    #1%
 \fi
}%
\newcommand{\jbpagesnamesep}{\,}%
\newcommand{\bibpagesnamesep}{\,}%
\newcommand{\jbPageName}{\jbpagename\jbpagesnamesep}%
\newcommand{\jbPagesName}{\jbpagesname\jbpagesnamesep}%
\newcommand{\bibPageName}{\bibpagename\bibpagesnamesep}%
\newcommand{\bibPagesName}{\bibpagesname\bibpagesnamesep}%
\newcommand*{\jb@parse@page}[1]{%
  \ifthenelse{\equal{\jbpagename}{}\and\equal{\jbpagesname}{}}{\def\jbpagesnamesep{}}{}%
  \ifthenelse{\equal{\bibpagename}{}\and\equal{\bibpagesname}{}}{\def\bibpagesnamesep{}}{}%
    \jb@if@contains@ff{#1}{%
        \ifjbweareinbib
            \bibPagesName#1%
        \else
            \jbPagesName#1%
        \fi
    }{%
        \jb@if@contains@f{#1}{%
            \ifjbweareinbib
                \bibPagesName#1%
            \else
                \jbPagesName#1%
            \fi
        }{%
            \jb@if@contains@endash{#1}{%
                \ifjbweareinbib
                    \bibPagesName#1%
                \else
                    \jbPagesName#1%
                \fi
            }{%
                \jb@if@contains@multiple{#1}{%
                    \ifjbweareinbib
                        \bibPagesName#1%
                    \else
                        \jbPagesName#1%
                    \fi
                }{%
                    \ifjbweareinbib
                        \bibPageName#1%
                    \else
                        \jbPageName#1%
                    \fi
                }%
            }%
        }%
    }%
}%
\newcommand*{\jb@if@contains@multiple}[1]{%
    \protected@edef\@tempa{#1}%
    \expandafter\expandafter\expandafter\jb@@if@contains@multiple
    \expandafter\@tempa\space\@nil
}
\newcommand*{\jb@if@contains@endash}[1]{%
    \protected@edef\@tempa{#1}%
    \expandafter\jb@@if@contains@endash\@tempa--\@nil}%
\newcommand*{\jb@if@contains@ff}[1]{%
    \protected@edef\@tempa{#1}%
    \expandafter\jb@@if@contains@ff\@tempa ff\@nil}%
\newcommand*{\jb@if@contains@f}[1]{%
    \protected@edef\@tempa{#1}%
    \expandafter\jb@@if@contains@f\@tempa f\@nil}%
\newcommand*{\jb@@if@contains@multiple}{}
\def\jb@@if@contains@multiple#1 #2\@nil{%
% \jb@typeout{args of multiple: |#1|#2|}%
    \ifx\\#2\\% is #2 empty?
% \jb@typeout{no and}%
        \expandafter\@secondoftwo
    \else
% \jb@typeout{and found}%
        \expandafter\@firstoftwo
    \fi
}%
\newcommand*{\jb@@if@contains@endash}{}
\def\jb@@if@contains@endash#1--#2\@nil{%
% \jb@typeout{args of endash: |#1|#2|}%
    \ifx\\#2\\% is #2 empty?
% \jb@typeout{no --}%
        \expandafter\@secondoftwo
    \else
% \jb@typeout{-- found}%
        \expandafter\@firstoftwo
    \fi
}%
\newcommand*{\jb@@if@contains@f}{}
\def\jb@@if@contains@f#1f#2\@nil{%
% \jb@typeout{args of f: |#1|#2|}%
    \ifx\\#2\\% is #2 empty?
% \jb@typeout{no f}%
        \expandafter\@secondoftwo
    \else
% \jb@typeout{f found}%
        \expandafter\@firstoftwo
    \fi
}%
\newcommand*{\jb@@if@contains@ff}{}
\def\jb@@if@contains@ff#1ff#2\@nil{%
% \jb@typeout{args of ff: |#1|#2|}%
    \ifx\\#2\\% is #2 empty?
% \jb@typeout{no ff}%
        \let\sndecmd\@secondoftwo
% \ecmd changed to \sndecmd, \ecmd already used, causes errors
    \else
        \def\@tempa{ff}%
        \def\@tempb{#2}%
        \ifx\@tempa\@tempb
% \jb@typeout{ff found}%
            \let\sndecmd\@firstoftwo
        \else
% \jb@typeout{no ff}%
            \let\sndecmd\@secondoftwo
        \fi
    \fi
    \sndecmd
}%
\newcommand*{\jbpagesformat}[1]{#1}%
\newcommand*{\jbafterstartpagesep}{,}%
% NEW 0.51o now five args, one new optional for configurable separation before startpage
\newcommand*{\formatpages}{\@ifnextchar[{\jb@formatpages}{\jb@formatpages[]}}%
\def\jb@formatpages[#1]{\@ifnextchar[{\jb@@formatpages[#1]}{\jb@@formatpages[#1][]}}%
\def\jb@@formatpages[#1][#2]#3#4#5{%
  \def\jb@afterstartpagesep{#1}%
  \def\jb@beforestartpagesep{#2}%
  \def\jb@start@page@for@types{#3}%
  \def\jb@normalpageldelim{#4}%
  \def\jb@normalpagerdelim{#5}%
  \ifthenelse{\equal{#1}{}\and\equal{#2}{}%
% startpage will be recognized only, when at least one opt. arg is used
  }{%
    \renewcommand*{\jbpagesformat}[1]{%
        \jb@normalpageldelim##1\jb@normalpagerdelim}%
  }{\jb@start@pagetrue}%
}%
\newcommand*{\formatarticlepages}[3][]{\formatpages[#1]{article}{#2}{#3}}%
\newcommand*{\jb@do@ssed@kerning}{%
  \ifjb@ssed@after@author\else
    \ifthenelse{\equal{\jb@@edition}{}}{}{%
      \ifthenelse{\jb@@edition>9}{%
          \ifthenelse{\jb@@edition>99}{%
            \ifjb@comma@before@rest\,\,\,\,\,\,\else\kern\jbedwidth\fi
          }{%
            \ifjb@comma@before@rest\,\,\,\,\else\kern\jbedwidth\fi
          }%
      }{%
        \ifjb@comma@before@rest\,\,\else\kern\jbedwidth\fi
      }%
    }%
  \fi
}%
\newcommand\herename{}
\newcommand*{\jbfirstcitepageranges}{\jb@allow@adding@of@pagerange@for@first@citetrue}
\newcommand*{\jb@add@something@before@page}{%
   \ifthenelse{%
        \boolean{jb@allow@adding@of@pagerange@for@first@cite}%
        \and
        \not\equal{\jb@@pages}{}%
        \and
        \(
            \boolean{jb@first@cite}%
            \or
            \boolean{jb@fullcite@again}%
        \)
   }{%
        \herename%
   }{}%
}%
\newcommand*{\jb@before@page@sep}{%
    \unskip\jb@kern@sep\space%
    \ifjb@ssed@recent@kerned
       \jb@do@ssed@kerning%
    \fi
    \jb@add@something@before@page%
}%
\newcommand*{\jb@formatted@start@page}{%
   \ifthenelse{%
     \not\equal{\jb@@start@page}{}%
     \and
     \boolean{jb@allow@adding@of@pagerange}%
     \and
     \(%
        \boolean{jb@start@page}%
        \and
        \equal{\jb@start@page@for@types@arg}{1}%
     \)%
     \and\not\boolean{jb@switchidemofflocally}%
   }{%
     \ifthenelse{\equal{\jb@beforestartpagesep}{}}{}{%
        \renewcommand*{\jbbeforestartpagesep}{\jb@beforestartpagesep}}%
     \renewcommand*{\jbafterstartpagesep}{\jb@afterstartpagesep}%
     \renewcommand*{\jbpagesformat}[1]{%
            \jb@normalpageldelim##1\jb@normalpagerdelim}%
     \jb@allow@adding@of@pagerangefalse
     \jbbeforestartpagesep%
     \jbprformat{\jb@@start@page}%
     \ifthenelse{\equal{\jb@@newpagecite}{}}{}{%
        \let\jb@before@page@sep\@empty
        \jbafterstartpagesep%
     }%
   }{}%
}
\newcommand*{\jb@@formatted@pages}{%
  \ifthenelse{\equal{\jb@@pages}{}}{%
      \ifthenelse{\equal{\jb@@newpagecite}{}}{}{%
         \jb@before@page@sep%
         \jbpagesformat{\jb@@newpagecite}%
      }%
  }{%
      \jb@formatted@start@page%
      \ifjb@always@pageranges
        \ifjb@first@cite
            \ifjb@allow@adding@of@pagerange
               \jb@before@page@sep%
               \jbprformat{\jb@@pages}%
            \fi
        \fi
        \ifthenelse{\equal{\jb@@newpagecite}{}}{}{%
           \jb@before@page@sep%
           \jbpagesformat{\jb@@newpagecite}%
        }%
      \else
         \ifjb@tested@pageranges
            \ifthenelse{\equal{\jb@@newpagecite}{}}{%
                \ifjb@allow@adding@of@pagerange
                  \ifthenelse{\not\equal{\diffpageibidemname}{\samepageibidemname}%
                              \TE@or
                              \not\equal{\diffpageibidemmidname}{\samepageibidemmidname}%
                  }{%
                     \jb@package@warning{\jb@pkg@name}{%
                     You have redefined one ore more ibidem macros\MessageBreak
                     while using `pages=test'. Please note it is\MessageBreak
                     possible that you did not get the desired\MessageBreak
                     results}%
                  }{}%
                     \jb@before@page@sep%
                     \jbprformat{\jb@@pages}%
                \fi
            }{%
               \jb@before@page@sep%
               \jbpagesformat{\jb@@newpagecite}%
            }%
         \else
             \ifthenelse{\equal{\jb@@newpagecite}{}}{}{%
                \jb@before@page@sep%
                \jbpagesformat{\jb@@newpagecite}%
             }%
         \fi
      \fi
  }%
}%
\newcommand*{\jb@checked@kerning}{%
    \jb@@formatted@pages\unskip%
}%
\newcommand*{\jbpagesep}{,}%
\newcommand*{\jb@makecheckedpages}{%
 \ifthenelse{\equal{\jb@@newpagecite}{\@empty}}{%
    \ifjb@suppress@dot@for@howcited\else
     \ifjbcross\else
      \ifjb@allow@dot@for@lookat
          \ifthenelse{\boolean{jb@comma@before@rest}}{%
             \ifthenelse{%
                   \(
                     \not\equal{\jb@@pages}{}%
                     \and
                     \(
                         \boolean{jb@always@pageranges}%
                         \or
                         \boolean{jb@tested@pageranges}%
                     \)
                   \)
                   \or
                   \(
                       \not\equal{\jb@@start@page}{}%
                       \and
                       \boolean{jb@allow@adding@of@pagerange}%
                       \and
                       \boolean{jb@start@page}%
                       \and
                       \equal{\jb@@type}{article}%
                   \)
             }{%
               \renewcommand*{\jb@kern@sep}{\jbpagesep}%
             }{%
               \renewcommand*{\jb@kern@sep}{}%
             }%
             \jb@checked@kerning%
          }{%
             \renewcommand*{\jb@kern@sep}{}%
             \jb@checked@kerning%
          }%
      \fi
     \fi
    \fi
 }{%
  \ifjb@period
      \ifjb@comma@before@rest
        \renewcommand*{\jb@kern@sep}{\jbpagesep}%
        \jb@checked@kerning%
      \else
        \renewcommand*{\jb@kern@sep}{}%
        \jb@checked@kerning%
      \fi
  \else
      \ifjb@comma@before@rest
        \renewcommand*{\jb@kern@sep}{\jbpagesep}%
        \jb@checked@kerning%
      \else
        \renewcommand*{\jb@kern@sep}{}%
        \jb@checked@kerning%
      \fi
  \fi
 }%
}%
\newcommand*{\jb@list}{}
\newcommand*{\jb@opcit@list}{}
\newcommand*{\jb@elt}{}
\let\jb@elt\relax
\newtoks\jb@temptoks
\newcommand*{\jb@@append}[2]{%
%   take care that list doesn't start with empty elem
    \ifthenelse{\equal{#2}{}}{%
        \protected@xdef#2{#1}%
    }{%
        \jb@temptoks=\expandafter{#2}%
        \protected@xdef#2{\the\jb@temptoks,#1}%
    }%
}%
\newcommand*{\jb@append}[2]{%
%    \jb@typeout{add elem |#1| to list |#2|?}%
    \jb@if@elem{#1}{#2}{%
%        \jb@typeout{ --- yes, not adding}%
    }{%
%        \jb@typeout{ --- no, added}%
        \jb@@append{#1}{#2}%
    }%
}%
\newcommand*{\jb@list@tempa}{}
\newcommand*{\jb@list@tempb}{}
\newcommand*{\jb@test@cmd}{}
\newcommand*{\jb@if@elem}[2]{%
%    \jb@typeout{testing if |#1| is elem of |#2|}%
    \protected@edef\jb@list@tempa{#1}%
    \let\jb@test@cmd\@secondoftwo
    \@for\jb@list@tempb:=#2\do{%
        \ifx\jb@list@tempa\jb@list@tempb
             \let\jb@test@cmd\@firstoftwo
        \fi
    }%
    \jb@test@cmd
}%
\newcommand*{\jb@undefineall}[2]{%
 \ifthenelse{\equal{#2}{opcit}}{%
    \ifthenelse{\equal{\jb@reset@opcit@for}{chapter}}{%
           \@ifundefined{resetopcit\thechapter}{%
                \global\@namedef{resetopcit\thechapter}{}%
                \jb@typeout{Package jurabib Info: Resetting `#2'
                     for Chapter \thechapter}%
                \@for\jb@list@tempa:=#1\do{%
                    \expandafter\gdef\csname\jb@list@tempa\endcsname{}%
                }%
           }{\relax}%
    }{%
           \@ifundefined{resetcf\thesection}{%
                \global\@namedef{resetcf\thesection}{}%
                \jb@typeout{Package jurabib Info: Resetting `#2'
                     for Section \thesection}%
                \@for\jb@list@tempa:=#1\do{%
                    \expandafter\gdef\csname\jb@list@tempa\endcsname{}%
                }%
           }{\relax}%
    }%
 }{%
    \ifthenelse{\equal{\jb@resetfor}{chapter}}{%
           \@ifundefined{resetcitefull\thechapter}{%
                \global\@namedef{resetcitefull\thechapter}{}%
                \jb@typeout{Package jurabib Info: Resetting `#2'
                     for Chapter \thechapter}%
                \@for\jb@list@tempa:=#1\do{%
                    \expandafter\gdef\csname\jb@list@tempa\endcsname{}%
                }%
           }{\relax}%
    }{%
           \@ifundefined{resetcitefull\thesection}{%
                \global\@namedef{resetcitefull\thesection}{}%
                \jb@typeout{Package jurabib Info: Resetting `#2'
                     for Section \thesection}%
                \@for\jb@list@tempa:=#1\do{%
                    \expandafter\gdef\csname\jb@list@tempa\endcsname{}%
                }%
           }{\relax}%
    }%
 }%
}%
\newcommand*{\jb@showelems}[1]{%
%    \jb@typeout{show elems of list #1:}%
 \@for\jb@list@tempa:=#1\do{%
   \jb@typeout{\jb@list@tempa:
     \expandafter\meaning\csname\jb@list@tempa\endcsname}%
 }%
}%
\newcommand*{\jb@firstcitefull}{%
% NEW 0.6 \nextcite-commands should work for `citefull=first' too, reported by Frank Mittelbach
 \ifthenelse{\equal{\@nameuse{\jb@@newauthorcite}}{allnextshort}\or
             \equal{\@nameuse{\jb@@newauthorcite}}{allnextnotitle}%
 }{}{%
  \@ifundefined{jb@resetfor}{}{%
   \ifthenelse{%
     \(
        \equal{\jb@resetfor}{chapter}%
        \or
        \equal{\jb@resetfor}{section}%
     \)
     \and\value{citefull}=0%
   }{%
     \jb@undefineall{\jb@list}{citefull=first}%
   }{}%
  }%
  \ifthenelse{%
              \not\boolean{jbweareinbib}%
              \and%
              \boolean{jb@firstcite@full}%
              \and%
              \equal{\jb@@cite@fullfirst@switch}{1}%
              \and\not\boolean{jb@all@full}%
              \and\not\boolean{jb@no@lookat@for@bib}%
% NEW 0.6
              \and\not\equal{\jb@@type}{archival}%
  }{%
     \ifthenelse{\equal{\@nameuse{citefull@\jb@@newauthorcite}}{citefull}}{%
       \let\jb@extraspace\@empty
       \@ifundefined{jb@morethanonecite}{%
         \jb@makecheckednameibidem%
       }{\relax}%
       \ifjb@ibidem@with@name@and@title\else
         \@ifundefined{ibidem}{\let\jb@extraspace\space}{}%
       \fi
     }{% the first cite
       \jb@first@citetrue
       \ifthenelse{\not\equal{\jb@start@page@for@types@arg}{1}}{%
         \jb@allow@adding@of@pagerangefalse
       }{}%
       \global\@namedef{citefull@\jb@@newauthorcite}{citefull}%
       \global\@namedef{NORMCR@\jb@@newauthorcite}{}%
       \global\@namedef{ARTCR@\jb@@newauthorcite}{}%
       \global\@namedef{INCCR@\jb@@newauthorcite}{}%
       \jb@append{citefull@\jb@@newauthorcite}{\jb@list}%
       \jbonlyforfirstcitefullbegin%
       \let\jb@extraspace\@empty
       \ifjb@lookat
        \ifjb@allow@lookat@for@fullcite
         \begingroup
          \label{look@\@citeb:\jb@reset@look@label@for}%
          \hyper@jbanchorstart{look@\@citeb:\jb@reset@look@label@for}\hyper@jbanchorend%
         \endgroup
         \@namedef{look@\jb@@newauthorcite}{firsttime}%
        \fi
       \fi
       \ifjb@debug
         \textcolor[named]{Blue}{%
          \ifjb@debug@br[\fi
            \jb@formatted@co@author@in\jb@use@fullcite%
          \ifjb@debug@br]\fi}%
       \else
         \jb@formatted@co@author@in\jb@use@fullcite%
       \fi
       \jbonlyforfirstcitefullend%
       \let\jb@makeagainfullcite\@empty
       \let\OpCit\@empty
       \jb@relaxcommandsforfullcite
     }%
  }{%
     \jb@allow@lookat@for@fullcitefalse
  }%
 }%
}%
\newcommand*{\jb@ssed@format}{%
  \ifthenelse{\equal{\jb@@edition}{}}{}{%
   \textsuperscript{\jb@ssed@size\jb@@edition}}}%
\newcommand*{\jb@ssed@notitle@format}{%
  \ifthenelse{\equal{\jb@@edition}{}}{}{%
   \textsuperscript{\jb@ssed@size\jb@@edition}%
  }%
}%
\newcommand{\jb@@samework@edition@differs}{}%
\newlength{\jbedwidth}
\newcommand*{\jb@make@superscript@edition}{%
 \ifthenelse{\equal{\jb@@edition}{\@empty}}{}{%
 \ifjb@ssed@all
  \renewcommand*{\jb@checked@edition}{%
    \ifthenelse{\equal{\jb@@mult@switch}{1}\TE@or\equal{\jb@@title@switch}{1}}{%
        \ifthenelse{%
            \equal{\jb@@samework@edition@differs}{1}%
        }{%
            \let\jb@checked@title\@empty
            \jb@ssed@format%
            \settowidth{\jbedwidth}{\jb@ssed@format}%
            \ifjb@ssed@kerning@wanted\ifjb@ssed@after@author\else
                \kern-\jbedwidth\jb@ssed@recent@kernedtrue\fi
            \fi
        }{%
            \renewcommand*{\jb@aftertitleedition}{\jb@ssed@format}%
        }%
    }{%
        \jb@ssed@notitle@format%
    }%
 }%
 \else
   \ifjb@ssed@commented
    \renewcommand*{\jb@checked@edition}{%
      \ifthenelse{\equal{\jb@@type}{commented}}{%
          \ifthenelse{\equal{\jb@@mult@switch}{1}\TE@or\equal{\jb@@title@switch}{1}}{%
              \ifthenelse{%
                  \equal{\jb@@samework@edition@differs}{1}%
              }{%
                  \let\jb@checked@title\@empty
                  \jb@ssed@format%
                  \settowidth{\jbedwidth}{\jb@ssed@format}%
                  \ifjb@ssed@kerning@wanted\ifjb@ssed@after@author\else
                    \kern-\jbedwidth\jb@ssed@recent@kernedtrue\fi
                  \fi
              }{%
                  \renewcommand*{\jb@aftertitleedition}{\jb@ssed@format}%
              }%
          }{%
              \jb@ssed@notitle@format%
          }%
      }{}%
    }%
   \else
     \ifjb@ssed@sw
       \ifthenelse{\equal{\jb@@edition@switch}{1}}{%
            \renewcommand*{\jb@checked@edition}{%
               \ifthenelse{\equal{\jb@@mult@switch}{1}\TE@or\equal{\jb@@title@switch}{1}}{%
                    \ifthenelse{%
                        \equal{\jb@@samework@edition@differs}{1}%
                    }{%
                        \let\jb@checked@title\@empty
                        \jb@ssed@format%
                        \settowidth{\jbedwidth}{\jb@ssed@format}%
                        \ifjb@ssed@kerning@wanted\ifjb@ssed@after@author\else
                            \kern-\jbedwidth\jb@ssed@recent@kernedtrue\fi
                        \fi
                    }{%
                        \renewcommand*{\jb@aftertitleedition}{\jb@ssed@format}%
                    }%
               }{%
                    \jb@ssed@notitle@format%
               }%
            }%
       }{}%
     \else
       \ifjb@ssed@mult@works
           \renewcommand\jb@checked@edition{%
               \ifthenelse{%
                   \boolean{jb@ssed@mult@works}%
                   \and
                   \equal{\jb@@samework@edition@differs}{1}%
               }{%
                   \let\jb@checked@title\@empty
                   \jb@ssed@format%
                   \settowidth{\jbedwidth}{\jb@ssed@format}%
                   \ifjb@ssed@kerning@wanted\ifjb@ssed@after@author\else
                       \kern-\jbedwidth\jb@ssed@recent@kernedtrue\fi
                   \fi
               }{}%
           }%
       \fi
     \fi
   \fi
 \fi
 }%
}%
\newtoks\jb@ta\newtoks\jb@tb
\newcommand\jbauthorinfo{%
  \begingroup\@sanitize % needed to deactivate \" etc.
  \jb@deactivate@babel
  \catcode`\ =10        % but treat spaces as usual (gobble between arguments)
  \jb@define@verbatim@
}
\newcommand\jb@define@verbatim@[2]{%
  \def\jb@curr@key{#2}\def\jb@list{}\jb@do@authorinfo#1\jb@end\endgroup}
\newcommand\jb@curr@cite{}
\newcommand\jb@last@cite{}
\newcommand\jb@citeasedn[1]{\global\@namedef{jb@#1}{}}
\newcommand\jb@check@edn[1]{%
  \@ifundefined{jb@#1}{%
%        \typeout{work differs}%
        \def\jb@@samework@edition@differs{0}%
  }{%
%        \typeout{only EDN differs}%
        \def\jb@@samework@edition@differs{1}%
  }%
}
\def\jb@do@authorinfo#1#2\jb@end{%
  \ifthenelse{\equal{#2}{}}{%
%    \typeout{at end of list: |#1|}%
    \jb@ta=\expandafter{\jb@list}%
    \jb@tb=\expandafter{#1}%
    \@ifundefined{\the\jb@ta\the\jb@tb}{%
%        \typeout{this is new:^^J|\the\jb@ta\the\jb@tb|}%
    }{%
%        \typeout{this is not new:^^J|\the\jb@ta\the\jb@tb|}%
%        \typeout{saving1: |\expandafter\meaning\csname\the\jb@ta\the\jb@tb\endcsname|}%
%        \typeout{saving2: |\meaning\jb@curr@key|}%
        \protected@write\@auxout{}{%
            % save previous label, and current label:
            \string\csname\space jb@citeasedn\string\endcsname{\@nameuse{\the\jb@ta\the\jb@tb}}^^J%
            \string\csname\space jb@citeasedn\string\endcsname{\jb@curr@key}%
        }%
    }%
%    \typeout{===remembering: \jb@curr@key}%
    \expandafter\global\expandafter\@namedef\expandafter{\the\jb@ta\the\jb@tb\expandafter}\expandafter{\jb@curr@key}%
  }{%
%    \typeout{list item: |#1|}%
    \jb@ta=\expandafter{\jb@list}%
    \jb@tb=\expandafter{#1}%
    \protected@edef\jb@list{\the\jb@ta\the\jb@tb}%
%    \typeout{list: \meaning\jb@list}%
    \jb@do@authorinfo#2\jb@end
  }%
}
\newcommand\jb@@last@@author{}
\newcommand\jb@@new@@author{}\newcommand*{\footciteyear}{\begingroup\jb@deactivate@babel\@ifnextchar[{\jb@footciteyear}{\jb@footciteyear[]}}%
\def\jb@footciteyear[#1]{\@ifnextchar[{\jb@@footciteyear[#1]}{\jb@@footciteyear[][#1]}}%
\def\jb@@footciteyear[#1][#2]#3{%
    \def\jb@enote@hook{%
        \def\jb@nat@commands{\ifthenelse{\equal{\jb@@year}{}}{?}{\jb@@year}}%
        \renewcommand{\jb@nat@cite@left@sep}{}\renewcommand{\jb@nat@cite@right@sep}{}%
        \jb@footfalse % works for endnotes too
    }%
    \jb@enote@hook
    \jb@foottrue
    \jb@emulate@nat@cite[#1][#2]{#3}\endgroup
%    \futurelet\@let@token\@next@footnote
}%
\newcommand\jb@@last@@title{}
\newcommand\jb@@new@@title{}
\newcommand\jb@@last@fullname@author{}
\newcommand\jb@@new@fullname@author{}
\newcommand{\jb@do@ibidem@name@title@test}{%
       \def\jb@@new@fullname@author{INTT@\jb@@fullname}% INTT= ibidem name & title test
       \ifthenelse{\equal{\jb@@last@fullname@author}{\jb@@new@fullname@author}%
% full names are the same, but it's not the same work
                   \and\not\equal{\jb@@newauthorcite}{\jb@@lastauthorcite}%
       }{%
           \jb@same@author@different@worktrue
       }{%
           \jb@same@author@different@workfalse
       }%
       \global\let\jb@@last@fullname@author\jb@@new@fullname@author
}%
\newcommand*{\jb@do@if@multiple@bibetal}{\def\jb@@title@switch{1}}
\newcommand*{\jb@make@opcit}{%
            \ifjbweareinbib\else
             \ifjbcross\else
              \ifjb@opcit
                \@ifundefined{jb@reset@opcit@for}{}{%
                   \ifthenelse{%
                      \not\equal{\jb@reset@opcit@for}{}%
                      \and\value{opcit}=0%
                   }{%
                      \jb@undefineall{\jb@opcit@list}{opcit}%
                   }{}%
                }%
% debugging
%                \jb@showelems{\jb@opcit@list}%
                \ifthenelse{\equal{\@nameuse{opcit@\jb@@newauthorcite}}{cited}}{%
                    \jb@@opcittrue
                }{%
                    \global\@namedef{opcit@\jb@@newauthorcite}{cited}%
                    \hyper@jbanchorstart{opcit.\jb@@newauthorcite.\jb@reset@opcit@label@for}%
                    \hyper@jbanchorend%
                    \jb@append{opcit@\@citeb}{\jb@opcit@list}%
                    \jb@@opcitfalse
                }%
              \fi
             \fi
            \fi
}%
\newcommand*{\jb@make@pageranges@for@first@cite}{%
 \ifthenelse{\equal{\@nameuse{citefull@\@citeb}}{citefull}%
             \and\not\boolean{jb@allow@adding@of@pagerange@for@first@cite}%
 }{%
         \let\jbPAGES\@gobble
         \let\jbpages\@gobble
         \let\jbPages\@gobble
         \let\jbartPages\@gobble
 }{%
    \ifthenelse{\(%
                  \equal{\jb@@type}{article}%
                  \or
                  \equal{\jb@@type}{periodical}%
% CH 0.6 incollection added
                  \or
                  \equal{\jb@@type}{incollection}%
                \)%
                \and\boolean{jb@allow@adding@of@pagerange@for@first@cite}%
      }{}{%
          \let\jbPAGES\@gobble
          \let\jbpages\@gobble
          \let\jbPages\@gobble
          \let\jbartPages\@gobble
      }%
 }%
}
\def\@citex[#1][#2]#3{%
  \stepcounter{jb@cites@in@footnote}%
  \ifjb@ssed@mult@works\jb@check@edn{#3}\fi
% NEW 0.6 some checks for the new `super' option
  \ifthenelse{\boolean{jb@foot}\or\(\boolean{jb@super}\and\not\boolean{jb@fn}%
              \and\not\boolean{jbweareinbib}\and\not\boolean{jbweareinendnotes}\)}{%
    \renewcommand*{\@cite}[2]{\unskip\footnote{##1##2\ifthenelse{\boolean{jb@footnote@period}}{\unskip.}{}}}%
  }{%
     \renewcommand*{\@cite}[2]{%
      \ifjb@fn\else\ifjbweareinbib\else\ifjbcross\else\jb@open\fi\fi\fi
        ##1##2%
      \ifjb@fn\else\ifjbweareinbib\else\ifjbcross\else\jb@close\fi\fi\fi
     }%
  }%
  \ifx\relax#1\relax
    \ifx\relax#2\relax
       \ifjb@debug
        \typeout{#3: @citex arg1 and @citex arg2 are empty,}%
        \typeout{#3: I assume \string\cite{key}}%
       \fi
       \def\jb@@newannotatorcite{}%
       \def\jb@@newpagecite{\jbprformat{}}%
    \else
       \ifjb@debug
        \typeout{#3: @citex arg1 is empty or missing/@citex arg2 is #2}%
        \typeout{#3: I assume \string\cite[#2]{key} or \string\cite[][#2]{key}}%
       \fi
       \def\jb@@newannotatorcite{}%
       \def\jb@@newpagecite{\jbprformat{#2}}%
    \fi
  \else
    \ifx\relax#2\relax
       \ifjb@debug
        \typeout{#3: @citex arg1 is #1/@citex arg2 is empty or missing}%
        \typeout{#3: I assume \string\cite[#1][]{key}}%
       \fi
       \ifjb@old@order
          \def\jb@@newannotatorcite{}%
          \def\jb@@newpagecite{\jbprformat{#1}}%
       \else
          \def\jb@@newannotatorcite{#1}%
          \def\jb@@newpagecite{\jbprformat{}}%
       \fi
    \else
       \ifjb@debug
        \typeout{#3: @citex arg1 is #1/@citex arg2 is #2}%
        \typeout{#3: I assume \string\cite[#1][#2]{key}}%
       \fi
       \ifjb@old@order
          \def\jb@@newannotatorcite{#2}%
          \def\jb@@newpagecite{\jbprformat{#1}}%
       \else
          \def\jb@@newannotatorcite{#1}%
          \def\jb@@newpagecite{\jbprformat{#2}}%
       \fi
    \fi
  \fi
  \ifjb@no@nested@crossrefs
% perhaps \bibcrossrefcite is redef'd, so let's save it
    \let\origcrossref\jbcrossrefchecked
% disable crossreferencing in full citations by default
    \renewcommand*{\jbcrossrefchecked}[2][]{}%
% save crossref editor separation
    \let\origbibces\bibces
    \renewcommand*{\bibces}{}%
  \fi
  \let\@citea\@empty%
  \@cite{%
    \@for\@citeb:=#3\do{%
       \@citea%
       \def\@citea{;\penalty\@m\ %
          \@ifundefined{jb@morethanonecite}{%
             \global\@namedef{jb@morethanonecite}{}}{}%
          \ifthenelse{\equal{\jb@@newpagecite}{\@empty}}{\relax}{%
            \jb@package@warning{\jb@pkg@name}{%
               I assume you know what you're doing %
               using `\jb@@newpagecite'\MessageBreak
               on a citation with more than one\MessageBreak
               author}{\relax}%
          }%
       }%
       \@ifundefined{b@\@citeb}{}{%
           \protected@edef\@tempa{\csname b@\@citeb\endcsname}%
           \protected@edef\jb@@new@@author{\expandafter\jb@fifthofseven\@tempa\@empty}%
       }%
       \ifthenelse{\equal{\jb@@last@@author}{\jb@@new@@author}\and\not\equal{\jb@@new@@author}{}}{%
           \jb@same@fullauthortrue
       }{%
           \jb@same@fullauthorfalse
       }%
       \global\let\jb@@last@@author\jb@@new@@author
% This has to be tested outside definition of \@citea!
       \@ifundefined{jb@morethanonecite}{\relax}{%
           \let\jb@@newannotatorcite\@empty
% for repeated authors in multiple citations
           \let\idemname\idemmidname
       }%
       \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
       \if@filesw
         \immediate\write
            \@newciteauxhandle{%
               \jb@makehowcited\string\citation{\@citeb}%
            }%
       \fi
% b@\@citeb\@extra@b@citeb instead of b@\@citeb %
% for chapterbib compatibility
       \@ifundefined{b@\@citeb\@extra@b@citeb}{%
          \mbox{\reset@font{\bfseries ?}, #1}%
          \G@refundefinedtrue
          \@latex@warning{%
            Citation `\@citeb' on page \thepage \space undefined
          }%
       }{%
          \begingroup
            \jb@extract%
            \ifjb@always@pageranges\else\ifjb@tested@pageranges
               \ifthenelse{\equal{\jb@@newpagecite}{}}{}{\jb@make@pageranges@for@first@cite}%
               \else\jb@make@pageranges@for@first@cite\fi\fi
% \@citeb instead of #3 (we are inside \@for!)
            \def\jb@@newauthorcite{\@citeb}%
% new position of \jb@make@opcit to jump to the beginning of the opcit source citation
            \jb@make@opcit
            \jb@call@index{aut}{\@citeb}%
            \jb@call@index{ed}{\@citeb}%
            \jb@call@index{org}{\@citeb}%
            \jb@changefontsforfullcite
            \ifjb@allow@hyper@cite\hyper@jblinkstart{\@citeb}\fi
            \jb@extract%
            \jb@do@ibidem@name@title@test%
% For crossref's: avoid lonely \jbhowsepbeforetitle at the beginning
% of an bib entry, if no author (and no key!) is given
            \ifthenelse{%
                \equal{\jb@@fullname}{\@empty}%
                \and
                \equal{\jb@@author}{\@empty}%
            }{%
                \let\jbhowsepbeforetitle\@empty
            }{}%
% do some things ONLY in citations, use \addto
            \jbonlyforcitations%
% check if we should print out the title for a special publication type <=== To TEST !!!!!!!!!!!
            \jb@cite@title@for@type@hook%
% check for types and citefull=first
            \jb@cite@full@first@fortype@hook%
% check for work which should have always title
            \jb@cite@title@for@work@hook%
% check for which type we should print out the starting page
            \jb@start@page@for@type@hook%
% check for which type we should give a starting page
%           \jb@format@startpages@for@types@hook%
            \jb@make@superscript@edition%
% check if different works with <name>~\Bibetal exists
% \@citeb instead of #3 (we are inside \@for!)
            \@ifundefined{jb@fm@\@citeb}{}{%
              \ifthenelse{\equal{\jb@@mult@switch}{0}}{%
                \@ifundefined{jb@fmmess@\@citeb}{% only one message per entry
                \global\@namedef{jb@fmmess@\@citeb}{}%
                \jb@package@warning{\jb@pkg@name}{%
                  Multiple use of `et. al.' for the author(s)\MessageBreak
                  of `#3' \MessageBreak
                  detected, printing the title to\MessageBreak
                  avoid ambiguity}}{}}{\relax}%
                \jb@do@if@multiple@bibetal% the things to do if true
            }%
            \ifjb@babel
                \ifthenelse{%
                    \equal{\jb@@language}{\bbl@main@language}%
                }{}{%
                    \ifthenelse{%
                        \equal{\jb@@language}{\@empty}%
                    }{% if no language is given, use the main language
                        \expandafter\jbselectlanguage%
                        \expandafter{\bbl@main@language}%
                    }{% if a language is given, use it
                        \language=\csname l@\jb@@language\endcsname\relax%
                    }%
                }%
            \fi
            \jb@checktitlefields
            \@ifundefined{jb@morethanonecite}{\jb@makeibidem}{\relax}%
            \jb@makeidem
            \jb@firstcitefull
            \jb@checked@etal
            \jb@makeagainfullcite%
            \jb@relaxforemptyauthor
            \jb@warningfootciteusage
            \jb@maketitlewishestrue
            \jb@cite@no@title@for@type@hook%
            \ifjb@debug
            \textcolor[named]{Dandelion}{%
              \ifjb@debug@br[\fi\jb@makecheckedcite\ifjb@debug@br]\fi}%
            \else
              \jb@makecheckedcite%
            \fi
            \OpCit%
            \ifjb@lookat
             \ifjb@firstcite@full
              \ifjb@allow@lookat@for@fullcite
               \ifjb@all@full\else
                \ifthenelse{%
                    \equal{\@nameuse{look@\@citeb}}{firsttime}%
                }{%
                    \relax
                }{%
% "Don't place the \ref and \vref within the scope of
% \hyper@natlinkstart ... \hyper@natlinkend--that can
% cause nested hyperlinks."            - Eitan Gurari
% So we are closing the hyperlink and the group here ...
% NEW 0.6 lookat for type stuff
                    \jb@lookat@fortype@hook
                    \ifthenelse{\equal{\jb@@lookat@for@type@switch}{1}}{%
                            \unskip\lookatprefix%
                            \ifjb@allow@hyper@cite\hyper@jblinkend\fi
                          \endgroup
                            \ifjb@vario
                               \vref{look@\@citeb:\jb@reset@look@label@for}%
                            \else
                               \ref{look@\@citeb:\jb@reset@look@label@for}%
                            \fi
                          \begingroup
                            \ifjb@allow@hyper@cite\hyper@jblinkstart{\@citeb}\fi
                                \lookatsuffix%
                                \jb@extract%
                    }{}%
                }%
               \fi % allfull end
              \fi % allow@lookat@for@fullcite end
             \fi % jb@firstcite@full end
            \fi % jb@lookat end
            \jb@checkperiod{#2}%
            \jb@extract@starting@page{\jb@@pages}%
            \jb@makecheckedpages
            \ifjb@allow@hyper@cite\hyper@jblinkend\fi
          \endgroup
          \ifx\relax#1\relax\ifx\relax#2\relax
% CH 0.6 don't compare empty pages to the next reference [RS],
% no \samepageibidem(mid)name for subsequent citations without page
%              \gdef\jb@@lastannotatorcite{}\gdef\jb@@lastpagecite{}%
              \gdef\jb@@lastannotatorcite{}\gdef\jb@@lastpagecite{EMPTY}% 
            \else
              \gdef\jb@@lastannotatorcite{}\gdef\jb@@lastpagecite{\jbprformat{#2}}%
            \fi
          \else
             \ifx\relax#2\relax
               \ifjb@old@order
                  \gdef\jb@@lastannotatorcite{}\gdef\jb@@lastpagecite{\jbprformat{#1}}%
               \else
% CH 0.6 don't compare empty pages to the next reference [RS],
% no \samepageibidem(mid)name for subsequent citations without page
%                  \gdef\jb@@lastannotatorcite{#1}\gdef\jb@@lastpagecite{}%
                  \gdef\jb@@lastannotatorcite{}\gdef\jb@@lastpagecite{EMPTY}%
               \fi
             \else
               \ifjb@old@order
                  \gdef\jb@@lastannotatorcite{#2}\gdef\jb@@lastpagecite{\jbprformat{#1}}%
                \else
                  \gdef\jb@@lastannotatorcite{#1}\gdef\jb@@lastpagecite{\jbprformat{#2}}%
                \fi
             \fi
          \fi
          \ifjbweareinbib\else\gdef\jb@@lastauthorcite{#3}\fi
          \global\let\jb@morethanonecite\@undefined
          \let\ibidem\@undefined
          \ifjb@no@nested@crossrefs
            \global\let\jbcrossrefchecked\origcrossref
          \fi
          \ifjb@fn
            \let\jb@close\@empty
            \let\jb@open\@empty
          \fi
          \stepcounter{citefull}%
          \stepcounter{opcit}%
          \jb@allow@adding@of@pagerangetrue
       }%
     }%
     \global\jb@fullcite@againfalse
     \jb@noauthorforcitetitlefalse
  }{}%
  \ifjb@fn\else\jb@fnfalse\fi
  \jb@ssed@recent@kernedfalse
  \@restore@auxhandle
}%
\AtBeginDocument{%
  \let\citetitle\jbcitetitle
  \let\fullcite\jbfullcite
  \let\footfullcite\jbfootfullcite
  \let\footcite\jbfootcite
  \let\footcitetitle\jbfootcitetitle
}%
% CH 0.6 we switched to the end of the file, because of the new file loading mechanism,
% some command appeared to be undef'ed when putting them into the .cfg files
\def\jurabibsetup{\setkeys{jb}}
\let\jb@origExecuteOptions\ExecuteOptions
\let\ExecuteOptions\jurabibsetup
% CH 0.6 adapted version of \ProcessOptionsWithKV, after discussion in dctt.
\def\ProcessOptionsWithKV#1{%
  \let\@tempc\relax
  \let\KVo@tempa\@empty
  \@for\CurrentOption:=\@classoptionslist\do{%
    \@ifundefined{KV@#1@\CurrentOption}%
    {}%
    {%
      \edef\KVo@tempa{\KVo@tempa,\CurrentOption,}%
      \@expandtwoargs\@removeelement\CurrentOption
         \@unusedoptionlist\@unusedoptionlist
    }%
  }%
  \edef\KVo@tempa{%
    \noexpand\setkeys{#1}{%
      \KVo@tempa\@ptionlist{\@currname.\@currext}%
    }%
  }%
  \KVo@tempa
  \AtEndOfPackage{\let\@unprocessedoptions\relax}%
  \let\CurrentOption\@empty
}
\ProcessOptionsWithKV{jb}%
% \let\ExecuteOptions\jb@origExecuteOptions
% Pick up the options from config files
% Is there a own config file?
\InputIfFileExists{\jb@own@config@file}{%
    \jb@typeout{Package jurabib Info: *** Local config file `\jb@own@config@file' used ***^^J}}{%
% Is there a jurabib system config file?
       \InputIfFileExists{\jb@config@file}{%
       \jb@typeout{Package jurabib Info: *** Local config file `\jb@config@file' used ***^^J}}{}%
}%
% Call \ProcessOptionsWithKV again to give \usepackage-options priority over options from config files.
\ProcessOptionsWithKV{jb}%
\let\ExecuteOptions\jb@origExecuteOptions
%</package>
%<*jurabst|jurecobst|jurunsrt>
ENTRY{
  address
  author
  booktitle
  chapter
  edition
  editor
  howpublished
  institution
  isbn
  issn
  journal
  key
  language
  month
  note
  number
  organization
  pages
  publisher
  school
  series
  title
  type
  volume
  year
%%
  url
  urldate
  volumetitle
  dissyear
  howcited
  juratitle
  juraauthor
  shorttitle
  shortauthor
  ssedition
  titleaddon
  booktitleaddon
  editortype
  sortkey
  annote
  gender
  translator
  flanguage
  oyear
  oaddress
  opublisher
  updated
  totalpages
  founder
  archive
  subarchive
  shortarchive
  shortsubarchive
  sig1
  sig2
  sig3
  sig4
  archname
  }
  { repeat-authors repeat-titles }
  { label dummy.label extra.label sort.label current-authors }

INTEGERS { output.state before.all mid.sentence after.sentence after.block }

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 :=
}

STRINGS { s t u v w x }

FUNCTION {output.nonnull}
{ 's :=
  output.state after.block =
    { write$ }
    { output.state before.all =
      {  write$ }
      {  output.state colon.after =
         { "" * write$ }
         { output.state period.dash =
           { ", " *  write$ }
           { output.state mid.sentence =
             { " " * write$ }
             { 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 {not}
{   { #0 }
  { #1 }
  if$
}

FUNCTION {and}
{   'skip$
  { pop$ #0 }
  if$
}

FUNCTION {or}
{   { pop$ #1 }
  'skip$
  if$
}

FUNCTION {is.num}
{ chr.to.int$
  duplicate$ "0" chr.to.int$ < not
  swap$ "9" chr.to.int$ > not and
}

FUNCTION {extract.num}
{ duplicate$ 't :=
  "" 's :=
  { t empty$ not }
  { t #1 #1 substring$
  t #2 global.max$ substring$ 't :=
  duplicate$ is.num
    { s swap$ * 's := }
    { pop$ "" 't := }
  if$
  }
  while$
  s empty$
  'skip$
  { pop$ s }
  if$
}

FUNCTION {convert.edition.superscript}
{ edition extract.num "l" change.case$ 's :=
  s "first" = s "1" = or s "erste" = or
    { "1" 't := }
    { s "second" = s "2" = or s "zweite" = or
        { "2" 't := }
        { s "third" = s "3" = or s "dritte" = or
            { "3" 't := }
            { s "fourth" = s "4" = or s "vierte" = or
                { "4" 't := }
                { s "fifth" = s "5" = or s "fuenfte" = or
                    { "5" 't := }
                    { s "sixth" = s "6" = or s "sechste" = or
                        { "6" 't := }
                        { s "seventh" = s "7" = or s "siebte" = or s "siebente" = or
                            { "7" 't := }
                            { s "eighth" = s "8" = or s "achte" = or
                                { "8" 't := }
                                { s "nineth" = s "9" = or s "neunte" = or
                                      { "9" 't := }
                                      {  s #1 #1 substring$ is.num
                                           { s "" * 't := }
                                           { edition 't := }
                                         if$
                                      }
                                  if$
                                }
                              if$
                            }
                          if$
                        }
                      if$
                    }
                  if$
                }
              if$
            }
          if$
        }
      if$
    }
  if$
  t
}

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 {output.bibitem.fst}
{ newline$
  "\bibitem[{" write$
  shortauthor empty$
    { juraauthor empty$
       { author empty$
          { editor empty$
              { organization empty$
% CH 0.6         { "empty" write$ }
                   { archive empty$
                         { "empty" write$ }
                         { archive write$ }
                     if$
                   }
                   { organization write$ }
                if$
              }
              { label write$ }
            if$
          }
          { label write$ }
         if$
       }
       { juraauthor write$ }
     if$
    }
    { shortauthor write$ }
  if$
  "}%" write$
  sortkey empty$
         'skip$
         { newline$ "% SORTKEY: [" sortkey * "]" * write$ }
  if$
  newline$
  shorttitle empty$
   { juratitle empty$
       { journal empty$
          { "         {}%" write$ }
%<*jurecobst>
          { "         {" journal * "}%" * write$ }
         if$
       }
%</jurecobst>
%<*jurabst|jurunsrt>
          { volume empty$
                { year empty$
                     { "         {" journal * "}%" * write$ }
                     { "         {" journal * "\jbsy {" * year * "}}%" * write$ }
                  if$
                }
                { year empty$
                     { "         {" journal * "}%" * write$ }
                     { "         {" journal * " " * volume * " " * " \peryearformat {" year * "}}%" * * write$ }
                  if$
                }
            if$
          }
         if$
       }
%</jurabst|jurunsrt>
       { "         {" juratitle * "}%" * write$ }
     if$
    }
    { "         {" shorttitle * "}%" * write$ }
  if$
  newline$
  repeat-authors
    { "         {{1}" write$ }
    { "         {{0}" write$ }
  if$
  howcited empty$
    { "{}" write$ }
    { "{" howcited * "}" * write$ }
  if$
  type$ empty$
    { "{}" write$ }
    { "{" type$ * "}" * write$ }
  if$
  year empty$
    { type$ "book" = dissyear empty$ not and
        { "{" dissyear * write$
          extra.label "" =
              skip$
              { "\el {" write$ extra.label write$ "}" write$ }
          if$
          "}" write$
        }
        {  "{}" write$ }
      if$
    }
    { "{" year * write$
      extra.label "" =
          'skip$
          { "\el {" write$ extra.label write$ "}" write$ }
      if$
      "}" write$
    }
  if$
  edition empty$
    { "{}" write$ }
    { "{" convert.edition.superscript extract.num * "}" * write$ }
  if$
  ssedition empty$
    { "{}" write$ }
    { "{" ssedition * "}" * write$ }
  if$
  language empty$
    { "{}" write$ }
    { "{" language * "}" * write$ }
  if$
  pages empty$
    { "{}%" write$ }
    { "{" write$ pages n.dashify write$ "}%" write$ }
  if$
}

FUNCTION {output.bibitem.snd}
{ newline$
%<*jurecobst>
  publisher empty$
    { address empty$
           { "          {" write$ }
           { "          {" write$ address write$ }
      if$
    }
    { address empty$
           { "          {" write$ }
           { "          {" write$ address write$ "\bpubaddr {} " write$ publisher write$ }
      if$
    }
  if$
%</jurecobst>
%<*jurabst|jurunsrt>
  publisher empty$
    { address empty$
         { year empty$
               { "          {" write$ }
               { "          {" write$
                            year write$
                            extra.label "" =
                              'skip$
                              { "\el {" write$ extra.label write$ "}" write$ }
                            if$
               }
           if$
         }
         { year empty$
               { "          {" write$ address write$ }
               { "          {" write$ address write$ "\bibbdsep {} " write$
                            year write$
                            extra.label "" =
                              'skip$
                              { "\el {" write$ extra.label write$ "}" write$ }
                            if$
               }
           if$
         }
      if$
    }
    { address empty$
        { year empty$
              { "          {" write$ publisher write$ }
              { "          {" write$ publisher write$ "\bibbdsep {} " write$
                           year write$
                           extra.label "" =
                             'skip$
                             { "\el {" write$ extra.label write$ "}" write$ }
                           if$
              }
          if$
        }
        { year empty$
              { "          {" write$ address write$ "\bpubaddr {} " write$ publisher write$ }
              { "          {" write$ address write$ "\bpubaddr {} " write$ publisher write$ "\bibbdsep {} " write$
                           year write$
                           extra.label "" =
                             'skip$
                             { "\el {" write$ extra.label write$ "}" write$ }
                           if$
              }
          if$
        }
      if$
    }
  if$
%</jurabst|jurunsrt>
  "}}%" write$ newline$
  "         {" write$
  title empty$
    { "{}%" write$ newline$ }
    { "{" title *
      type$ "archival" =
          { shortarchive empty$ not
                { ", In: " shortarchive * * }
                { archive empty$ not
                      { ", In: " archive * * }
                      'skip$
                  if$
                }
             if$
             shortsubarchive empty$
                 'skip$
                { ", " shortsubarchive * * }
             if$
             sig1 empty$
                 'skip$
                 { ", " sig1 * *
                   sig2 empty$
                       'skip$
                       { ". " sig2 * *
                         sig3 empty$
                             'skip$
                             { ". " sig3 * *
                               sig4 empty$
                                   'skip$
                                   { ". " sig4 * * }
                               if$
                             }
                         if$
                       }
                  if$
                 }
             if$
             pages empty$
                  'skip$
                  { " \jbArchPages {" pages n.dashify * "}" * * }
             if$
          }
          'skip$
      if$
      "}%" * write$ newline$ }
  if$
  gender empty$
    { "          {}" write$ }
    { "          {" gender * "}" * write$ }
  if$
% NEW 0.6
  oyear empty$
    { "{}" write$ }
    { "{" oyear * "}" * write$ }
  if$
  author empty$
    { editor empty$
         { "{4}" write$ }% author and editor empty
         { "{3}" write$ }% author empty, editor not
      if$
    }
    { editor empty$
         { "{2}" write$ }% editor empty, author not
         { "{1}" write$ }% both author and editor given
      if$
    }
  if$
  "{}{}{}{}{}}%" write$ newline$
  "        ]{" write$
  cite$ write$
  "}" write$
  url empty$
    'skip$
    { newline$ " \jburldef {" write$ cite$ write$ "}{" write$ url write$ "}%" write$ }
  if$
  newline$
  " \jbbibargs {" write$
  ""
  before.all 'output.state :=
}

FUNCTION {output.bibitem}
{ output.bibitem.fst
  output.bibitem.snd
}

% NEW 0.5e
FUNCTION {format.note}
{ note empty$
      'skip$
      { output.state before.all =
          {" \jbnote {} {" * note * "} " * }
          {" \jbnote {1} {" * note * "} " * }
       if$
      }
  if$
}

% NEW 0.5e
FUNCTION {format.endnote}
{ note empty$
      { "" }
      { "  \jbendnote {" note * "}" * }
  if$
}

% NEW 0.5e
% FUNCTION {fin.entry.endnote}
% { " \jbdoitem" * write$
%   annote missing$
%     { " \bibAnnoteFile {" cite$ * "}" * write$ newline$ }
%     { " \bibAnnote {" annote * "}" * write$ newline$ }
%   if$
% }

FUNCTION {format.juradiss.book}
{ dissyear empty$
  { "" }
  { type empty$
     { school empty$
         { "Dissyear but no school in " cite$ * warning$
           " (\alsothesisname {} \jurthesisname" *
           year empty$ not year missing$ not and
                { "\bibbdsep {} " dissyear * }
                'skip$
           if$
           ")" *
         }
         { " (\alsothesisname {} \jurthesisname, " school *
           year empty$ not year missing$ not and
                { "\bibbdsep {} " dissyear * * }
                'skip$
           if$
           ")" *
         }
       if$
     }
     { school empty$
         { "Dissyear but no school in " cite$ * warning$
           " (\alsothesisname {} " type *
           year empty$ not year missing$ not and
                { "\bibbdsep {} " dissyear * }
                'skip$
           if$
           ")" *
         }
         { " (\alsothesisname {} " type *
           ", " school * *
           year empty$ not year missing$ not and
                { "\bibbdsep {} " dissyear * * }
                'skip$
           if$
           ")" *
         }
       if$
     }
   if$
  }
  if$
}

FUNCTION {format.thesis}
{ year empty$
      { school empty$
              { "No universtiy in " cite$ * warning$ }
              { "There's a university, but no year in " cite$ * warning$ }
        if$
        ""
      }
      { type empty$
%<*jurecobst>
            { school empty$
                    { "No university in " cite$ * warning$
                        type$ "mastersthesis" =
                           { "\apyformat {\mastersthesisname" address empty$ 'skip$ { ", " address * * } if$ "}" * }
                           { type$ "jurthesis" =
                                 { "\apyformat {\jurthesisname" address empty$ 'skip$ { ", " address * * } if$ "}" * }
                                 { "\apyformat {\phdthesisname" address empty$ 'skip$ { ", " address * * } if$ "}" * }
                             if$
                           }
                        if$
                    }
                    { type$ "mastersthesis" =
                           { "\mastersthesisname, \apyformat {" school * address empty$ 'skip$ { ", " address * * } if$  "}" * }
                           { type$ "jurthesis" =
                                 { "\jurthesisname, \apyformat {" school * address empty$ 'skip$ { ", " address * * } if$ "}" * }
                                 { "\phdthesisname, \apyformat {" school * address empty$ 'skip$ { ", " address * * } if$ "}" * }
                             if$
                           }
                      if$
                    }
              if$
            }
%</jurecobst>
%<*jurabst|jurunsrt>
            { school empty$
                    { "No university in " cite$ * warning$
                        type$ "mastersthesis" =
                           { "\apyformat {\mastersthesisname" * address empty$ 'skip$ { ", " address * * } if$ "\bibbdsep {} " year * "}" * }
                           { type$ "jurthesis" =
                                 { "\apyformat {\jurthesisname" * address empty$ 'skip$ { ", " address * * } if$ "\bibbdsep {} " year * "}" * }
                                 { "\apyformat {\phdthesisname" * address empty$ 'skip$ { ", " address * * } if$ "\bibbdsep {} " year * "}" * }
                             if$
                           }
                        if$
                    }
                    {  type$ "mastersthesis" =
                           { "\mastersthesisname, \apyformat {" school * address empty$ 'skip$ { ", " address * * } if$ "\bibbdsep {} " year * * "}" * }
                           { type$ "jurthesis" =
                                 { "\jurthesisname, \apyformat {" school * address empty$ 'skip$ { ", " address * * } if$ "\bibbdsep {} " year * * "}" * }
                                 { "\phdthesisname, \apyformat {" school * address empty$ 'skip$ { ", " address * * } if$ "\bibbdsep {} " year * * "}" * }
                             if$
                           }
                       if$
                    }
              if$
            }
%</jurabst|jurunsrt>
%<*jurecobst>
            { school empty$
                    { "No university in " cite$ * warning$ type }
                    { type " \apyformat {" * school * address empty$ 'skip$ { ", " address * * } if$ "}" * }
              if$
            }
%</jurecobst>
%<*jurabst|jurunsrt>
            { school empty$
                    { "No university in " cite$ * warning$ type
              address empty$ 'skip$ { " \apyformat {" address * } if$ "\bibbdsep {} " *  * year * "}" * }
                    { type " \apyformat {" * school * address empty$ 'skip$ { ", " address * * } if$ "\bibbdsep {} " year * * "}" * }
              if$
            }
%</jurabst|jurunsrt>
       if$
  }
  if$
}

FUNCTION {set.comma.pages.check}
{ year empty$
  'skip$
  { pages empty$
    { url empty$
      'skip$
      { ", " * }
      if$
    }
    { ", " * }
    if$
  }
  if$
}

FUNCTION {set.period.dash}
{ output.state before.all =
  'skip$
  { period.dash  'output.state := }
  if$
}

FUNCTION {set.period.dash.check}
{ empty$
  'skip$
  'set.period.dash
  if$
}

FUNCTION {new.sentence}
{ output.state before.all =
   'skip$
   { after.sentence 'output.state := }
  if$
}

FUNCTION {part.of.sentence}
{ output.state before.all =
   'skip$
   { mid.sentence 'output.state := }
  if$
}

FUNCTION {new.sentence.checka}
{ empty$
  'skip$
  'new.sentence
  if$
}

FUNCTION {field.or.null}
{ duplicate$ empty$
  { pop$ "" }
  'skip$
  if$
}

% This function replaces the string on top of the stack with its final
% non-right-brace character.

FUNCTION {get.final.nonrightbrace.char}
{   { duplicate$
    #-1 #1 substring$
    duplicate$
    "}" =
  }
  { pop$
    #-2 global.max$ substring$
  }
  while$
  swap$ pop$
}

% somewhat analogous to the add.period$ built-in function, this function looks
% at the string on top of the stack, and if its last character is a period,
% question mark, or exclamation mark, it appends nothing (the closing brace),
% else it appends the \bibatsep macro

FUNCTION {check.punct.instead.of.add.period}
{ duplicate$
  get.final.nonrightbrace.char
  duplicate$ "." = swap$
  duplicate$ "!" = swap$
  "?" = or or
  { "} " * }
  { "}\bibatsep\ " * }
  if$
}

FUNCTION {check.punct.instead.of.add.period.art}
{ duplicate$
  get.final.nonrightbrace.char
  duplicate$ "." = swap$
  duplicate$ "!" = swap$
  "?" = or or
  { "} " * }
  { pages empty$ note empty$ url empty$ and and
    { "} " * }
    { volume empty$
         { pages empty$
              { "}\ajtsep\ " * }
              { crossref missing$
                    { month empty$
                         { "}\ajtsep\ " * }
                         { "}\ajtsep " * }
                      if$
                    }
                    { "}\ajtsep " * }
                if$
              }
          if$
         }
         { "}\ajtsep\ " * }
       if$
    }
   if$
  }
  if$
}

FUNCTION {emphasize}
{ duplicate$ empty$
       { pop$ "" }
       { "\bibtfont {" swap$ check.punct.instead.of.add.period * }
  if$
}

FUNCTION {journaltitlemarkup}
{ duplicate$ empty$
      { pop$ "" }
      { "\bibJTsep \bibjtfont {" swap$ check.punct.instead.of.add.period.art * }
  if$
}

FUNCTION {incollbooktitlemarkup}
{ duplicate$ empty$
      { pop$ "" }
      { "\bibbtfont {" swap$ check.punct.instead.of.add.period * }
  if$
}

INTEGERS { nameptr namesleft numnames }

FUNCTION { lastnamemarkup }
{ duplicate$ empty$
    { pop$ "" }
    { "\bibnf {" swap$ * "}" * }
  if$
}

FUNCTION { editorlastnamemarkup }
 { duplicate$ empty$
  { pop$ "" }
  { author empty$
       { "\biblenf {" swap$ * "}" * } % lonely editor(s)!
       { "\bibenf {" swap$ * "}" * }
   if$
  }
  if$
}

FUNCTION { othermarkup }
 { duplicate$ empty$
    { pop$ " {}" }
       { " {" swap$ * "}" * }
  if$
}

FUNCTION {article.in.journal}
{ duplicate$ empty$
  { pop$ "" }
  { author missing$
    { title missing$
        'skip$
        { journaltitlemarkup "" swap$ * }
      if$
    }
    { journaltitlemarkup "" swap$ * }
    if$
   }
  if$
}

FUNCTION {format.names} % NEW v0.5
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { s nameptr "{ll}" format.name$ 't := t lastnamemarkup 't :=
    s nameptr "{ff}" format.name$ othermarkup 'u :=
    s nameptr "{f.}" format.name$ othermarkup 'v :=
    s nameptr "{vv}" format.name$ othermarkup 'w :=
    s nameptr "{jj}" format.name$ othermarkup 'x :=
    t u * v * w * x * 't :=
     nameptr #1 >
      { namesleft #1 >
          { numnames #3 >
                { "" * }
                { numnames #3 <
                     { "\Bibbtasep " * t * }      % between (exactly) two authors
                     { "\Bibbfsasep " * t * }     % between first and second author (if more than two)
                  if$
                }
            if$
          }
          { t "\bibnf {others} {} {} {} {}" =
            t "\bibnf {others} {} {} {} {} \edfont {\editorsname}" = or
            numnames #3 > or
               { "\bibIMfont {\Bibetal}" * }
               { numnames #3 <
                   { "\Bibbtasep " * t * }  % between (exactly) two authors
                   { "\Bibbstasep " * t * } % between second and third author
                 if$
               }
            if$
          }
        if$
      }
     't
    if$
    nameptr #1 + 'nameptr :=
    namesleft #1 -  'namesleft :=
  }
  while$
}

FUNCTION {format.editor.names} % NEW v0.5
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { s nameptr "{ll}" format.name$ 't := t editorlastnamemarkup 't :=
    s nameptr "{ff}" format.name$ othermarkup 'u :=
    s nameptr "{f.}" format.name$ othermarkup 'v :=
    s nameptr "{vv}" format.name$ othermarkup 'w :=
    s nameptr "{jj}" format.name$ othermarkup 'x :=
    t u * v * w * x * 't :=
     nameptr #1 >
      { namesleft #1 >
          { numnames #3 >
                { "" * }
                { numnames #3 <
                     { "\Bibbtesep " * t * }      % between (exactly) two editors
                     { "\Bibbfsesep " * t * }     % between first and second editor (if more than two)
                  if$
                }
            if$
          }
          { t "\bibenf {others} {} {} {} {}" =
            t "\biblenf {others} {} {} {} {}" = or
            t "\bibenf {others} {} {} {} {} \edfont {\editorsname}" = or
            t "\biblenf {others} {} {} {} {} \edfont {\editorsname}" = or
            numnames #3 > or
               { "\bibIMfont {\Bibetal}" * }
               { numnames #3 <
                   { "\Bibbtesep " * t * }  % between (exactly) two editors
                   { "\Bibbstesep " * t * } % between second and third editor
                 if$
               }
            if$
          }
        if$
      }
     't
    if$
    nameptr #1 + 'nameptr :=
    namesleft #1 -  'namesleft :=
  }
  while$
}

FUNCTION {format.name.sig}
{ '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 * }
            {  t "others" =
                { " et al." * }
                { "" * t * }
              if$
            }
          if$
        }
        't
      if$
    nameptr #1 + 'nameptr :=
    namesleft #1 -  'namesleft :=
  }
  while$
}

% NEW 0.6
FUNCTION {indexmarkup}
{ duplicate$ empty$
       { pop$ "{}" }
       { "{" swap$ * "}" * }
  if$
}

% NEW 0.6
FUNCTION {format.names.for.index}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { s nameptr "{ll}" format.name$ 't := t indexmarkup 't :=
    s nameptr "{ff}" format.name$ indexmarkup 'u :=
    s nameptr "{f.}" format.name$ indexmarkup 'v :=
    s nameptr "{vv}" format.name$ indexmarkup 'w :=
    s nameptr "{jj}" format.name$ indexmarkup 'x :=
    t u * v * w * x * 't :=
    t "{others}{}{}{}{}" =
      'skip$
      { nameptr #1 >
         { namesleft #1 >
             { "; " * t * }
             { 
%               numnames #2 >
%                 { "; " * }
%                 'skip$
%               if$
               t "others" =
                  'skip$
                  { "; " * t * }
               if$
             }
           if$
          }
          't
        if$
      }
    if$
    nameptr #1 + 'nameptr :=
    namesleft #1 -  'namesleft :=
  }
  while$
}

FUNCTION {format.authors}
{ author empty$
  { "" }
  { author format.names }
  if$
}

FUNCTION {format.founders}
{ founder empty$
   'skip$
   { author empty$
         'skip$
         { " in: " * }
     if$
     founder format.names "\foundername" * *
     editor empty$
        'skip$
        { author empty$
             { "\afterfoundersep {}" * }
             'skip$
          if$
        }
     if$
   }
  if$
}

FUNCTION {format.editors}
{ editor empty$
   { "" }
   { author empty$
        {  editor format.editor.names
           editortype empty$
              { editor num.names$ #1 >
                  { "\fsted {\editorsname}" * }
                  { "\fsted {\editorname}" * }
                if$
              }
              { "\fsted {(" editortype * ")}" * * }
           if$
        }
        {  founder empty$
               { "\bibfnfont {;} " * }
               { type$ "commented" =
                   { "\afterfoundersep {}" * }
                   { "\bibfnfont {;} " * }
                 if$
               }
           if$
           editor format.editor.names *
           editortype empty$
              { editor num.names$ #1 >
                  { " \edfont {\editorsname}" * }
                  { " \edfont {\editorname}" * }
                if$
              }
              { " \edfont {(" editortype * ")}" * * }
           if$
        }
    if$
   }
  if$
}

FUNCTION {format.snd.editors}
{ editor empty$
   { "" * }
   { author empty$
        { editortype empty$
             { editor num.names$ #1 >
                 { "\snded {\sndeditorsname}" * }
                 { "\snded {\sndeditorname}" * }
               if$
             }
             { "\snded {(" editortype * ")}" * * }
          if$
        }
        'skip$
    if$
   }
  if$
}

FUNCTION { format.howcited }
{ "} {\bibhowcited}" format.endnote * }

FUNCTION {fin.entry.endnote}
{ " \jbdoitem {" *
% NEW 0.6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  author empty$
      'skip$
      { author format.names.for.index * }
  if$
  "} {"
  editor empty$
      'skip$
      { editor format.names.for.index * }
  if$
  "} {" *
  organization empty$
      'skip$
      { "{" organization * "}{}{}{}{}" * * }
  if$
  "}" * * write$
  annote missing$
    { " \bibAnnoteFile {" cite$ * "}" * write$ newline$ }
    { " \bibAnnote {" annote * "}" * write$ newline$ }
  if$
}

% NEW 0.6, counts authors/editors
FUNCTION {count.authors.or.editors}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { "" 't :=
      nameptr #1 >
        { namesleft #1 >
            { "" * }
            { "s" * } % more than one author/editor, append `s'
          if$
        }
        't
      if$
    nameptr #1 + 'nameptr :=
    namesleft #1 - 'namesleft :=
  }
  while$
}

%<*jurabst|jurunsrt>
FUNCTION { set.after.author.sep }
{ author missing$
     { editor missing$
          { organization missing$
% NEW 0.6      { "} {empty} {} {" }
                 { archive missing$
                      { "} {empty} {} {" }
                      { "} {" archive format.name.sig * "} {} {" * }
                   if$
                 }
% CH 0.6       { "} {" author format.name.sig * "} {au} {" * }
                 { "} {" organization "} {org} {" * * }
            if$
          }
% CH 0.6 { "} {" editor format.name.sig * "} {ed} {" * }
          { "} {" editor format.name.sig * "} {ed" editor count.authors.or.editors "} {" * * * }
      if$
     }
% CH 0.6
%    { "} {" author format.name.sig * "} {au} {" * }
     { "} {" author format.name.sig * "} {au" author count.authors.or.editors "} {" * * * }
  if$
  author empty$
      { format.snd.editors }
      'skip$
  if$
  "" *
}
%</jurabst|jurunsrt>

%<*jurecobst>
FUNCTION { set.after.author.sep }
{ author empty$ editor empty$ and
      { "}{jureco} {} {" "" * }
      { year empty$
          { type$ "book" = dissyear empty$ not and
                   { "\bibYear {" dissyear *
                     extra.label "" =
                        'skip$
                        { "\el {" extra.label * "}" * * }
                     if$
                     "}" * *
                   }
                   { year missing$
                    { "\bibYear {}" * }
                    'skip$
                     if$
                   }
             if$
          }
          { year missing$
             { "\bibYear {}" * }
             { "\bibYear {" year *
               extra.label "" =
                 'skip$
                 { "\el {" extra.label * "}" * * }
               if$
               "}" * *
             }
            if$
          }
        if$
        "}{jureco} {} {" "" *
      }
  if$
}
%</jurecobst>

FUNCTION {format.names.info}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { s nameptr "{ff }{vv }{ll}" format.name$ 't :=
      nameptr #1 >
        { namesleft #1 >
            { " " * t * }
            {  t "others" =
                { " et al." * }
                { " " * t * }
              if$
            }
          if$
        }
        't
      if$
    nameptr #1 + 'nameptr :=
    namesleft #1 -  'namesleft :=
  }
  while$
}

% CH 0.51q macros for testing commentaries, reworked, bug reported by Tilman Finke
% check for editor and edition added
FUNCTION { format.howcited.comment }
{ edition empty$
     { "} {\bibcommenthowcited}" format.endnote * }
     { "} {\bibcommenthowcited}" format.endnote * *
       author empty$ editor empty$ not and
         { " \jbauthorinfo {" editor format.names.info " " title * * * "}{" cite$ "}" * * * }
         { author empty$ shortauthor empty$ not and
               { " \jbauthorinfo {" shortauthor format.names.info " " title * * * "}{" cite$ "}" * * * }
               { " \jbauthorinfo {" author format.names.info " " title * * * "}{" cite$ "}" * * * }
           if$
         }
       if$
     }
  if$
}

FUNCTION { format.howcited.artperiod }
{ "} {\bibartperiodhowcited}" format.endnote * }

FUNCTION {format.proceed.organization}
{  organization empty$
    { "" }
    { organization " \organizationname {}" * }
   if$
}

% NEW 0.5e titleaddon
FUNCTION {format.titleaddon}
{ title empty$
  { "" }
  { titleaddon empty$
       { "" }
       { titleaddon "\bibatsep\ " * }
    if$
  }
  if$
}


FUNCTION {format.title}
{ title empty$
      { "" }
      { "\bibtfont {" title check.punct.instead.of.add.period * format.titleaddon * }
  if$
}

FUNCTION {format.artperiodincoll.title}
{ title empty$
      { "" }
      { "\bibapifont {" title check.punct.instead.of.add.period *  format.titleaddon * }
  if$
}

FUNCTION {format.volumetitle}
{ volumetitle empty$
  { "" }
  { volume empty$
      { "There's a volumetitle but no volume in " cite$ * warning$ volumetitle ", " * }
      { volumetitle ", " * }
    if$
  }
 if$
}

FUNCTION {add.extra.label}
{ extra.label "" =
    'skip$
    { "\bibel {" extra.label * "}" * * }
  if$
}

FUNCTION {format.date}
{ year empty$
  { month empty$
       { "" }
       { "There's a month but no year in " cite$ * warning$  month  }
    if$
  }
  { month empty$
       { edition empty$
            'skip$
            { "\jbssedbd {" convert.edition.superscript extract.num * "}" * * }
         if$
         year
         add.extra.label
       }
       { month " " *
         edition empty$
            'skip$
            { "\jbssedbd {" convert.edition.superscript extract.num * "}" * * }
         if$
         year *
         add.extra.label
       }
    if$
  }
  if$
}

FUNCTION {format.update}
{ updated missing$ not
     { "\updatesep {} \updatename {} " * updated * }
     'skip$
  if$
}

FUNCTION {oaddress.opublisher.oyear.format}
{ type$ "book" = type$ "inbook" = type$ "incollection" = or or
     { oyear empty$
            { opublisher empty$
                 { oaddress empty$
                     'skip$
                     { oaddress "\osep {} " * * }
                   if$
                 }
                 { oaddress empty$
                     { opublisher "\osep {} " * * }
                     { oaddress "\bpubaddr {} " * opublisher "\osep {} " * * * }
                   if$
                 }
              if$
            }
            { year empty$
                 { "oyear without year in " cite$ * warning$ }
                 'skip$
              if$
              opublisher empty$
                 { oaddress empty$
                     { oyear * "\osep {} \reprintname {}, " * }
                     { oaddress "\bibbdsep {} " * oyear "\osep {} " * * * }
                   if$
                 }
                 { oaddress empty$
                     { opublisher * "\bibbdsep {} " * oyear "\osep {} " * * }
                     { oaddress "\bpubaddr {} " * opublisher "\bibbdsep {} " * * oyear "\osep {} " * * * }
                   if$
                 }
              if$
            }
       if$
     }
     'skip$
  if$
}

FUNCTION {make.translators}
{ before.all 'output.state :=
  translator empty$
    { flanguage empty$
        { "" }
        { "\translator {}{" flanguage "l" change.case$ * "}" *
          type$ "incollection" = not
          type$ "article" = not
          and
            { "{1} " * }
            { type$ "incollection" =
                { booktitle empty$
                    { "{} " * }
                    { "{1} " * }
                  if$
                }
                { type$ "article" =
                    { "{1}" * }
                    { series empty$
                        { "{} " * }
                        { "{1} " * }
                      if$
                    }
                  if$
                }
              if$
            }
          if$
        }
      if$
    }
    { "\translator {" translator * "}" *
      flanguage empty$
        { "{}" * }
        { "{" * flanguage "l" change.case$ * "}" * }
      if$
      type$ "incollection" = not
      type$ "article" = not
      and
        { "{1} " * }
        {
          type$ "incollection" =
            { booktitle empty$
                { "{} " * }
                { "{1} " * }
              if$
            }
            { type$ "article" =
                { "{1} " * }
                { series empty$
                    { "{} " * }
                    { "{1} " * }
                  if$
                }
              if$
            }
          if$
        }
      if$
    }
  if$
  before.all 'output.state :=
}

%<*jurecobst>
FUNCTION {format.address.publisher.year}
{  publisher empty$
     { address empty$
         { institution empty$
             { "" }
             { " \apyformat {" oaddress.opublisher.oyear.format * institution "}" * }
           if$
         }
         { institution empty$
             { " \apyformat {" oaddress.opublisher.oyear.format * address "}" * }
             { " \apyformat {" oaddress.opublisher.oyear.format * address "\bpubaddr {} " * institution "}" * * }
           if$
         }
       if$
     }
     { address empty$
         { institution empty$
             { "There's only a publisher (no address) in " cite$ * warning$
               " \apyformat {" oaddress.opublisher.oyear.format * publisher "}" * }
             { " \apyformat {" oaddress.opublisher.oyear.format * publisher ", " * institution "}" * * }
           if$
         }
         { institution empty$
             { " \apyformat {" oaddress.opublisher.oyear.format * address "\bpubaddr {} " * publisher "}" * * }
             { " \apyformat {" oaddress.opublisher.oyear.format * address "\bpubaddr {} " * publisher ", " * institution "}" * * * }
           if$
         }
       if$
     }
  if$
}
%</jurecobst>

%<*jurabst|jurunsrt>
FUNCTION {checked.inst}
{ institution empty$
    { " \apyformat {" *
        oaddress.opublisher.oyear.format
    }
% CH 0.6 missing "\apyformat {" inserted, bug reported by Michael Below
    { address empty$ not
         { " \apyformat {" * }
         'skip$
      if$
    }
  if$
}

FUNCTION {format.address.publisher.year}
{  publisher empty$
     { address empty$
         { year empty$
             { "Neither address nor year in " cite$ * warning$ "" }
             { "No address in " cite$ * warning$
               institution empty$
                 { " \apyformat {" oaddress.opublisher.oyear.format format.date * "}" * }
                 { " \apyformat {" institution * "\bibbdsep {} "  * format.date "}" * * }
               if$
             }
           if$
         }
        { year empty$
            { checked.inst address "}" * }
            { checked.inst address "\bibbdsep {} " format.date * "}" * * }
          if$
        }
       if$
     }
     { address empty$
          { year empty$
                { "There's only a publisher (no address, no year) in " cite$ * warning$ publisher }
                { checked.inst publisher "\bibbdsep {} " * format.date "}" * * }
            if$
          }
          { year empty$
                { checked.inst address * "\bpubaddr {} " publisher "}" * * }%
                { checked.inst address * "\bpubaddr {} " publisher "\bibbdsep {} " * format.date "}" * * * }
            if$
          }
       if$
     }
  if$
}
%</jurabst|jurunsrt>

FUNCTION {format.howpublished.address.year}
{ howpublished empty$
     { address empty$
%<*jurecobst>
          { "No address in " cite$ warning$ }
%</jurecobst>
%<*jurabst|jurunsrt>
          { year empty$
               { "Neither address nor year in " cite$ * warning$ "" }
% CH 0.6  suggested by R.S.
%               { "No address in " cite$ * warning$ year }
               { "No address in " cite$ * warning$ format.date }
            if$
          }
%</jurabst|jurunsrt>
%<*jurecobst>
          { " \apyformat {" oaddress.opublisher.oyear.format address * "}" * }
%</jurecobst>
%<*jurabst|jurunsrt>
          { " \apyformat {" oaddress.opublisher.oyear.format address * "\bibbdsep {} " * format.date "}" * * }
%</jurabst|jurunsrt>
       if$
     }
     { address empty$
%<*jurecobst>
          { "There's only a howpublished (no address) in " cite$ * warning$ " \apyformat {" oaddress.opublisher.oyear.format howpublished * "}" * }
%</jurecobst>
%<*jurabst|jurunsrt>
          { year empty$
               { "There's only a howpublished (no address, no year) in " cite$ * warning$ howpublished }
               { " \apyformat {" oaddress.opublisher.oyear.format howpublished * "\bibbdsep {} " * format.date "}" * * }
            if$
          }
%</jurabst|jurunsrt>
%<*jurecobst>
          { " \apyformat {" oaddress.opublisher.oyear.format address * "\bpubaddr {} " * howpublished "}" * * }
%</jurecobst>
%<*jurabst|jurunsrt>
          { year empty$
               { " \apyformat {" oaddress.opublisher.oyear.format address * "\bpubaddr {} " * howpublished "}" * * }
               { " \apyformat {" oaddress.opublisher.oyear.format address * "\bpubaddr {} " * howpublished * "\bibbdsep {} " * format.date "}" * * }
            if$
          }
%</jurabst|jurunsrt>
       if$
     }
  if$
}

FUNCTION {tie.or.space.connect}
{ duplicate$ text.length$ #4 <
     { "~" }
     { " " }
  if$
  swap$ * *
}

FUNCTION {bibvol.tie.or.space.connect}
{ duplicate$ text.length$ #4 <
     { "~" }
     { "{} " }
  if$
  swap$ * *
}

FUNCTION {format.btitle}{ title emphasize format.titleaddon * }

FUNCTION {format.btitle.vol}
{ number empty$
   { series empty$
        { volume empty$
             { title emphasize format.titleaddon * }
             {
               title emphasize format.titleaddon * " \volumeformat {" volume * "} " * *
             }
          if$
        }
        { volume empty$
             { title emphasize format.titleaddon *  }
             {
               title emphasize format.titleaddon * "\volumeformat {" volume * "} " * * series "\bibatsep\ " * *
             }
          if$
        }
     if$
   }
   { title emphasize format.titleaddon * }
  if$
}

FUNCTION {format.btitle.vol.inbook}
{ number empty$
   { series empty$
       { volume empty$
           { "\bibapifont {" title check.punct.instead.of.add.period * format.titleaddon * }
           { "\bibapifont {" title check.punct.instead.of.add.period * format.titleaddon *
             " \volumeformat {" volume * "} " * *
           }
         if$
       }
       { volume empty$
           { "\bibapifont {" title check.punct.instead.of.add.period * format.titleaddon * }
           { series emphasize
             "\volumeformat {" volume * "} " * *
             "\bibapifont {" title check.punct.instead.of.add.period * format.titleaddon * * }
         if$
       }
     if$
   }
   { "\bibapifont {" title check.punct.instead.of.add.period * format.titleaddon * }
  if$
}

FUNCTION {format.url}
{ url empty$
  { "" }
  { author empty$ title empty$ and
        'skip$
        { " " * }
    if$
    urldate empty$
        {"\jburluse {" cite$ * "}" * }
        {"\jburluse {" cite$ * "}\bibbudcsep {}\urldatecomment " * urldate * }
    if$
  }
  if$
}

FUNCTION {format.naked.url}
{ url empty$
  { "" }
  { urldate empty$
    { title empty$
         'skip$
         { title emphasize * }
      if$
      "\jburluse {" cite$ * "}" *
    }
    { title empty$
         'skip$
         { title emphasize * }
      if$
      "\jburluse {" cite$ * "}\bibbudcsep {}\urldatecomment " * urldate *
    }
  if$
  }
  if$
}

FUNCTION {format.series.number}
{ volume empty$
  { number empty$
     { series empty$
          { "" }
          { " \numberandseries {}{" series * "}" * }
       if$
     }
     { series empty$
         { " \numberandseries {" number * "}{}" * "There's a number but no series in " cite$ * warning$ }
         { " \numberandseries {" number * "}{" * series "}" * * }
       if$
     }
    if$
   }
   { series empty$
      { "" }
      { type$ "proceedings" =
          { " \numberandseries {}{" series * "}" * } % { " (" series * ")" * }
          { "" }
        if$
      }
     if$
   }
  if$
}

FUNCTION {first.ed} { "\firstedname" }
FUNCTION {second.ed}{ "\secondedname" }
FUNCTION {third.ed} { "\thirdedname" }
FUNCTION {fourth.ed}{ "\fourthedname" }
FUNCTION {fifth.ed} { "\fifthedname" }
FUNCTION {th.ed}    { "\thedname" }

FUNCTION {convert.edition}
{ edition extract.num "l" change.case$ 's :=
  s "first" = s "1" = or
  { first.ed 't := }
  { s "second" = s "2" = or
    { second.ed 't := }
    { s "third" = s "3" = or
      { third.ed 't := }
      { s "fourth" = s "4" = or
        { fourth.ed 't := }
        { s "fifth" = s "5" = or
          { fifth.ed 't := }
          { s #1 #1 substring$ is.num
            { s th.ed * 't := }
            { edition 't := }
            if$
          }
          if$
        }
        if$
      }
      if$
    }
    if$
  }
  if$
  t
}

FUNCTION {format.edition}
{ edition empty$
     { "" }
     { "\jbedition {" * convert.edition "~\editionname {}\jbaensep} " * }% dot or not ???????
  if$
}

% CH 0.6 tie.or.space.connect removed, superfluous space inserted
FUNCTION { format.isbn.issn }
{ isbn empty$
   { issn empty$
      { "" }
      { "\jbissn {" issn n.dashify * "}" * }
     if$
   }
   { "\jbisbn {" isbn n.dashify * "}" * }
  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$
     { "" }
     { " \jbPages{" pages n.dashify * "}" *  }
  if$
}

FUNCTION {multi.pagerange.check}
{ 't :=
  #0 'multiresult :=
  { multiresult not
    t empty$ not
    and
  }
  { t #1 #1 substring$
    duplicate$ "-" =
    swap$ duplicate$ "b" =
    swap$ "/" = or or
  { #1 'multiresult := }
  { t #2 global.max$ substring$ 't := }
    if$
  }
  while$
  multiresult
}

FUNCTION {check.missing.pages}
{ pages empty$
    { "Empty pages in " cite$ * warning$ }
    { pages multi.pagerange.check 
        { "" * }
        { type$ "article" = type$ "periodical" = or  
              { "There's only a starting page, no pagerange in " cite$ * warning$ }
              'skip$
          if$ 
        }
      if$
    }
  if$
}

FUNCTION {format.pages.book}
{ pages empty$
  { "" }
  { " \jbpages {" pages " \bibtotalpagesname}" *}
  if$
}

FUNCTION {format.totalpages}
{ totalpages empty$
  { "" }
  {
   ", " totalpages "~\bibtotalpagesname" * *
  }
  if$
}

FUNCTION {format.vol.year.num.pages}
{ volume empty$
        { "" }
        { " \artvolumeformat {" volume * "}" *
          year empty$
              { "There's a volume but no year in " cite$ * warning$ }
              'skip$
          if$
        }
  if$
%<*jurabst|jurunsrt>
  month empty$
       'skip$
       { "\ " month * * }
  if$
  year empty$
      'skip$
      { " \artyearformat {" year * add.extra.label "}" * * }
  if$
%</jurabst|jurunsrt>
%<*jurecobst>
  number empty$
        'skip$
        { "\artnumberformat {" number * "}" * * }
  if$
%</jurecobst>
%<*jurabst|jurunsrt>
  number empty$
        'skip$
        { "\artnumberformat {" number * "}" * * }
  if$
%</jurabst|jurunsrt>
  pages empty$
       'skip$
       { duplicate$ empty$
                   { pop$ format.pages }
                   { "" format.pages * * }
         if$
       }
  if$
}

FUNCTION {format.vol.bracedyear.num.pages}
{ volume empty$
        { "" }
        { " \pervolumeformat {" volume * "}" *
          year empty$
              { "There's a volume but no year in " cite$ * warning$ }
              'skip$
          if$
        }
  if$
%<*jurabst|jurunsrt>
  year empty$
      'skip$
      { " \peryearformat {" year * add.extra.label "}" * * }
  if$
  month empty$
       'skip$
       { ", " month * * }
  if$
%</jurabst|jurunsrt>
%<*jurecobst>
  number empty$
        'skip$
        { volume empty$
                { "" * }
                { ", " * }
          if$
          "\pernumberformat {" number * "}" * *
    }
  if$
%</jurecobst>
%<*jurabst|jurunsrt>
  number empty$
        'skip$
        { ", \pernumberformat {" number * "}" * * }
  if$
%</jurabst|jurunsrt>
  pages empty$
       'skip$
       { duplicate$ empty$
                   { pop$ format.pages }
                   { "" format.pages * * }
         if$
       }
  if$
}

FUNCTION {format.chapter.pages}
{ chapter empty$
  'format.pages
    { type empty$
      { "\unskip.\,-- \bibchapterlongname" }
      { "\unskip.\,-- " type * }
    if$
    chapter tie.or.space.connect
    pages empty$
      'skip$
      { format.pages * }
    if$
    }
  if$
}

FUNCTION {format.booktitleaddon}
{ booktitle empty$
  { "" }
  { booktitleaddon empty$
       { "" }
       { booktitleaddon }
    if$
  }
  if$
}

FUNCTION {format.incoll.editor.booktitle}
{ booktitle empty$
  { "" }
  { editor empty$
    { volume empty$
        { "\incolledformat {}{}{" booktitle incollbooktitlemarkup format.booktitleaddon * * "}{}" *
          booktitleaddon empty$
            { "{} " * }
            { "{1} " * }
          if$
        }
        { "\incolledformat {}{}{" booktitle incollbooktitlemarkup format.booktitleaddon * * "}{" * volume * "}" *
            booktitleaddon empty$
              { "{} " * }
              { "{1} " * }
            if$
        }
      if$
    }
    { volume empty$
         { "\incolledformat {"
            editor empty$
               { "" }
               { editor format.editor.names "}" * *
                 editortype empty$
                   { editor num.names$ #1 >
                         { "{\edfont {\editorsname}}{" * }
                         { "{\edfont {\editorname}}{" * }
                     if$
                   }
                   { "{\edfont {(" * editortype * ")}}{" * }
                 if$
               }                
            if$
            booktitle incollbooktitlemarkup * format.booktitleaddon * "}{}" *
            booktitleaddon empty$
              { "{} " * }
              { "{1} " * }
            if$
         }
         { "\incolledformat {" *
            editor empty$
               { "" }
               { editor format.editor.names "}" * *
                 editortype empty$
                   { editor num.names$ #1 >
                         { "{\edfont {\editorsname}}{" * }
                         { "{\edfont {\editorname}}{" * }
                     if$
                   }
                   { "{\edfont {(" * editortype * ")}}{" * }
                 if$
               }
            if$
            booktitle incollbooktitlemarkup * format.booktitleaddon * "}{" volume * "}" *
            booktitleaddon empty$
              { "{} " * }
              { "{1} " * }
            if$
         }
      if$
    }
    if$
  }
  if$
}

FUNCTION {format.tr.number.jur}
{ type empty$
   { number empty$
     { " -- \technicalreportname {} " }
     { "~(" number * ").\,-- \technicalreportname {} " * }
     if$
   }
   { number empty$
     { " -- " type  * }
     { "~(" number * ").\,-- " type * " " * * }
     if$
   }
  if$
}

FUNCTION {format.article.crossref.bracedyear}
{ key empty$
    { journal empty$
        { "Need key or journal for " cite$ * " to crossref " * crossref * warning$ "" }
        { "\bibJTsep\bibjtfont {" journal * check.punct.instead.of.add.period.art *  }
      if$
      volume empty$
        { "No volume in " cite$ * warning$ }
        { " \pervolumeformat {" volume * "} " *  }
      if$
%<*jurabst|jurunsrt>
      year empty$
        { "No year in " cite$ * warning$ }
        { "\peryearformat {" year * add.extra.label "}" * * }
      if$
%</jurabst|jurunsrt>
      pages empty$
        'skip$
        { duplicate$ empty$
            { pop$ format.pages }
            { format.pages * }
          if$
        }
      if$
    }
    { "" key * }
  if$
  "\ \protect\jbcrossrefchecked {" * crossref * "}\unskip" *
}

FUNCTION {format.article.crossref}
{ key empty$
    { journal empty$
        { "Need key or journal for " cite$ * " to crossref " * crossref * warning$ "" }
        { "\bibJTsep\bibjtfont {" journal * check.punct.instead.of.add.period.art *  }
      if$
    }
    { "" key * }
  if$
  year empty$
      'skip$
      { year * }
  if$
  " \protect\jbcrossrefchecked {" crossref * "}" *
}

FUNCTION {format.book.crossref}
{ 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$ "" * }
      { "" * }
      if$
    }
    { key * }
    if$
  }
  { "" * }
  if$
  volume empty$
  { "Empty volume in " cite$ * "'s crossref of " * crossref * warning$ ""
    " \protect\jbcrossrefchecked {" * crossref * "}\unskip" * }
  { " \protect\jbcrossrefchecked[" * volume * "]{" * crossref "}\unskip" * }
  if$
}

FUNCTION {format.incoll.inproc.crossref}
{ " \protect\jbincollcrossref {" * crossref * "}" *
  editor empty$
     { "{}" * }
     { "{1}" * }
  if$
 format.pages % *<== 0.5f removed too.
}

FUNCTION { format.editors.organization }
{ organization empty$
    'skip$
    { type$ "misc" =
        { organization }
        { author empty$
            { editor empty$
                { " " organization * " \organizationname {}" * }
                { "; " organization * " \organizationname {}" * }
              if$
            }
            { "; " organization * " \organizationname {}" * }
          if$
        }
      if$
    }
  if$
}

% NEW 0.6
FUNCTION {format.address.organization.manual}
{ author empty$
    { organization empty$
        { address empty$ 
             'skip$
             { address output part.of.sentence
               year empty$ not { "\bibbdsep {}" *} 'skip$ if$
             }
          if$
        }
        'skip$ 
      if$
    }
    { address empty$ 
         { organization empty$
             'skip$
             { organization output part.of.sentence 
               year empty$ not { "\bibbdsep {}" *} 'skip$ if$ 
             }
           if$
         }
         { organization empty$
             { address output part.of.sentence }
             { address "\bpubaddr {} " *  organization * output part.of.sentence }
           if$
           year empty$ not { "\bibbdsep {}" *} 'skip$ if$
         }
      if$
    }
  if$
}

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.artperiodincoll.title "title" output.check
  crossref missing$
      { journal article.in.journal output.nonnull
        new.sentence
        format.vol.year.num.pages output
      }
      { format.article.crossref output.nonnull }
  if$
  format.url output
  format.note
  format.isbn.issn output
  format.howcited.artperiod output
  check.missing.pages
  fin.entry.endnote
}

FUNCTION {commented}
{ output.bibitem
  author empty$
    { editor empty$
        { format.founders }
        { format.founders format.editors "editor" output.check }
      if$
    }
    { editor empty$
        { format.authors format.founders output.nonnull }
        { format.authors format.founders format.editors output.nonnull }
      if$
    }
  if$
  set.after.author.sep output
  crossref missing$
    { format.btitle.vol "title" output.check }
    { format.btitle "title" output.check }
  if$
  format.volumetitle output
  format.edition output
  format.address.publisher.year "publisher" output.check
  format.update
  new.sentence
  crossref missing$
    { format.series.number output }
    { format.book.crossref output.nonnull }
  if$
  format.url output
  format.pages output
  format.note
  format.howcited.comment output
  fin.entry.endnote
}

FUNCTION {periodical}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.artperiodincoll.title "title" output.check
  crossref missing$
    { journal article.in.journal output.nonnull
      new.sentence
      format.vol.bracedyear.num.pages output
    }
    { new.sentence format.article.crossref.bracedyear output.nonnull }
  if$
  format.url output
  format.note
  format.isbn.issn output
  format.howcited.artperiod output
  fin.entry.endnote
}

FUNCTION {book}
{ output.bibitem
  author empty$
    { editor empty$
        { "" "author and editor" output.check }
        { format.editors output.nonnull }
      if$
    }
    { editor empty$
        { format.authors output.nonnull }
        { format.authors "\jbtiafed {" format.editors * "}" * output.nonnull }
      if$
    }
  if$
  set.after.author.sep output
  crossref missing$
    { format.btitle.vol "title" output.check }
    { format.btitle "title" output.check }
  if$
  author empty$ not editor empty$ not and
      { "\jbedafti {\edbyname {} " editor * "," * * "} " * }
      'skip$
  if$
  make.translators output
  format.volumetitle output
  format.edition output
  format.address.publisher.year "publisher" output.check
  new.sentence
  format.juradiss.book output
  crossref missing$
    { format.series.number output }
    { format.book.crossref output.nonnull }
  if$
  format.url output
  format.pages output
  format.totalpages output
  format.note
  format.isbn.issn output
  format.howcited output
  fin.entry.endnote
}

FUNCTION {inbook}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check }
    { editor empty$
        { format.authors output.nonnull }
        { format.authors format.editors output.nonnull }
      if$
    }
  if$
  set.after.author.sep output
  crossref missing$
  { chapter empty$
      { "There's no chapter in " cite$ * warning$ "" * }
      { type empty$
          { "\Bibchaptername{}" }
          { type }
        if$
        chapter tie.or.space.connect " In " * *
      }
    if$
    format.btitle.vol.inbook "title" output.check
    make.translators output
    format.volumetitle output
    format.edition output
    format.address.publisher.year "publisher" output.check
    new.sentence
    format.series.number output
    format.url output
    format.pages "pages" output.check
    format.note
    format.isbn.issn output
  }
  { chapter empty$
      { "There's no chapter in " cite$ * warning$ "" *
        format.btitle.vol.inbook "title" output.check
      }
      { type empty$
        { "\Bibchaptername{}" }
        { type }
      if$
        chapter tie.or.space.connect "" * *
      }
    if$
    format.volumetitle output
    format.book.crossref output.nonnull
    format.url output
    format.pages "pages" output.check
    format.note
  }
  if$
  part.of.sentence
  format.howcited output
  fin.entry.endnote
}

FUNCTION {incollection}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.artperiodincoll.title "title" output.check
  make.translators output
  crossref missing$
    { format.incoll.editor.booktitle "booktitle" output.check
      format.volumetitle output
      format.edition output
      format.address.publisher.year "publisher" output.check
      new.sentence
      format.series.number output
      format.url output
      format.isbn.issn output
      part.of.sentence
      format.chapter.pages output
      format.note
    }
    { format.volumetitle output
      format.incoll.inproc.crossref output.nonnull
      format.url output
      format.note
    }
  if$
  format.howcited output
  check.missing.pages
  fin.entry.endnote
}

FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.artperiodincoll.title "title" output.check
  crossref missing$
  { format.incoll.editor.booktitle "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$
      'skip$
      { format.series.number output }
    if$
    format.url output
    format.note
    format.isbn.issn output
    part.of.sentence
    format.pages output
  }
  { format.incoll.inproc.crossref output.nonnull
    format.url output
    format.note
  }
  if$
  format.howcited output
  fin.entry.endnote
}

FUNCTION {conference}{inproceedings}

FUNCTION {manual}
{ output.bibitem
  author empty$
    { organization empty$
        'skip$
        { "\bibnf{" organization * "} {} {} {} {}" * output.nonnull }
      if$
    }
    { format.authors output.nonnull }
  if$
  set.after.author.sep output
  format.btitle "title" output.check
  format.edition output
% NEW 0.6
  format.address.organization.manual
  format.date output
  pages set.period.dash.check
  format.pages.book output
  format.url output
  format.note
  format.howcited output
  fin.entry.endnote
}

FUNCTION {mastersthesis}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.btitle "title" output.check
  format.thesis output
  set.comma.pages.check
  pages new.sentence.checka
  format.pages output
  format.url output
  format.note
  format.howcited output
  fin.entry.endnote
}

FUNCTION {phdthesis}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.btitle "title" output.check
  format.thesis output
  set.comma.pages.check
  pages new.sentence.checka
  format.pages output
  format.url output
  format.note
  format.howcited output
  fin.entry.endnote
}

FUNCTION {jurthesis}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.btitle "title" output.check
  format.thesis output
  set.comma.pages.check
  pages new.sentence.checka
  format.pages output
  format.url output
  format.note
  format.howcited output
  fin.entry.endnote
}

FUNCTION {booklet}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.title "title" output.check
  format.howpublished.address.year output
  format.note
  format.url output
  format.howcited output
  fin.entry.endnote
}

FUNCTION {misc}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.title output
  format.howpublished.address.year output
  format.note
  format.url output
  format.howcited output
  fin.entry.endnote
}

FUNCTION {proceedings}
{ output.bibitem
  editor empty$
  { organization empty$
     'skip$
     { "\biblnfont {" organization * " \organizationname}" * output }
    if$
  }
  { format.editors output.nonnull }
  if$
  set.after.author.sep output
  format.btitle "title" output.check
  new.sentence
  editor empty$
    'skip$
    {  format.proceed.organization output }
  if$
  new.sentence
  format.series.number output.nonnull
  volume empty$
     { "" output.nonnull }
     { "\volumeformat {" volume * "} " * "volume" output.check }
  if$
  format.address.publisher.year "publisher" output.check
  pages set.period.dash.check
  format.pages.book output
  format.url output
  format.note
  format.isbn.issn output
  format.howcited output
  fin.entry.endnote
}

FUNCTION {techreport}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check }
    { editor empty$
        { format.authors output.nonnull }
        { format.authors format.editors output.nonnull }
      if$
    }
  if$
  set.after.author.sep output
  format.title "title" output.check
  institution new.sentence.checka
  format.address.publisher.year output
  number new.sentence.checka
  format.tr.number.jur "number" output.check
  pages set.period.dash.check
  format.pages.book output
  format.url output
  format.note
  format.isbn.issn output
  format.howcited output
  fin.entry.endnote
}

FUNCTION {www}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.naked.url output
  format.howcited output
  fin.entry.endnote
}

FUNCTION {lexicon}
{ output.bibitem
  set.after.author.sep output
  crossref missing$
    { format.btitle.vol "title" output.check }
    { format.btitle "title" output.check }
  if$
  author empty$
      { editor empty$
            'skip$
            { "\edbyname{} " * editor format.editor.names "," * *  }
        if$
      }
      { "\byname{} " author format.names * "," * * }
  if$
  make.translators output
  format.volumetitle output
  format.edition output
  format.address.publisher.year "publisher" output.check
  new.sentence
  format.juradiss.book output
  crossref missing$
    { format.series.number output }
    { format.book.crossref output.nonnull }
  if$
  format.url output
  format.pages output
  format.totalpages output
  format.note
  format.isbn.issn output
  format.howcited output
  fin.entry.endnote
}

% NEW 0.6
STRINGS { last.archive last.subarchive }

% NEW 0.6
FUNCTION {init.last.archive }
{ "" 'last.archive :=
  "" 'last.subarchive := }

% NEW 0.6
FUNCTION {archival}
{ output.bibitem
  archive empty$
    { "" 'last.archive := }
    { archive last.archive =
        { "} {" archive format.name.sig * "} {} {\jbsamearch{} " * *  }
        { "\bibanfont{" archive *  "archive" output.check
          shortarchive empty$
              'skip$
              { " \jbshortarchformat{" shortarchive * "}" * * }
          if$
          "}" *
          "} {" archive format.name.sig * "} {} {\jbnotsamearch{} " * *
        }
      if$
      archive 'last.archive :=
    }
  if$
  subarchive empty$
    { "" 'last.subarchive := }
    { subarchive last.subarchive =
        'skip$
        { subarchive output
          shortsubarchive empty$
              'skip$
              { " \jbshortsubarchformat{" shortsubarchive * "}" * * }
          if$
          "\jbsubarchsep{} " *
        }
      if$
      subarchive 'last.subarchive :=
    }
  if$
  sig1 empty$
     'skip$
     { "\jbarchsig {" *
       subarchive empty$
          'skip$
          { "\jbsamesubarchindent{} " * }
       if$
       sig1 *
       sig2 empty$
          'skip$
          { ". " sig2 * *
            sig3 empty$
               'skip$
               { ". " sig3 * *
                 sig4 empty$
                    'skip$
                    { ". " sig4 * * }
                 if$
               }
            if$
          }
       if$
%       pages empty$
%          'skip$
%          { " \jbPages{" pages n.dashify * "}" * * }
%       if$
       "} {" *
     }
  if$
  archname missing$
      { "}" * }
      { archname "}" * output }
  if$
  format.howcited output
  fin.entry.endnote
}

FUNCTION {unpublished}{misc}

FUNCTION {default.type}{misc}

MACRO {jan} {"\janname\ "}
MACRO {feb} {"\febname\ "}
MACRO {mar} {"\marname\ "}
MACRO {apr} {"\aprname\ "}
MACRO {may} {"\mayname\ "}
MACRO {jun} {"\junname\ "}
MACRO {jul} {"\julname\ "}
MACRO {aug} {"\augname\ "}
MACRO {sep} {"\sepname\ "}
MACRO {oct} {"\octname\ "}
MACRO {nov} {"\novname\ "}
MACRO {dec} {"\decname\ "}

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 {format.lab.names}
{ 's :=                                  % for two: (Jones/de~Bruijn)
   s #1 "{vv~}{ll}" format.name$         % for three: (Jones/de~Bruijn/Smith)
   s num.names$ duplicate$               % for more: (Jones et\,al.)
   #2 <
   'pop$                                 % for just one person
   { duplicate$ duplicate$
     #3 >
%     ^--- here we can determine the appearence of `et\,al.' for the _label_
     swap$ s swap$ "{ff }{vv }{ll}{ jj}" format.name$ "others" =
     or
     { pop$ "\Bibetal" * }              % for 4 or more, or last is `others'
     { #2 =
       {  "\jbbtasep " * s #2 "{vv~}{ll}" format.name$ * } % for (exactly) two
       { "\jbbfsasep " * s #2 "{vv~}{ll}" format.name$ *   % for three
         "\jbbstasep " * s #3 "{vv~}{ll}" format.name$ *
       }
       if$
     }
     if$
   }
   if$
% reintroduced in 0.51r
   year missing$
      'skip$
      { "\jbdy {" year * "}" * * }% dummy year to prevent from `1993a' and `2001b' for works by the same author
   if$
}

FUNCTION {format.editor.lab.names}
{ 's :=                                  % for two: (Jones/de~Bruijn)
  s #1 "{vv~}{ll}" format.name$         % for three: (Jones/de~Bruijn/Smith)
  s num.names$ duplicate$               % for more: (Jones et\,al.)
  #2 <
  'pop$                                 % for just one person
  { duplicate$ duplicate$
    #3 >
%    ^--- here we can determine the appearence of `et\,al.' for the _label_
    swap$ s swap$ "{ff }{vv }{ll}{ jj}" format.name$ "others" =
    or
    { pop$ "\Bibetal" * }              % for 4 or more, or last is `others'
    { #2 =
      {  "\jbbtesep " * s #2 "{vv~}{ll}" format.name$ * } % for (exactly) two
      { "\jbbfsesep " * s #2 "{vv~}{ll}" format.name$ *   % for three
        "\jbbstesep " * s #3 "{vv~}{ll}" format.name$ *
      }
      if$
    }
    if$
  }
  if$
  year missing$
      'skip$
     { "\jbdy {" year * "}" * * }% dummy year to prevent from `1993a' and `2001b' for works by the same author
  if$
}

FUNCTION {author.key.label}
{ author empty$
  { key empty$
    { cite$ #1 #3 substring$ }
      'key
    if$
  }
  { author format.lab.names }
  if$
}

FUNCTION {author.editor.key.label}
{ author empty$
  { editor empty$
    { key empty$
      { cite$ #1 #3 substring$ }
        'key
      if$
    }
    { editor format.editor.lab.names }
    if$
  }
  { author format.lab.names }
  if$
}

FUNCTION {editor.key.label}
{ editor empty$
  { key empty$
    { cite$ #1 #3 substring$ }
      'key
    if$
  }
  { editor format.editor.lab.names }
  if$
}

FUNCTION {calc.label}
{ type$ "book" = type$ "inbook" = or type$ "incollection" = or type$ "commented" = or type$ "lexicon" = or
  'author.editor.key.label
  { type$ "proceedings" =
    'editor.key.label
    'author.key.label
    if$
  }
  if$
  'label :=
}

FUNCTION {calc.dummy.label}
{ type$ "book" = type$ "inbook" = or type$ "incollection" = or type$ "commented" = or
  'author.editor.key.label
  { type$ "proceedings" =
    'editor.key.label
    'author.key.label
    if$
  }
  if$
  'dummy.label :=
}

FUNCTION {sort.format.names}
{ 's :=
  #1 'nameptr :=
  ""
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { nameptr #1 >
  { "   " * }
  'skip$
    if$
    s nameptr "{ll{ }}{  ff{ }}{ vv{ }}{  jj{ }}" format.name$ 't :=
    nameptr numnames = t "\bibnf {others} {} {} {} {}" = and
  { "\Bibetal" * }
  { t sortify * }
    if$
    nameptr #1 + 'nameptr :=
    namesleft #1 - 'namesleft :=
  }
  while$
}

FUNCTION {sort.format.title}
{ 't :=
  "A " #2
  "An " #3
    "Der " #4
    "Die " #4
      "Das " #4
      "Ein " #4
        "Eine " #5
          "The " #4 t chop.word
         chop.word
       chop.word
       chop.word
     chop.word
     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 {editor.sort}
{ editor empty$
  { key empty$
    { "to sort, need editor or key in " cite$ * warning$ "" }
    { key sortify }
    if$
  }
  { editor sort.format.names }
  if$
}

% NEW 0.6
FUNCTION {archival.sort}
{ archive empty$
   { shortarchive empty$
      { "to sort, need archive or shortarchive in " cite$ * warning$ "" }
      { shortarchive sortify }
    if$
  }
  { archive sortify }
  if$
}

FUNCTION {presort}
{ calc.label
  calc.dummy.label
%<*jurabst|jurecobst&!jurunsrt>
% NEW 0.6, contributed by Robert Schlicht
  dummy.label sortify " " *
  sortkey empty$
     { type$ "book" =
         type$ "incollection" =    or
           type$ "inbook" =        or
              type$ "commented" =  or
            'author.editor.sort
            { type$ "proceedings" =
                'editor.sort
                { type$ "archival" =
                      'archival.sort
                      'author.sort
                  if$
                }
              if$
            }
        if$
     }
% CH 0.6 sort.format.names added, analogous to jox.bst
     { sortkey sort.format.names }
  if$
  type$ "archival" = not
     { "    "
       *
       year field.or.null sortify
       *
       "    "
       *
       title field.or.null
       sort.format.title
       *
     }
     { "    "
       *
       subarchive field.or.null sortify
       *
       "    "
       *
       sig1 field.or.null sortify
       *
       "    "
       *
       sig2 field.or.null sortify
       *
       "    "
       *
       sig3 field.or.null sortify
       *
       "    "
       *
       sig4 field.or.null sortify
       *
     }
  if$
% save for later [RS]
   #1 entry.max$ substring$
   'sort.label := 
   sort.label *
% includes dummy.label [RS]
   #1 entry.max$ substring$
   'sort.key$ :=  
%</jurabst|jurecobst&!jurunsrt>
}

ITERATE {presort}

%% FUNCTION {before.sort} { "BEFORE SORT:" top$ }
%% EXECUTE {before.sort}
%% FUNCTION {print.sort.keys} {sort.key$ top$}
%% ITERATE {print.sort.keys}

%<*jurabst|jurecobst&!jurunsrt>
SORT
%</jurabst|jurecobst&!jurunsrt>

%% FUNCTION {after.sort} {"AFTER SORT:" top$}
%% EXECUTE {after.sort}
%% ITERATE {print.sort.keys}

% REMOVED 0.6 suggested by R.S.
% STRINGS { last.dummy.label next.extra } % use "w" and "x" instead

% CH 0.6 suggested by R.S. in d.c.t.t.
% INTEGERS { last.extra.num number.label }
INTEGERS { last.extra.num number.label extra.extra.num }

% NEW 0.6 suggested by RS in d.c.t.t.
FUNCTION {make.extra.label}
{ last.extra.num #122 <
     { last.extra.num #1 + }
     { extra.extra.num #0 =
         { "a" chr.to.int$ }
         { extra.extra.num #1 + }
      if$
      'extra.extra.num :=
      "a" chr.to.int$ }
  if$
  'last.extra.num :=
  extra.extra.num #0 =
     { last.extra.num int.to.chr$ }
     { extra.extra.num int.to.chr$ 'extra.label :=
       extra.label last.extra.num int.to.chr$ * }
  if$
}

% NEW 0.6 suggested by R.S. 
FUNCTION {forward.pass}
{ w dummy.label =
    { make.extra.label 'extra.label := }
    { "a" chr.to.int$ 'last.extra.num :=
       #0 'extra.extra.num :=
       "" 'extra.label :=
       dummy.label 'w :=
    }
 if$
 number.label #1 + 'number.label :=
}

FUNCTION {reverse.pass}
{ x "b" =
    { "a" 'extra.label := }
    'skip$
 if$
 extra.label 'x :=
 extra.label
 duplicate$ empty$
    'skip$
    { "" swap$ * }
 if$
 'extra.label :=
 dummy.label extra.label * 'dummy.label :=
} 

ITERATE {forward.pass}
REVERSE {reverse.pass}

% NEW 0.6, suggested by RS
FUNCTION {bib.sort.order} { sort.label  'sort.key$ := }

ITERATE {bib.sort.order}

SORT


FUNCTION {set.current.authors}
{ author empty$
  { editor empty$
    { organization empty$
      { cite$ 'current-authors := }
      { organization 'current-authors := }
      if$
    }
    { editor format.names #1 entry.max$ substring$ 'current-authors := }
%%           ^^^^^^^^^^^^ NOT format.editor.names, otherwise \jb@@arg is always = 0!!!
    if$
  }
  { author format.names #1 entry.max$ substring$ 'current-authors := }
  if$
}

STRINGS { previous-authors }

FUNCTION {initialize.previous.authors} { "" 'previous-authors := }

FUNCTION {mark.repeat.authors}
{ current-authors previous-authors =
  { #1 'repeat-authors := }
  'skip$
  if$
  current-authors 'previous-authors :=
}

ITERATE {set.current.authors}

EXECUTE {initialize.previous.authors}

ITERATE {mark.repeat.authors}

EXECUTE {initialize.previous.authors}

REVERSE {mark.repeat.authors}

FUNCTION {begin.bib}
{ preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "%" write$ newline$
%<*jurecobst>
  "% This bibliography was produced by using jureco.bst" write$ newline$
%</jurecobst>
%<*jurabst|jurunsrt>
  "% This bibliography was produced by using jurabib.bst" write$ newline$
%</jurabst|jurunsrt>
  "%" write$ newline$
  "\begin{thebibliography}{}" write$ newline$
}

EXECUTE {begin.bib}

EXECUTE {init.state.consts}

ITERATE {call.type$}

FUNCTION {end.bib}
{ newline$
  "\end{thebibliography}" write$ newline$
}

EXECUTE {end.bib}
%</jurabst|jurecobst|jurunsrt>
%<*joxbst>
% [0.1k]   new function `count.authors.or.editors' to count authors/editors,
%                wrong output, reported by Maarten Wisse
% [0.1j]   doubled commas after title and superfluous comma before brackets
%                removed (resulted by last changes), reported by Maarten Wisse
% [0.1i]   some warnings for missing authors/editors corrected, reported by Maarten Wisse
% [0.1h]   changed handling of authors/editors in @book, reported by Maaarten Wisse:
%       The golden rule with regard to editors and authors is:
%           1. no author but only editor: then the
%              editor goes before the title.
%           2. if there is an author \textbf{and}
%              an editor, then the \emph{author} goes
%              \textbf{before} the title, and the
%              \emph{editor} goes \textbf{after} it.
% [0.1g]   superfluous \bibatsep in `format.title' removed, reported by Maarten Wisse
% [0.1f]   forgotten argument of \jbbibargs inserted
% [0.1e]   \bibbudcsep introduced instead of `~-- '
% [0.1d]   \bibedinformat introduced for inline editors
% [0.1c]   \el for bibliography renamed to \bibel, some stuff for identifying authors added
% [0.1b]   format.pages added for @BOOK and @BOOKLET
%          for names which should not be recognized by BibTex, use
%               `author = {Gregory{ }the{ }Great}'
%           instead of
%               `author = {{Gregory the Great}}'
%          because of special functions for capitalizing the `von' part.
% [0.1a]   \bibAnnote stuff added
% [0.1]    jox.bst has reached beta stage
%
% [0.0.1p] spaces after control sequences added for better linebreaking
%            regarding the well known bibtex bug
% [0.0.1o] \volname added
% [0.0.1n] @incollection: `booktitleaddon' follows booktitle and volume, preceds series;
%          no \volumename if `volume' comes with citation of an essay;
%          `capitalize.von.part' added (Thanks to Oren Patashnik)
% [0.0.1m] `booktitleaddon' follows immediately booktitle, \volumename inserted in
%           `format.in.editor.booktitle.volume.voltitle'
% [0.0.1l] bug in `format.in.editor.booktitle.volume.voltitle' removed (completely rewritten,
%           error message, if no volumetitle was given); a \bpubaddr replaced by \bibbdsep in `format.publisher';
%           `format.titleaddon' added for @unpublished
% [0.0.1k] experimental noed field added, noed=1 disables output of `(ed.)', removing `textedition'
% [0.0.1j] bug in `format.in.editor.booktitle.volume.voltitle' removed (error message, if no editor was given)
% [0.0.1i] `format.endnote' added to make the `endnote' option work
% [0.0.1h] `format.in.editor.booktitle.volume.voltitle' introduced for non crossref'd incollections,
%           this makes `volformat=reversed' working for booktitle too
% [0.0.1g] `format.bvolume.btitle' for non crossref'd incollections added
% [0.0.1f] `volume' removed if volumetitle missing for incollection and inbook crossrefs
% [0.0.1e] missing year (if publisher is not given) in format.publisher.* added, volformat=reversed implemented,
%          chapter for inbook moved back to pages
% [0.0.1d] incollection adapted to give the same output with or without crossref
% [0.0.1c] comma before url for all types except @www
% [0.0.1b] First try to adapt the @in* types
% [0.0.1a] \artvolnumformat introduced, all types except the @in* adapted (oaddress.opublisher.oyear, make.translator, pseudonym etc.)
FUNCTION {version} { " v0.1k" }

ENTRY
  { address
    author
    booktitle
    chapter
    edition
    editor
    howpublished
    institution
    journal
    key
    month
    note
    number
    organization
    pages
    publisher
    school
    series
    stitle
    title
    type
    volume
    year
    url
    urldate
    volumetitle
    juratitle
    shorttitle
    juraauthor
    shortauthor
    howcited
    ssedition
    language
    titleaddon
    booktitleaddon
    editortype
    sortkey
    annote
    gender
    translator
    flanguage
    oyear
    oaddress
    opublisher
    pseudonym
    volformat
    noed
  }
  { repeat-authors }
  { label dummy.label extra.label sort.label short.list current-authors }

INTEGERS { output.state before.all mid.sentence }

FUNCTION {init.state.consts}
{ #0 'before.all :=
  #1 'mid.sentence :=
}

STRINGS { s t u v w x }

FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    { ", " * write$ }
    { write$ 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 {format.endnote}
{ note empty$
      { "" }
      { "  \jbendnote {" note * "}" * }
  if$
}

FUNCTION {format.howcited}{ before.all 'output.state := "} {\bibhowcited}" format.endnote * * }

INTEGERS { nameptr namesleft numnames }

FUNCTION {format.name.sig}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { s nameptr "{ff}{ vv}{ ll}{ jj}" format.name$ 't :=
      nameptr #1 >
        { namesleft #1 >
            { "sssss" * t * }
            {  t "others" =
                { " et al." * }
                { "" * t * }
              if$
            }
          if$
        }
        't
      if$
    nameptr #1 + 'nameptr :=
    namesleft #1 -  'namesleft :=
  }
  while$
}

FUNCTION {format.snd.editors}
{ editor empty$
   { "" * }
   { author empty$
        { editortype empty$
             { editor num.names$ #1 >
                 { "\snded {\sndeditorsname}" * }
                 { "\snded {\sndeditorname}" * }
               if$
             }
             { "\snded {(" editortype * ")}" * * }
          if$
        }
        'skip$
    if$
   }
  if$
}

FUNCTION {count.authors.or.editors}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { "" 't :=
      nameptr #1 >
        { namesleft #1 >
            { "" * }
            { "s" * } % more than one author/editor, append `s'
          if$
        }
        't
      if$
    nameptr #1 + 'nameptr :=
    namesleft #1 - 'namesleft :=
  }
  while$
}

FUNCTION {set.after.author.sep}
{ before.all 'output.state :=
  author missing$
     { editor missing$
          { organization missing$
                 { "} {empty} {} {" }
                 { "} {" organization "} {org} {" * * }
            if$
          }
          { "} {" editor format.name.sig * "} {ed" editor count.authors.or.editors "} {" * * * }
      if$
     }
     { "} {" author format.name.sig * "} {au" author count.authors.or.editors "} {" * * * }
  if$
  author empty$
      { format.snd.editors }
      'skip$
  if$
  "" *
}

FUNCTION {format.note}
{ note empty$
      'skip$
      { output.state before.all =
          { "\jbnote {}{" * note * "}" * }
          { " \jbnote {1}{" * note * "}" * }
       if$
      }
  if$
}

% FUNCTION {add.blank}{  " " * before.all 'output.state := }

FUNCTION {not}
{   { #0 }
    { #1 }
  if$
}

FUNCTION {and}
{   'skip$
    { pop$ #0 }
  if$
}

FUNCTION {or}
{   { pop$ #1 }
    'skip$
  if$
}

FUNCTION {non.stop}
{ duplicate$
   "}" *
   #-1 #1 substring$ "." =
}

FUNCTION {field.or.null}
{ duplicate$ empty$
    { pop$ "" }
    'skip$
  if$
}

FUNCTION {capitalize}
{ "u" change.case$ "t" change.case$ }

FUNCTION {space.word}
{ " " swap$ * " " * }

FUNCTION {bbl.edition}
{ "\editionname {} " }

FUNCTION {bbl.vol}
{ "\volname {}" }

FUNCTION {bbl.volume}
{ "\volumename {}" }

FUNCTION {bbl.of}
{ " \volumeofname {} " }

FUNCTION {bbl.number}
{ "\numbername" }

FUNCTION {bbl.in}
{ "\incollinname {} " }

FUNCTION {bbl.in.series}
{ "\inseriesname {}" }

FUNCTION {bbl.chapter}
{ "\bibchaptername {}" }

FUNCTION {bbl.techrep}
{ "\technicalreportname {}" }

FUNCTION {bbl.mthesis}
{ "\mastersthesisname {}" }

FUNCTION {bbl.phdthesis}
{ "\phdthesisname {}"}

MACRO {jan} {"\janname"}
MACRO {feb} {"\febname"}
MACRO {mar} {"\marname"}
MACRO {apr} {"\aprname"}
MACRO {may} {"\mayname"}
MACRO {jun} {"\junname"}
MACRO {jul} {"\julname"}
MACRO {aug} {"\augname"}
MACRO {sep} {"\sepname"}
MACRO {oct} {"\octname"}
MACRO {nov} {"\novname"}
MACRO {dec} {"\decname"}

FUNCTION {checked.emph.format}
{ type$ "book" = type$ "inbook" = type$ "proceedings" = type$ "inproceedings" = or or or
      { "\bibtfont {" }
      { "\bibapifont {"  }
  if$
}

FUNCTION {emphasize}
{ duplicate$ empty$
    { pop$ "" }
    { checked.emph.format swap$ * "}" * }
  if$
}

FUNCTION {b.emphasize}
{ duplicate$ empty$
    { pop$ "" }
    { "\bibbtfont {" swap$ * "}" * }
  if$
}

FUNCTION {write.url}
{ url empty$
      { urldate empty$
            'skip$
            { "there's an urldate, but no url in " cite$ * warning$ }
        if$
      }
      { type$ "www" =
           'skip$
           { ", " * }
        if$
        title empty$ output.state before.all = and
            { "" * mid.sentence 'output.state := }
            { " " * }
        if$
        urldate empty$
                { "\jburluse {" cite$ * "}" * * }
                { "\jburluse {" cite$ * "}\bibbudcsep {}\urldatecomment " * urldate * * }
        if$
      }
  if$
}

FUNCTION {lastnamemarkup}
{ duplicate$ empty$
     { pop$ "" }
     { "\bibnf {" swap$ * "}" * }
  if$
}

FUNCTION {editorlastnamemarkup}
{ duplicate$ empty$
     { pop$ "" }
     { author empty$
         { "\biblenf {" swap$ * "}" * }
         { "\bibenf {" swap$ * "}" * }
       if$
     }
  if$
}

FUNCTION {othermarkup}
{ duplicate$ empty$
       { pop$ " {}" }
       { " {" swap$ * "}" * }
  if$
}

FUNCTION {indexmarkup}
{ duplicate$ empty$
       { pop$ "{}" }
       { "{" swap$ * "}" * }
  if$
}

FUNCTION {format.names.for.index}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { s nameptr "{ll}" format.name$ 't := t indexmarkup 't :=
    s nameptr "{ff}" format.name$ indexmarkup 'u :=
    s nameptr "{f.}" format.name$ indexmarkup 'v :=
    s nameptr "{vv}" format.name$ indexmarkup 'w :=
    s nameptr "{jj}" format.name$ indexmarkup 'x :=
    t u * v * w * x * 't :=
    t "{others}{}{}{}{}" =
      'skip$
      { nameptr #1 >
          { namesleft #1 >
               { "; " * t * }
               { 
%                 numnames #2 >
%                   { "; " * }
%                   'skip$
%                 if$
                 t "others" =
                    'skip$
                    { "; " * t * }
                 if$
                }
            if$
          }
          't
       if$
      }
    if$
    nameptr #1 + 'nameptr :=
    namesleft #1 -  'namesleft :=
  }
  while$
}

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { s nameptr "{ll}" format.name$ 't := t lastnamemarkup 't :=
    s nameptr "{ff}" format.name$ othermarkup 'u :=
    s nameptr "{f.}" format.name$ othermarkup 'v :=
    s nameptr "{vv}" format.name$ othermarkup 'w :=
    s nameptr "{jj}" format.name$ othermarkup 'x :=
    t u * v * w * x * 't :=
     nameptr #1 >
      { namesleft #1 >
          { numnames #3 >
                { "" * }
                { numnames #3 <
                     { "\Bibbtasep " * t * }
                     { "\Bibbfsasep " * t * }
                  if$
                }
            if$
          }
          { t "\bibnf {others} {} {} {} {}" =
            numnames #3 > or
               { "\bibimfont {\Bibetal}" * }
               { numnames #3 <
                   { "\Bibbtasep " * t * }
                   { "\Bibbstasep " * t * }
                 if$
               }
            if$
          }
        if$
      }
     't
    if$
    nameptr #1 + 'nameptr :=
    namesleft #1 -  'namesleft :=
  }
  while$
}

FUNCTION {format.editor.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { s nameptr "{ll}" format.name$ 't := t editorlastnamemarkup 't :=
    s nameptr "{ff}" format.name$ othermarkup 'u :=
    s nameptr "{f.}" format.name$ othermarkup 'v :=
    s nameptr "{vv}" format.name$ othermarkup 'w :=
    s nameptr "{jj}" format.name$ othermarkup 'x :=
    t u * v * w * x * 't :=
     nameptr #1 >
      { namesleft #1 >
          { numnames #3 >
                { "" * }
                { numnames #3 <
                     { "\Bibbtasep " * t * }
                     { "\Bibbfsasep " * t * }
                  if$
                }
            if$
          }
          { t "\bibenf {others} {} {} {} {}" =
            t "\biblenf {others} {} {} {} {}" = or
            t "\bibenf {others} {} {} {} {} \editorsname" = or
            t "\biblenf {others} {} {} {} {} \editorsname" = or
            numnames #3 > or
               { "\bibimfont {\Bibetal}" * }
               { numnames #3 <
                   { "\Bibbtasep " * t * }
                   { "\Bibbstasep " * t * }
                 if$
               }
            if$
          }
        if$
      }
     't
    if$
    nameptr #1 + 'nameptr :=
    namesleft #1 -  'namesleft :=
  }
  while$
}

FUNCTION {format.authors}
{ author empty$
    { pseudonym empty$
        { "" }
        { "[" pseudonym format.names * "]" * }
      if$
    }
    { author format.names
      pseudonym empty$
        'skip$
        { " [" * pseudonym format.names * "]" * }
      if$
    }
  if$
}

FUNCTION {format.editors}
{ editor empty$
    { pseudonym empty$
         { "" }
         { "[" pseudonym format.editor.names * "]" * }
      if$
    }
    { editor format.editor.names
      pseudonym empty$
        'skip$
         { " [" * pseudonym format.editor.names * "]" * }
      if$
      noed missing$
          { editor num.names$ #1 >
                 { editortype empty$
                      { "\bibedformat {\editorsname}" * }
                      { "\bibedformat {" * editortype * "}" * }
                   if$
                 }
                 { editortype empty$
                      { "\bibedformat {\editorname}" * }
                      { "\bibedformat {" * editortype * "}" * }
                   if$
                 }
            if$
          }
          { noed 's :=
            s "1" =
                 'skip$
                 { editor num.names$ #1 >
                        { editortype empty$
                             { "\bibedformat {\editorsname}" * }
                             { "\bibedformat {" * editortype * "}" * }
                          if$
                        }
                        { editortype empty$
                             { "\bibedformat {\editorname}" * }
                             { "\bibedformat {" * editortype * "}" * }
                          if$
                        }
                   if$
                 }
            if$
          }
      if$
    }
  if$
}

FUNCTION {format.in.editors}
{ editor empty$
    { pseudonym empty$
        'skip$
          { "[" pseudonym format.editor.names * "]" * }
      if$
    }
    { editor format.editor.names
      pseudonym empty$
        'skip$
         { " [" * pseudonym format.editor.names * "]" * }
      if$
      noed missing$
          { editor num.names$ #1 >
                 { editortype empty$
                      { " \bibedinformat {\editorsname}" * }
                      { " \bibedinformat {" * editortype * "}" * }
                   if$
                 }
                 { editortype empty$
                      { " \bibedinformat {\editorname}" * }
                      { " \bibedinformat {" * editortype * "}" * }
                   if$
                 }
            if$
          }
          { noed 's :=
            s "1" =
                 'skip$
                 { editor num.names$ #1 >
                        { editortype empty$
                             { " \bibedinformat {\editorsname}" * }
                             { " \bibedinformat {" * editortype * "}" * }
                          if$
                        }
                        { editortype empty$
                             { " \bibedinformat {\editorname}" * }
                             { " \bibedinformat {" * editortype * "}" * }
                          if$
                        }
                   if$
                 }
            if$
          }
      if$
    }
  if$
}

FUNCTION {fin.entry}
{ format.howcited
  " \jbdoitem {" *
    author empty$
      'skip$
      { author format.names.for.index * }
    if$
    "} {"
    editor empty$
      'skip$
      { editor format.names.for.index * }
    if$
    "} {" *
    organization empty$
      'skip$
      { "{" organization * "}{}{}{}{}" * * }
    if$
    "}" * * write$
  annote missing$
    { " \bibAnnoteFile {" cite$ * "}" * write$ newline$ }
    { " \bibAnnote {" annote * "}" * write$ newline$ }
  if$
}

FUNCTION {format.titleaddon}
{ title empty$
    'skip$
    { titleaddon empty$
         'skip$
         { ", " * titleaddon * }
     if$
    }
  if$
}

FUNCTION {format.booktitleaddon}
{ booktitle empty$
    'skip$
    { booktitleaddon empty$
        'skip$
         { ", " * booktitleaddon * }
     if$
    }
  if$
}

FUNCTION {format.title}
{ before.all 'output.state :=
  title empty$
    { "" }
    { title checked.emph.format swap$ * non.stop
       { before.all 'output.state := "}" * }
       { before.all 'output.state := "}" * }
      if$
    }
  if$
}

FUNCTION {journalnamemarkup}
{ duplicate$ empty$
    { pop$ "" }
    { "\bibJTsep \bibjtfont {" swap$ * "}" * }
  if$
}

FUNCTION {seriesformat}
{ duplicate$ empty$
    { pop$ "" }
    { "\bibsnfont {" swap$ * "}" * }
  if$
}

FUNCTION {is.num}
{ chr.to.int$
  duplicate$ "0" chr.to.int$ < not
  swap$ "9" chr.to.int$ > not and
}

FUNCTION {extract.num}
{ duplicate$ 't :=
  "" 's :=
  { t empty$ not }
  { t #1 #1 substring$
    t #2 global.max$ substring$ 't :=
    duplicate$ is.num
      { s swap$ * 's := }
      { pop$ "" 't := }
    if$
  }
  while$
  s empty$
    'skip$
    { pop$ s }
  if$
}

FUNCTION {convert.edition.superscript}
{ edition extract.num "l" change.case$ 's :=
  s "first" = s "1" = or s "erste" = or
    { "1" 't := }
    { s "second" = s "2" = or s "zweite" = or
        { "2" 't := }
        { s "third" = s "3" = or s "dritte" = or
            { "3" 't := }
            { s "fourth" = s "4" = or s "vierte" = or
                { "4" 't := }
                { s "fifth" = s "5" = or s "fuenfte" = or
                    { "5" 't := }
                    { s "sixth" = s "6" = or s "sechste" = or
                        { "6" 't := }
                        { s "seventh" = s "7" = or s "siebte" = or s "siebente" = or
                            { "7" 't := }
                            { s "eighth" = s "8" = or s "achte" = or
                                { "8" 't := }
                                { s "nineth" = s "9" = or s "neunte" = or
                                      { "9" 't := }
                                      {  s #1 #1 substring$ is.num
                                           { s "" * 't := }
                                           { edition 't := }
                                         if$
                                      }
                                  if$
                                }
                              if$
                            }
                          if$
                        }
                      if$
                    }
                  if$
                }
              if$
            }
          if$
        }
      if$
    }
  if$
  t
}

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 {output.bibitem.fst}
{ newline$
  "\bibitem[{" write$
  shortauthor empty$
    { juraauthor empty$
       { author empty$
          { editor empty$
              { organization empty$
                   { "empty" write$ }
                   { organization write$ }
                if$
              }
              { label write$ }
            if$
          }
          { label write$ }
         if$
       }
       { juraauthor write$ }
     if$
    }
    { shortauthor write$ }
  if$
  "}%" write$
  sortkey empty$
    'skip$
     { newline$ "% SORTKEY: [" sortkey * "]" * write$ }
  if$
  newline$
  shorttitle empty$
    { juratitle empty$
        { journal empty$
            { "         {}%" write$ }
            { title empty$
                  { key empty$
                       { "         {}%" write$ }
                       { "         {" key * "}%" * write$ }
                    if$
                  }
                  { "         {" title * "}%" * write$ }
              if$
            }
          if$
        }
        { "         {" juratitle * "}%" * write$ }
      if$
    }
    { "         {" shorttitle * "}%" * write$ }
  if$
  newline$
  repeat-authors
    { "         {{1}" write$ }
    { "         {{0}" write$ }
  if$
  howcited empty$
    { "{}" write$ }
    { "{" howcited * "}" * write$ }
  if$
  type$ empty$
    { "{}" write$ }
    { "{" type$ * "}" * write$ }
  if$
  year empty$
    { "{}" write$ }
    { "{" year * write$
      extra.label "" =
          'skip$
          { "\el {" write$ extra.label write$ "}" write$ }
      if$
      "}" write$
    }
  if$
  edition empty$
    { "{}" write$ }
    { "{" convert.edition.superscript extract.num * "}" * write$ }
  if$
  ssedition empty$
    { "{}" write$ }
    { "{" ssedition * "}" * write$ }
  if$
  language empty$
    { "{}" write$ }
    { "{" language * "}" * write$ }
  if$
  pages empty$
    { "{}%" write$ }
    { "{" write$ pages n.dashify write$ "}%" write$ }
  if$
  newline$
}

FUNCTION {output.bibitem.snd}
{ publisher empty$
    { address empty$
         { year empty$
               { "          {" write$ }
               { "          {" write$
                            year write$
                            extra.label "" =
                              'skip$
                              { "\el {" write$ extra.label write$ "}" write$ }
                            if$
               }
           if$
         }
         { year empty$
               { "          {" write$ address write$ }
               { "          {" write$ address write$ "\bibbdsep {} " write$
                            year write$
                            extra.label "" =
                              'skip$
                              { "\el {" write$ extra.label write$ "}" write$ }
                            if$
               }
           if$
         }
      if$
    }
    { address empty$
        { year empty$
              { "          {" write$ publisher write$ }
              { "          {" write$ publisher write$ "\bibbdsep {} " write$
                            year write$
                            extra.label "" =
                              'skip$
                              { "\el {" write$ extra.label write$ "}" write$ }
                            if$
              }
          if$
        }
        { year empty$
              { "          {" write$ address write$ "\bpubaddr {} " write$ publisher write$ }
              { "          {" write$ address write$ "\bpubaddr {} " write$ publisher write$ "\bibbdsep {} " write$
                            year write$
                            extra.label "" =
                              'skip$
                              { "\el {" write$ extra.label write$ "}" write$ }
                            if$
              }
          if$
        }
      if$
    }
  if$
  "}}%" write$ newline$
  "         {" write$
  title empty$
    { "{}%" write$ newline$ }
    { "{" title * "}%" * write$ newline$ }
  if$
  gender empty$
    { "          {}" write$ }
    { "          {" gender * "}" * write$ }
  if$
% NEW 0.6
  oyear empty$
    { "{}" write$ }
    { "{" oyear * "}" * write$ }
  if$
  author empty$
    { editor empty$
         { "{4}" write$ }% author and editor empty
         { "{3}" write$ }% author empty, editor not
      if$
    }
    { editor empty$
         { "{2}" write$ }% editor empty, author not
         { "{1}" write$ }% both author and editor given
      if$
    }
  if$
  "{}{}{}{}{}}%" write$ newline$
  "        ]{" write$
  cite$ write$
  "}" write$
  url empty$
    'skip$
    { newline$ " \jburldef {" write$ cite$ write$ "}{" write$ url write$ "}%" write$ }
  if$
  newline$
  " \jbbibargs {" write$
  ""
  before.all 'output.state :=
}

FUNCTION {output.bibitem}{ output.bibitem.fst output.bibitem.snd }

FUNCTION {word.in}
{ bbl.in
  " " * }

% JB extra label stuff added in 0.1a
FUNCTION {add.extra.label}
{extra.label "" =
   'skip$
   { "\bibel {" extra.label * "}" * * }
 if$
}

FUNCTION {format.date}
{ year empty$
    'skip$
    { output.state before.all =
            { "" * mid.sentence 'output.state := }
            { " " * }
      if$
      "\dateldelim {}" *
      month empty$
          'skip$
          { month "{} " * * }
      if$
      year * add.extra.label "\daterdelim {}" *
    }
  if$
}

FUNCTION {format.btitle}
{ before.all 'output.state :=
  title emphasize
}

FUNCTION {format.booktitle}
{ before.all 'output.state :=
  booktitle b.emphasize
}

FUNCTION {format.booklet.title}
{ before.all 'output.state :=
  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$
    { " " }
    {
      volumetitle empty$
        { crossref missing$
                     { bbl.volume volume tie.or.space.connect }
                     { bbl.vol volume tie.or.space.connect }
                 if$
        }
        {
          crossref missing$
              { bbl.volume volume tie.or.space.connect }
              { bbl.vol volume tie.or.space.connect }
          if$
          ": \bibvtfont {" * volumetitle "}" * *
        }
      if$
    }
  if$
}

FUNCTION {format.bvolume.btitle.reversed}
{ volume empty$
    { title empty$
        'skip$
        {
          before.all 'output.state :=
          title emphasize
        }
      if$
    }
    { volumetitle empty$
        { title empty$
             'skip$
             {
                before.all 'output.state :=
                title emphasize
             }
          if$
        }
        { "\bibvtfont {" volumetitle * "}" * *
          bbl.volume volume tie.or.space.connect
          title empty$
            'skip$
            { bbl.of title emphasize * * }
          if$
        }
      if$
    }
  if$
}

FUNCTION {format.bvolume.btitle}
{ volformat missing$
     {
       format.btitle "title" output.check format.bvolume output
     }
     { volformat 's :=
       s "reversed" =
            { volumetitle empty$
                 {
                   "volformat given but no volumetitle in " cite$ * warning$
                   format.bvolume.btitle.reversed output
                 }
                 {
                   volume empty$
                        { "there's a volumetitle but no volume in " cite$ * warning$ * }
                        'skip$
                   if$
                   title empty$
                     {
                        "volformat given but no title in " cite$ * warning$
                     }
                     {
                        format.bvolume.btitle.reversed output
                     }
                   if$
                 }
              if$
            }
            {
                format.btitle "title" output.check format.bvolume output
            }
       if$
     }
  if$
}

FUNCTION {format.bvolume.booktitle.reversed}
{ volume empty$
    { booktitle empty$
        'skip$
        {
          before.all 'output.state :=
          booktitle b.emphasize
        }
      if$
    }
    { volumetitle empty$
        { booktitle empty$
             'skip$
             {
                before.all 'output.state :=
                bbl.volume volume tie.or.space.connect
                booktitle empty$
                    'skip$
                    { bbl.of booktitle b.emphasize * * }
                if$
             }
          if$
        }
        { "\bibvtfont {" volumetitle * "}" * *
          bbl.volume volume tie.or.space.connect
          booktitle empty$
            'skip$
            { bbl.of booktitle b.emphasize * * }
          if$
        }
      if$
    }
  if$
}

FUNCTION {format.in.editor.booktitle.volume.voltitle}
{ editor empty$
      { chapter empty$
           { ", " * }
           { " " *  }
        if$
        word.in *
      }
      { chapter empty$
           { ", " * }
           { " " *  }
        if$
        word.in format.in.editors * ", " * *
      }
  if$
  volformat missing$
     {
       format.booktitle "booktitle" output.check
       format.bvolume output
       format.booktitleaddon
     }
     { volformat 's :=
       s "reversed" =
            { volumetitle empty$
                 {
                    "volformat given but no volumetitle in " cite$ * warning$
                    format.bvolume.booktitle.reversed output
                    format.booktitleaddon
                 }
                 {
                   volume empty$
                        { "there's a volumetitle but no volume in " cite$ * warning$ * }
                        'skip$
                   if$
                   booktitle empty$
                     {
                        "volformat given but no booktitle in " cite$ * warning$
                     }
                     {
                        format.bvolume.booktitle.reversed output
                        format.booktitleaddon
                     }
                   if$
                 }
              if$
            }
            {  format.booktitle "booktitle" output.check
               format.bvolume output
               format.booktitleaddon
            }
       if$
     }
 if$
}

FUNCTION {format.number.series.book.old}
{ number empty$
   { series seriesformat field.or.null }
   { series empty$
       { "there's a number but no series in " cite$ * warning$ number }
       { series seriesformat number tie.or.space.connect }
     if$
   }
 if$
}

FUNCTION {format.number.series.book}
{ volume empty$
  { number empty$
     { series empty$
          { "" }
          { " \numberandseries {}{" series * "}" * }
       if$
     }
     { series empty$
         { " \numberandseries {" number * "}{}" * "There's a number but no series in " cite$ * warning$ }
         { " \numberandseries {" number * "}{" * series "}" * * }
       if$
     }
    if$
   }
   { series empty$
      { "" }
      { type$ "proceedings" =
          { " \numberandseries {}{" series * "}" * } % { " (" series * ")" * }
          { "" }
        if$
      }
     if$
   }
  if$
}

FUNCTION {format.number.series}
{ volume empty$
    { number empty$
        { series seriesformat field.or.null }
        { output.state mid.sentence =
            { bbl.number }
            { bbl.number capitalize }
          if$
          number tie.or.space.connect
          series empty$
            { "there's a number but no series in " cite$ * warning$ }
            { bbl.in.series space.word * series seriesformat * }
          if$
        }
      if$
    }
    { type$ "incollection" = crossref missing$ and
        { format.number.series.book }
        { "" }
      if$
   }
   if$
}

FUNCTION {first.ed} { "\firstedname" }
FUNCTION {second.ed}{ "\secondedname" }
FUNCTION {third.ed} { "\thirdedname" }
FUNCTION {fourth.ed}{ "\fourthedname" }
FUNCTION {fifth.ed} { "\fifthedname" }
FUNCTION {th.ed}    { "\thedname" }

FUNCTION {convert.edition}
{ edition extract.num "l" change.case$ 's :=
  s "first" = s "1" = or
  { first.ed 't := }
  { s "second" = s "2" = or
    { second.ed 't := }
    { s "third" = s "3" = or
      { third.ed 't := }
      { s "fourth" = s "4" = or
        { fourth.ed 't := }
        { s "fifth" = s "5" = or
          { fifth.ed 't := }
          { s #1 #1 substring$ is.num
            { s th.ed * 't := }
            { edition 't := }
            if$
          }
          if$
        }
        if$
      }
      if$
    }
    if$
  }
  if$
  t
}

FUNCTION {format.edition}
{ edition empty$
    { "" }
    { convert.edition "~\editionname {}" * }
  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$
    { "" }
    { before.all 'output.state :=
      "\jbPages {" pages n.dashify * "}" *
    }
  if$
}

FUNCTION {format.journal.pages}
{ pages empty$
    'skip$
    { duplicate$ empty$
        { pop$ format.pages }
        { " \jbartPages {" pages n.dashify * "}" * * }
      if$
    }
  if$
}

FUNCTION {format.vol.num.pages}
{ before.all 'output.state :=
  volume empty$
    { year empty$ not
         { "there's a year but no volume in " cite$ * warning$ }
         'skip$
      if$
      number empty$
          { "" }
          { "there's a number but no volume in " cite$ * warning$
% NEW 0.6 
            type$ "periodical" =
               { "~\per" * }
               { "~\art" * }
            if$
            "volnumformat {}{" number * "}" * 
          }
      if$
    }
    { type$ "periodical" =
          { "~\per" * }
          { "~\art" * }
      if$
      number empty$
          { "volnumformat {" volume * "}{}" * }
          { "volnumformat {" volume * "}{" number * "}" * * }
      if$
    }
  if$
  year empty$
    { month empty$ not
         { "there's a month but no year in " cite$ * warning$ }
         'skip$
      if$
    }
    { type$ "periodical" =
         { " \per" * }
         { " \art" * }
      if$
      month empty$
        { "yearformat {" year * add.extra.label "}" * * }
        { "yearformat {" month * "{} " * year * add.extra.label "}" * * }
      if$
    }
  if$
}

FUNCTION {format.chapter.inbook.incoll}
{ chapter empty$
    { "" }
    { before.all 'output.state :=
      type empty$
        { ", " bbl.chapter * }
        { ", " type * "l" change.case$ }
      if$
      chapter tie.or.space.connect
    }
  if$
}

FUNCTION {format.chapter.pages}
{ chapter empty$
    'format.pages
    { type empty$
        { before.all 'output.state := ", " bbl.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$
        { word.in booktitle b.emphasize format.booktitleaddon * }
        { word.in format.in.editors * ", " * booktitle b.emphasize format.booktitleaddon * }
      if$
    }
  if$
}

FUNCTION {format.thesis.type}
{ type empty$
    'skip$
    { pop$
      type "t" change.case$
    }
  if$
}

FUNCTION {format.tr.number}
{ type empty$
    { bbl.techrep }
    'type
  if$
  number empty$
    { "t" change.case$ }
    { number tie.or.space.connect }
  if$
}

FUNCTION {format.article.crossref}
{ " \protect\jbartcrossrefchecked {" crossref * "}" * }

FUNCTION {format.book.crossref}
{ type$ "book" =
    { volume empty$
        { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
          "\protect\jbcrossrefchecked {" crossref * "}" * }
        { "\protect\jbcrossrefchecked[" volume * "]{" * crossref "}" * * }
      if$
    }
    { "\protect\jbcrossrefchecked {" crossref * "}" * }
  if$
}

FUNCTION {format.incoll.inproc.crossref}
{ " \protect\jbincollcrossref {" crossref * "}" *
  editor empty$
    { "{}" * }
    { "{1}" * }
  if$
}

FUNCTION {oaddress.opublisher.oyear.format}
{ type$ "book" =
     { oyear empty$
            { opublisher empty$
                 { oaddress empty$
                     'skip$
                     { oaddress "\osep {} " * * }
                   if$
                 }
                 { oaddress empty$
                     { opublisher "\osep {} " * * }
                     { oaddress "\bpubaddr {} " * opublisher "\osep {} " * * * }
                   if$
                 }
              if$
            }
            { year empty$
                 { "oyear without year in " cite$ * warning$ }
                 'skip$
              if$
              opublisher empty$
                 { oaddress empty$
                     { oyear * "\osep {} \reprintname {}, " * }
                     { oaddress "\bibbdsep {} " * oyear "\osep {} " * * * }
                   if$
                 }
                 { oaddress empty$
                     { opublisher * "\bibbdsep {} " * oyear "\osep {} " * * }
                     { oaddress "\bpubaddr {} " * opublisher "\bibbdsep {} " * * oyear "\osep {} " * * * }
                   if$
                 }
              if$
            }
       if$
     }
     'skip$
  if$
}

FUNCTION {format.publisher}
{ year empty$ month empty$ not and
        { "there's a month but no year in " cite$ * warning$ }
        'skip$
  if$
  address empty$ publisher empty$ year empty$ and and
     'skip$
     { " \apyformat {" * }
  if$
  oaddress.opublisher.oyear.format
  address empty$
    {
      publisher empty$
          {
            year empty$
                'skip$
                { month empty$
                     { year * add.extra.label }
                     { month "{} " * year * * add.extra.label }
                  if$
                }
            if$
          }
          {
            year empty$
                { month empty$
                     { publisher * }
                      'skip$
                  if$
                }
                { month empty$
                     { publisher "\bibbdsep {} " * year * * add.extra.label }
                     { publisher "\bibbdsep {} " * month "{} " * year * * * add.extra.label }
                  if$
                }
            if$
          }
      if$
    }
    {
      publisher empty$
          {
            year empty$
                { address * }
                { month empty$
                     { address "\bibbdsep {} " * year * * add.extra.label }
                     { address "\bibbdsep {} " * month "{} " * year * * * add.extra.label }
                  if$
                }
            if$
          }
          {
            year empty$
                { month empty$
                     { address "\bpubaddr {} " * publisher * * }
                      'skip$
                  if$
                }
                { month empty$
                     { address "\bpubaddr {} " * publisher "\bibbdsep {} " * year * * * add.extra.label }
                     { address "\bpubaddr {} " * publisher "\bibbdsep {} " * month "{} " * year * * * * add.extra.label }
                  if$
                }
            if$
          }
      if$
    }
  if$
  address empty$ publisher empty$ year empty$ and and
     'skip$
     { "}" * }
  if$
}

FUNCTION {format.publisher.manual}
{ year empty$ month empty$ not and
        { "there's a month but no year in " cite$ * warning$ }
        'skip$
  if$
  address empty$ organization empty$ year empty$ and and
     'skip$
     { " \apyformat {" * }
  if$
  address empty$
    {
      organization empty$
          {
            year empty$
                'skip$
                { month empty$
                     { year * add.extra.label }
                     { month "{} " * year * * add.extra.label }
                  if$
                }
            if$
          }
          {
            year empty$
                { month empty$
                     { organization * }
                      'skip$
                  if$
                }
                { month empty$
                     { organization "\bibbdsep {} " * year * * add.extra.label }
                     { organization "\bibbdsep {} " * month "{} " * year * * * add.extra.label }
                  if$
                }
            if$
          }
      if$
    }
    { organization empty$
          { year empty$
                { address * }
                { month empty$
                     { address "\bibbdsep {} " * year * * add.extra.label }
                     { address "\bpubaddr {} " * month "{} " * year * * * add.extra.label }
                  if$
                }
            if$
          }
          { year empty$
                { month empty$
                     { address "\bpubaddr {} " * organization * * }
                      'skip$
                  if$
                }
                { month empty$
                     { address "\bpubaddr {} " * organization "\bibbdsep {} " * year * * * add.extra.label }
                     { address "\bpubaddr {} " * organization "\bibbdsep {} " * month "{} " * year * * * * add.extra.label }
                  if$
                }
            if$
          }
      if$
    }
  if$
  address empty$ organization empty$ year empty$ and and
     'skip$
     { "}" * }
  if$
}

FUNCTION {format.publisher.techreport}
{ year empty$ month empty$ not and
        { "there's a month but no year in " cite$ * warning$ }
        'skip$
  if$
  address empty$ institution empty$ year empty$ and and
     'skip$
     { " \apyformat {" * }
  if$
  address empty$
    {
      institution empty$
          {
            year empty$
                'skip$
                { month empty$
                     { year * add.extra.label }
                     { month "{} " * year * * add.extra.label }
                  if$
                }
            if$
          }
          {
            year empty$
                { month empty$
                     { institution * }
                      'skip$
                  if$
                }
                { month empty$
                     { institution "\bibbdsep {} " * year * * add.extra.label }
                     { institution "\bibbdsep {} " * month "{} " * year * * * add.extra.label }
                  if$
                }
            if$
          }
      if$
    }
    { institution empty$
          { year empty$
                { address * }
                { month empty$
                     { address "\bibbdsep {} " * year * * add.extra.label }
                     { address "\bpubaddr {} " * month "{} " * year * * * add.extra.label }
                  if$
                }
            if$
          }
          { year empty$
                { month empty$
                     { address "\bpubaddr {} " * institution * * }
                      'skip$
                  if$
                }
                { month empty$
                     { address "\bpubaddr {} " * institution "\bibbdsep {} " * year * * * add.extra.label }
                     { address "\bpubaddr {} " * institution "\bibbdsep {} " * month "{} " * year * * * * add.extra.label }
                  if$
                }
            if$
          }
      if$
    }
  if$
  address empty$ institution empty$ year empty$ and and
     'skip$
     { "}" * }
  if$
}

FUNCTION {format.edby.editors}
{ author empty$
    'skip$
    { editor empty$
         'skip$
         { "\edbyname {} " editor format.editor.names * output }
      if$
    }
  if$
}

FUNCTION {make.translators}
{ translator empty$
    { flanguage empty$
        { "" }
        { "\translator {}{" flanguage "l" change.case$ * "}{1}" * }
      if$
    }
    { "\translator {" translator * "}" *
      flanguage empty$
        { "{}{1}" * }
        { "{" * flanguage "l" change.case$ * "}{1}" * }
      if$
    }
  if$
}

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.title "title" output.check
  format.titleaddon
  crossref missing$
    { journal journalnamemarkup
      "journal" output.check
      format.vol.num.pages output
      write.url
      format.journal.pages
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  format.note
  fin.entry
}

FUNCTION {periodical} {article}

FUNCTION {review}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.title "title" output.check
  format.titleaddon
  crossref missing$
    { journal journalnamemarkup
      "journal" output.check
      format.vol.num.pages output
      write.url
      format.journal.pages
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  format.note
  fin.entry
}

FUNCTION {format.editors.last}
{ editor empty$
   { "" before.all 'output.state := }
   { author empty$ not
        { " \edbyname{} " editor format.editor.names * }
        { "" before.all 'output.state := }
    if$
   }
  if$
}

FUNCTION {book}
{ output.bibitem
  author empty$
    { editor empty$ not
     { format.editors output.nonnull }
     { "neither author nor editor in " cite$ * warning$ }
      if$
    }
    { format.authors output.nonnull }
  if$
  set.after.author.sep output
  crossref missing$
    { format.bvolume.btitle
      format.editors.last output.nonnull
      make.translators output
      format.titleaddon
      format.number.series.book output
      format.edition output
      format.pages output
      format.publisher
      write.url
      format.note
    }
    { format.btitle "title" output.check
      format.book.crossref output.nonnull
    }
  if$
  fin.entry
}

FUNCTION {booklet}
{ output.bibitem
  format.authors output
  set.after.author.sep output
  format.btitle "title" output.check
  format.titleaddon
  howpublished output
  format.publisher
  format.pages output
  write.url
  format.note
  fin.entry
}

FUNCTION {inbook}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  crossref missing$
    { format.bvolume.btitle
      format.titleaddon
      make.translators output
      format.number.series output
      format.edition output
      format.publisher
      write.url
      format.chapter.inbook.incoll output
      format.pages output
      format.note
    }
    { format.btitle "title" output.check
      format.chapter.inbook.incoll output
      format.incoll.inproc.crossref output.nonnull
      format.bvolume output
      format.pages output
    }
  if$
  fin.entry
}

FUNCTION {incollection}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  crossref missing$
    { format.btitle "title" output.check
      format.titleaddon
      format.chapter.inbook.incoll output
      format.in.editor.booktitle.volume.voltitle
      make.translators output
      format.number.series.book output
      format.edition output
      format.publisher
      write.url
      format.note
      format.pages output
    }
    { format.title "title" output.check
      format.chapter.inbook.incoll output
      format.incoll.inproc.crossref output.nonnull
      format.bvolume output
      format.pages output
    }
  if$
  fin.entry
}

FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.title "title" output.check
  format.titleaddon
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      publisher empty$
        { organization output
          format.publisher
        }
        { organization output
          format.publisher
        }
      if$
      write.url
      format.note
      format.pages output
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  fin.entry
}

FUNCTION {conference} { inproceedings }

FUNCTION {manual}
{ output.bibitem
  format.authors output
  set.after.author.sep output
  format.btitle "title" output.check
  format.titleaddon
  format.edition output
  format.publisher.manual
  write.url
  format.note
  fin.entry
}

FUNCTION {mastersthesis}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.btitle "title" output.check
  format.titleaddon
  bbl.mthesis format.thesis.type output.nonnull
  school "school" output.check
  format.publisher
  write.url
  format.note
  fin.entry
}

FUNCTION {misc}
{ output.bibitem
  format.authors output
  set.after.author.sep output
  format.btitle output
  format.titleaddon
  howpublished output
  format.date
  write.url
  format.note
  fin.entry
}

FUNCTION {phdthesis}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.btitle "title" output.check
  format.titleaddon
  bbl.phdthesis format.thesis.type output.nonnull
  school "school" output.check
  format.publisher
  write.url
  format.note
  fin.entry
}

FUNCTION {proceedings}
{ output.bibitem
  format.editors output
  set.after.author.sep output
  format.btitle "title" output.check
  format.titleaddon
  format.number.series.book output
  organization output
  format.publisher
  write.url
  format.note
  fin.entry
}

FUNCTION {techreport}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.title "title" output.check
  format.tr.number output.nonnull
  format.publisher.techreport
  write.url
  format.note
  fin.entry
}

FUNCTION {unpublished}
{ output.bibitem
  format.authors "author" output.check
  set.after.author.sep output
  format.title "title" output.check
  format.titleaddon
  format.date
  write.url
  format.note
  fin.entry
}

FUNCTION {www}
{ output.bibitem
  format.authors output.nonnull
  set.after.author.sep output
  format.title output.nonnull
  write.url
  format.note
  fin.entry
}

FUNCTION {default.type} { misc }

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$
}


% JB added, contributed by Oren Patashnik
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INTEGERS { nextchar-ptr }                % points just past 1st "text" char

FUNCTION {get.nextchar.ptr}              % set nextchar-ptr to be just past
{ #1 'nextchar-ptr :=                    % the first "text" char---this will
    { duplicate$                         % be not quite trivial if
      nextchar-ptr #1 substring$         % the first "text" char is a
      "" = not                           % special characters like {\'E}
    }
    { nextchar-ptr #1 + 'nextchar-ptr := }
  while$
  pop$
  nextchar-ptr
}

STRINGS { first-char }                   % the to-be-capitalized character

FUNCTION {capitalize.von.part}           % capitalize 1st character of string
{ duplicate$ #1 text.prefix$             % get 1st character
  duplicate$ get.nextchar.ptr
  swap$ "u" change.case$                 % capitalize it
  'first-char :=
  global.max$ substring$                 % get rest of string
  first-char swap$ *                     % append the two
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% JB added
FUNCTION {format.lab.names}
{ 's :=                                    % for two: (Jones/de~Bruijn)
  s #1 "{vv~}{ll}" format.name$ capitalize.von.part % for three: (Jones/de~Bruijn/Smith)
  s num.names$ duplicate$                  % for more: (Jones et~al.)
  #2 <
  'pop$                                    % for just one person
  { duplicate$ duplicate$
    #2 >
    swap$ s swap$ "{ff }{vv }{ll}{ jj}" format.name$ "others" =
    or
    { pop$ "\Bibetal" * }                  % for 4 or more, or last is `others'
    { #2 =
      {  "\jbbtasep " * s #2 "{vv~}{ll}" format.name$ capitalize.von.part * } % for (exactly) two
      { "\jbbfsasep " * s #2 "{vv~}{ll}" format.name$ capitalize.von.part *   % for three
        "\jbbstasep " * s #3 "{vv~}{ll}" format.name$ capitalize.von.part *
      }
      if$
    }
    if$
  }
  if$
  year missing$
      'skip$
     { "\jbdy {" year * "}" * * }% dummy year to prevent from `1993a' and `2001b' for works by the same author
  if$
}

FUNCTION {author.key.label}
{ author empty$
    { key empty$
        { cite$ #1 #3 substring$ }
        'key
      if$
    }
    { author format.lab.names }
  if$
}

FUNCTION {author.editor.key.label}
{ author empty$
    { editor empty$
        { key empty$
            { cite$ #1 #3 substring$ }
            'key
          if$
        }
        { editor format.lab.names }
      if$
    }
    { author format.lab.names }
  if$
}

FUNCTION {editor.key.label}
{ editor empty$
    { key empty$
        { cite$ #1 #3 substring$ }
        'key
      if$
    }
    { editor format.lab.names }
  if$
}

FUNCTION {calc.label}
{ type$ "book" = type$ "inbook" = or type$ "incollection" = or
  'author.editor.key.label
  { type$ "proceedings" =
    'editor.key.label
    'author.key.label
    if$
  }
  if$
  'label :=
}

FUNCTION {calc.dummy.label}
{ type$ "book" = type$ "inbook" = or type$ "incollection" = or type$ "commented" = or
  'author.editor.key.label
  { type$ "proceedings" =
    'editor.key.label
    'author.key.label
    if$
  }
  if$
  'dummy.label :=
}

FUNCTION {sort.format.names}
{ 's :=
  #1 'nameptr :=
  ""
  s num.names$ 'numnames :=
  numnames 'namesleft :=
  { namesleft #0 > }
  { nameptr #1 >
  { "   " * }
  'skip$
    if$
    s nameptr "{ll{ }}{  ff{ }}{ vv{ }}{  jj{ }}" format.name$ 't :=
    nameptr numnames = t "\bibnf {others} {} {} {} {}" = and
  { "\Bibetal" * }
  { 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$
    { pseudonym empty$
          { key empty$
               { "to sort, need author, pseudonym or key in " cite$ * warning$ "" }
               { key sortify }
            if$
          }
          { pseudonym sort.format.names }
       if$
    }
    { author sort.format.names }
  if$
}

FUNCTION {author.editor.sort}
{ author empty$
    { editor empty$
        { pseudonym empty$
             { key empty$
                  { "to sort, need author, editor, pseudonym or key in " cite$ * warning$ "" }
                  { key sortify }
               if$
             }
             { pseudonym sort.format.names }
          if$
        }
        { editor sort.format.names }
      if$
    }
    { author sort.format.names }
  if$
}

FUNCTION {editor.sort}
{ editor empty$
    { pseudonym empty$
         { key empty$
              { "to sort, need author, editor, pseudonym or key in " cite$ * warning$ "" }
              { key sortify }
           if$
         }
         { pseudonym sort.format.names }
      if$
    }
    { editor sort.format.names }
  if$
}

FUNCTION {presort}
{ calc.label
  calc.dummy.label
% NEW 0.6, contributed by Robert Schlicht
  dummy.label sortify " " *
  sortkey empty$
     { type$ "book" =
         type$ "incollection" =    or
           type$ "inbook" =        or
            'author.editor.sort
            { type$ "proceedings" =
                'editor.sort
                'author.sort
              if$
            }
        if$
     }
     { sortkey sort.format.names }
  if$
  "    "
  *
  year field.or.null sortify
  *
  "    "
  *
  title field.or.null
  sort.format.title
  *
% save for later [RS]
   #1 entry.max$ substring$
   'sort.label := 
   sort.label *
% includes dummy.label [RS]
   #1 entry.max$ substring$
   'sort.key$ :=
}

ITERATE {presort}

%FUNCTION {before.sort} { "BEFORE SORT:" top$ }
%EXECUTE {before.sort}
%FUNCTION {print.sort.keys} {sort.key$ top$}
%ITERATE {print.sort.keys}

SORT

%FUNCTION {after.sort} {"AFTER SORT:" top$}
%EXECUTE {after.sort}
%ITERATE {print.sort.keys}

STRINGS { last.dummy.label next.extra }

INTEGERS { last.extra.num number.label }

FUNCTION {forward.pass}
{ last.dummy.label dummy.label =
    { last.extra.num #1 + 'last.extra.num :=
      last.extra.num int.to.chr$ 'extra.label :=
    }
    { "a" chr.to.int$ 'last.extra.num :=
      "" 'extra.label :=
      dummy.label 'last.dummy.label :=
    }
  if$
  number.label #1 + 'number.label :=
}

FUNCTION {reverse.pass}
{ next.extra "b" =
    { "a" 'extra.label := }
    'skip$
  if$
  extra.label 'next.extra :=
  extra.label
  duplicate$ empty$
    'skip$
    { "" swap$ * }
  if$
  'extra.label :=
  dummy.label extra.label * 'dummy.label :=
}

ITERATE {forward.pass}

REVERSE {reverse.pass}

% NEW 0.6 
FUNCTION {bib.sort.order} { sort.label  'sort.key$ := }

ITERATE {bib.sort.order}

SORT


FUNCTION {set.current.authors}
{ author empty$
  { editor empty$
    { organization empty$
      { cite$ 'current-authors := }
      { organization 'current-authors := }
      if$
    }
    { editor format.names #1 entry.max$ substring$ 'current-authors := }
    if$
  }
  { author format.names #1 entry.max$ substring$ 'current-authors := }
  if$
}

STRINGS { previous-authors }

FUNCTION {initialize.previous.authors} { "" 'previous-authors := }

FUNCTION {mark.repeat.authors}
{ current-authors previous-authors =
  { #1 'repeat-authors := }
  'skip$
  if$
  current-authors 'previous-authors :=
}

ITERATE {set.current.authors}

EXECUTE {initialize.previous.authors}

ITERATE {mark.repeat.authors}

EXECUTE {initialize.previous.authors}

REVERSE {mark.repeat.authors}

FUNCTION {begin.bib}
{ preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "%" write$ newline$
  "% This bibliography was produced by using jox.bst" write$ version write$ newline$
  "%" write$ newline$
  "\begin{thebibliography}{}" write$ newline$
}

EXECUTE {begin.bib}

EXECUTE {init.state.consts}

ITERATE {call.type$}

FUNCTION {end.bib}
{ newline$
  "\end{thebibliography}" write$ newline$
}

EXECUTE {end.bib}
%</joxbst>
%<*german>
\ProvidesFile{dejbbib.ldf}[jurabib German language definitions]
\def\bibsgerman{%
    \def\etalname{\unskip\nobreakspace{}et\,al.}%
    \def\etalnamenodot{\unskip\nobreakspace{}et\,al}%
    \def\bibandname{und}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{und}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{\ifjboxford in:\else\ifjbchicago in\else In\fi\fi}%
    \def\incollinname{\ifjboxford in:\else\ifjbchicago in\else In\fi\fi}%
    \def\ofseriesname{der Reihe}%
    \def\volumeofname{von}%
    \def\inseriesname{in}%
    \def\editorname{(Hrsg.)}%
    \def\editorsname{(Hrsg.)}%
    \def\sndeditorname{(Hrsg.)}%
    \def\sndeditorsname{(Hrsg.)}%
    \def\edbyname{hrsg. v.}%
    \def\Edbyname{Hrsg. v.}%
    \def\byname{v.}%
    \def\volname{Bd.}%
    \def\volumename{Band}%
    \def\Volumename{Band}%
    \def\numbername{Nummer}%
    \def\editionname{Auf\/lage}%
    \def\bibchaptername{Kap.}%
    \def\Bibchaptername{Kap.}%
    \def\bibchapterlongname{Kapitel}%
    \def\jbpagename{S.}%
    \def\jbpagesname{S.}%
    \def\bibpagename{S.}%
    \def\bibpagesname{S.}%
    \def\bibtotalpagesname{Seiten}%
    \def\jbarchpagename{Bl.}%
    \def\jbarchpagesname{Bl.}%
    \def\bibarchpagename{Bl.}%
    \def\bibarchpagesname{Bl.}%
    \def\jbpagenamenodot{}%
    \def\mastersthesisname{Diplomarbeit}%
    \def\phdthesisname{Dissertation}%
    \def\jurthesisname{Jur. Diss.}%
    \def\alsothesisname{zugl.}%
    \def\technicalreportname{Technischer Bericht}%
    \def\organizationname{\unskip, \textup{Veranst.}}%
    \def\janname{Januar}%
    \def\febname{Februar}%
    \def\marname{M{\"a}rz}%
    \def\aprname{April}%
    \def\mayname{Mai}%
    \def\junname{Juni}%
    \def\julname{Juli}%
    \def\augname{August}%
    \def\sepname{September}%
    \def\octname{Oktober}%
    \def\novname{November}%
    \def\decname{Dezember}%
    \def\firstedname{1.}%
    \def\secondedname{2.}%
    \def\thirdedname{3.}%
    \def\fourthedname{4.}%
    \def\fifthedname{5.}%
    \def\thedname{.}%
    \def\urldatecomment{Zugriff am }%
    \def\howcitedprefix{ (zitiert: }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ (Anm.~}%
    \def\lookatsuffix{)}%
    \def\ibidemname{A.\,a.\,O\kern-1.2pt.}%
    \def\ibidemmidname{a.\,a.\,O\kern-1.2pt.}%
    \def\idemname{Ders.}%
    \def\idemmidname{ders.}%
    \def\bibcontinuedname{(Forts.)}%
    \def\idemSmname{Ders.}\def\idemsmname{ders.}%
    \def\idemPmname{Dies.}\def\idempmname{dies.}%
    \def\idemSfname{Dies.}\def\idemsfname{dies.}%
    \def\idemPfname{Dies.}\def\idempfname{dies.}%
    \def\idemSnname{Dass.}\def\idemsnname{dass.}%
    \def\idemPnname{Dies.}\def\idempnname{dies.}%
    \def\idemSmedbyname{Demselben}\def\idemsmedbyname{demselben}%
    \def\idemPmedbyname{Denselben}\def\idempmedbyname{denselben}%
    \def\idemSfedbyname{Derselben}\def\idemsfedbyname{derselben}%
    \def\idemPfedbyname{Denselben}\def\idempfedbyname{denselben}%
    \def\idemSnedbyname{Demselben}\def\idemsnedbyname{demselben}%
    \def\idemPnedbyname{Denselben}\def\idempnedbyname{denselben}%
    \jbidemabbrvwithperiodtrue
    \def\bibidemSmname{Derselbe}\def\bibidemsmname{derselbe}%
    \def\bibidemPmname{Dieselben}\def\bibidempmname{dieselben}%
    \def\bibidemSfname{Dieselbe}\def\bibidemsfname{dieselbe}%
    \def\bibidemPfname{Dieselben}\def\bibidempfname{dieselben}%
    \def\bibidemSnname{Dasselbe}\def\bibidemsnname{dasselbe}%
    \def\bibidemPnname{Dieselben}\def\bibidempnname{dieselben}%
    \def\trans{\ifjbweareinbib"ubers.\else\ifjboxford"ubers.\else\ifjbchicago"ubers.\else"Ubers.\fi\fi\fi}%
    \def\transfrom{aus dem}%
    \def\Transfrom{Aus dem}%
    \def\transby{von}%
    \def\fromgerman{Deutschen}%
    \def\fromenglish{Englischen}%
    \def\fromfrench{Franz\"osischen}%
    \def\fromdutch{Holl\"andischen}%
    \def\fromspanish{Spanischen}%
    \def\fromitalian{Italienischen}%
    \def\fromnorsk{Norwegischen}%
    \def\fromportuguese{Portugiesischen}%
    \def\fromfinnish{Finnischen}%
    \def\Reprint{Nachdruck}%
    \def\reprint{Nachdruck}%
    \def\reviewname{TODO}%
    \def\reviewofname{von}%
    \def\reviewbyname{von}%
    \def\updatesep{,}%
    \def\updatename{Stand:}%
    \def\herename{hier:~}%
    \def\foundername{\space\edfont{(Begr.)}}%
    \def\afterfoundersep{\slash}%
    \def\jbmakeindexactual{=}%
    \addtoalllanguages%
}%
%</german>
%<*english>
\ProvidesFile{enjbbib.ldf}[jurabib English language definitions]
\def\bibsenglish{%
    \def\etalname{\unskip\nobreakspace{}et\,al.}%
    \def\etalnamenodot{\unskip\nobreakspace{}et\,al}%
    \def\bibandname{and}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{and}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{\ifjboxford in:\else\ifjbchicago in\else In\fi\fi}%
    \def\incollinname{\ifjboxford in:\else\ifjbchicago in\else In\fi\fi}%
    \def\ofseriesname{of}%
    \def\volumeofname{of}%
    \def\inseriesname{in}%
    \def\editorname{\unskip,\space{}editor}%
    \def\editorsname{\unskip,\space{}editors}%
    \def\sndeditorname{editor}%
    \def\sndeditorsname{editors}%
    \def\edbyname{edited by}%
    \def\Edbyname{Edited by}%
    \def\byname{by}%
    \def\volname{vol.}%
    \def\volumename{volume}%
    \def\Volumename{Volume}%
    \def\numbername{number}%
    \def\editionname{edition}%
    \def\bibchaptername{chap.}%
    \def\Bibchaptername{Chap.}%
    \def\bibchapterlongname{chapter}%
    \def\jbpagename{p.}%
    \def\jbpagesname{pp.}%
    \def\bibpagename{p.}%
    \def\bibpagesname{pp.}%
    \def\bibtotalpagesname{pages}%
    \def\jbarchpagename{\jbpagename}%
    \def\jbarchpagesname{\jbpagesname}%
    \def\bibarchpagename{\bibpagename}%
    \def\bibarchpagesname{\bibpagesname}%
    \def\jbpagenamenodot{p}%
    \def\alsothesisname{also}%
    \def\phdthesisname{Ph.\,D thesis}%
    \def\mastersthesisname{Master's thesis}%
    \def\jurthesisname{diss. jur.}%
    \def\technicalreportname{Technical report}%
    \def\organizationname{\textup{(Org.)}}%
    \def\janname{January}%
    \def\febname{February}%
    \def\marname{March}%
    \def\aprname{April}%
    \def\mayname{May}%
    \def\junname{June}%
    \def\julname{July}%
    \def\augname{August}%
    \def\sepname{September}%
    \def\octname{October}%
    \def\novname{November}%
    \def\decname{December}%
    \def\firstedname{1st}%
    \def\secondedname{2nd}%
    \def\thirdedname{3rd}%
    \def\fourthedname{4th}%
    \def\fifthedname{5th}%
    \def\thedname{th}%
    \def\urldatecomment{visited on }%
    \def\howcitedprefix{ (cited: }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ (as in n.~}%
    \def\lookatsuffix{)}%
    \def\ibidemname{Ibid.}%
    \def\ibidemmidname{ibid.}%
    \def\idemname{Idem}%
    \def\idemmidname{idem}%
    \def\bibcontinuedname{(cont.)}%
    \def\idemSmname{\idemname}\def\idemsmname{\idemmidname}\def\idemPmname{\idemname}
    \def\idempmname{\idemmidname}\def\idemSfname{\idemname}\def\idemsfname{\idemmidname}%
    \def\idemPfname{\idemname}\def\idempfname{\idemmidname}\def\idemSnname{\idemname}%
    \def\idemsnname{\idemmidname}\def\idemPnname{\idemname}\def\idempnname{\idemmidname}%
    \def\idemSmedbyname{\idemname}\def\idemsmedbyname{\idemmidname}\def\idemPmedbyname{\idemname}%
    \def\idempmedbyname{\idemmidname}\def\idemSfedbyname{\idemname}\def\idemsfedbyname{\idemmidname}%
    \def\idemPfedbyname{\idemname}\def\idempfedbyname{\idemmidname}\def\idemSnedbyname{\idemname}%
    \def\idemsnedbyname{\idemmidname}\def\idemPnedbyname{\idemname}\def\idempnedbyname{\idemmidname}%
    \def\bibidemSmname{\idemname}\def\bibidemsmname{\idemmidname}\def\bibidemPmname{\idemname}%
    \def\bibidempmname{\idemmidname}\def\bibidemSfname{\idemname}\def\bibidemsfname{\idemmidname}%
    \def\bibidemPfname{\idemname}\def\bibidempfname{\idemmidname}\def\bibidemSnname{\idemname}%
    \def\bibidemsnname{\idemmidname}\def\bibidemPnname{\idemname}\def\bibidempnname{\idemmidname}%
    \def\trans{\ifjbweareinbib trans.\else\ifjboxford trans.\else\ifjbchicago trans.\else Trans.\fi\fi\fi}%
    \def\transfrom{from the}%
    \def\Transfrom{From the}%
    \def\transby{by}%
    \def\fromgerman{German}%
    \def\fromenglish{English}%
    \def\fromfrench{French}%
    \def\fromdutch{Dutch}%
    \def\fromspanish{Spanish}%
    \def\fromitalian{Italian}%
    \def\fromnorsk{Norwegian}%
    \def\fromportuguese{Portuguese}%
    \def\fromfinnish{Finnish}%
    \def\Reprint{Reprint}%
    \def\reprint{reprint}%
    \def\reviewname{Review}%
    \def\reviewofname{of}%
    \def\reviewbyname{by}%
    \def\updatesep{,}%
    \def\updatename{last update:}%
    \def\herename{here:~}%
    \def\foundername{\space\edfont{(TODO)}}%
    \def\afterfoundersep{\slash}%
    \addtoalllanguages%
}%
%</english>
%<*dutch>
\ProvidesFile{dujbbib.ldf}[jurabib Dutch language definitions]
\def\bibsdutch{%
    \def\etalname{\unskip\nobreakspace{}et\,al.}%
    \def\etalnamenodot{\unskip\nobreakspace{}et\,al}%
    \def\bibandname{en}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{en}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{in}%
    \def\incollinname{\ifjbchicago in\else in:\fi}%
    \def\ofseriesname{van}%
    \def\volumeofname{van}%
    \def\inseriesname{in}%
    \def\editorname{(red.)}%
    \def\editorsname{(red.)}%
    \def\sndeditorname{(red.)}%
    \def\sndeditorsname{(red.)}%
    \def\edbyname{onder redactie van}%
    \def\Edbyname{Onder redactie van}%
    \def\byname{van}%
    \def\volname{deel}%
    \def\volumename{deel}%
    \def\Volumename{deel}%
    \def\numbername{nr.}%
    \def\editionname{druk}%
    \def\bibchaptername{H.}%
    \def\Bibchaptername{H.}%
    \def\bibchapterlongname{Hoofdstuk}%
    \def\jbpagename{blz.}%
    \def\jbpagesname{blz.}%
    \def\bibpagename{blz.}%
    \def\bibpagesname{blz.}%
    \def\bibtotalpagesname{blz.}%
    \def\jbarchpagename{\jbpagename}%
    \def\jbarchpagesname{\jbpagesname}%
    \def\bibarchpagename{\bibpagename}%
    \def\bibarchpagesname{\bibpagesname}%
    \def\jbpagenamenodot{}%
    \def\mastersthesisname{Scriptie}%
    \def\phdthesisname{Proefschrift}%
    \def\jurthesisname{diss. jur.}% ???
    \def\alsothesisname{ook}%
    \def\technicalreportname{Technisch rapport}%
    \def\organizationname{\unskip, \textup{Oorspr.}}%
    \def\janname{januari}%
    \def\febname{februari}%
    \def\marname{maart}%
    \def\aprname{april}%
    \def\mayname{mei}%
    \def\junname{juni}%
    \def\julname{juli}%
    \def\augname{augustus}%
    \def\sepname{september}%
    \def\octname{oktober}%
    \def\novname{november}%
    \def\decname{december}%
    \def\firstedname{eerste}%
    \def\secondedname{tweede}%
    \def\thirdedname{derde}%
    \def\fourthedname{3\textsuperscript{e}}%
    \def\fifthedname{4\textsuperscript{e}}%
    \def\thedname{\textsuperscript{e}}%
    \def\urldatecomment{bezocht op }%
    \def\howcitedprefix{ (geciteerd: }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ (zie voetnoot~}%
    \def\lookatsuffix{)}%
    \def\ibidemname{Ibid.}%
    \def\ibidemmidname{ibid.}%
    \def\idemname{Idem}%
    \def\idemmidname{idem}%
    \def\bibcontinuedname{(cont.)}%
    \def\idemSmname{\idemname}\def\idemsmname{\idemmidname}\def\idemPmname{\idemname}
    \def\idempmname{\idemmidname}\def\idemSfname{\idemname}\def\idemsfname{\idemmidname}%
    \def\idemPfname{\idemname}\def\idempfname{\idemmidname}\def\idemSnname{\idemname}%
    \def\idemsnname{\idemmidname}\def\idemPnname{\idemname}\def\idempnname{\idemmidname}%
    \def\idemSmedbyname{\idemname}\def\idemsmedbyname{\idemmidname}\def\idemPmedbyname{\idemname}%
    \def\idempmedbyname{\idemmidname}\def\idemSfedbyname{\idemname}\def\idemsfedbyname{\idemmidname}%
    \def\idemPfedbyname{\idemname}\def\idempfedbyname{\idemmidname}\def\idemSnedbyname{\idemname}%
    \def\idemsnedbyname{\idemmidname}\def\idemPnedbyname{\idemname}\def\idempnedbyname{\idemmidname}%
    \def\bibidemSmname{\idemname}\def\bibidemsmname{\idemmidname}\def\bibidemPmname{\idemname}%
    \def\bibidempmname{\idemmidname}\def\bibidemSfname{\idemname}\def\bibidemsfname{\idemmidname}%
    \def\bibidemPfname{\idemname}\def\bibidempfname{\idemmidname}\def\bibidemSnname{\idemname}%
    \def\bibidemsnname{\idemmidname}\def\bibidemPnname{\idemname}\def\bibidempnname{\idemmidname}%
    \def\trans{\ifjbweareinbib trans.\else\ifjboxford trans.\else\ifjbchicago trans.\else Trans.\fi\fi\fi}%
    \def\transfrom{vanuit het}%
    \def\Transfrom{Vanuit het}%
    \def\transby{door}%
    \def\fromgerman{Duits}%
    \def\fromenglish{Engels}%
    \def\fromfrench{Frans}%
    \def\fromdutch{Nederlands}%
    \def\fromspanish{TODO}%
    \def\fromitalian{TODO}%
    \def\fromnorsk{TODO}%
    \def\fromportuguese{TODO}%
    \def\fromfinnish{TODO}%
    \def\Reprint{Herdruk}%
    \def\reprint{herdruk}%
    \def\reviewname{Recensie}%
    \def\reviewofname{van}%
    \def\reviewbyname{van}%
    \def\updatesep{,}%
    \def\updatename{Stand:}%
    \def\herename{TODO}%
    \def\foundername{\space\edfont{(TODO)}}% Founder of a series
    \def\afterfoundersep{\slash}%
    \addtoalllanguages%
}%
%</dutch>
%<*french>
\ProvidesFile{frjbbib.ldf}[jurabib French language definitions]
\def\bibsfrench{%
    \def\etalname{\unskip\nobreakspace{}\textit{et\,al.}}%
    \def\etalnamenodot{\unskip\nobreakspace{}\textit{et\,al}}%
    \def\bibandname{et}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{et}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{\ifjboxford dans :\else dans\fi}%
    \def\incollinname{\ifjboxford dans :\else dans\fi}%
    \def\ofseriesname{,}%
    \def\volumeofname{de}%
    \def\inseriesname{dans}%
    \def\editorname{(\'ed.)}%
    \def\editorsname{(\'ed.)}%
    \def\sndeditorname{(\'ed.)}%
    \def\sndeditorsname{(\'ed.)}%
    \def\edbyname{publi\'e par}%
    \def\Edbyname{Publi\'e par}%
    \def\byname{par}%
    \def\volname{vol.}%
    \def\volumename{volume}%
    \def\Volumename{Volume}%
    \def\numbername{n$^\circ$~}%
    \def\editionname{\'edition}%
    \def\bibchaptername{chap.}%
    \def\Bibchaptername{Chap.}%
    \def\bibchapterlongname{chapitre}%
    \def\jbpagename{p.}%
    \def\jbpagesname{p.}%
    \def\bibpagename{p.}%
    \def\bibpagesname{p.}%
    \def\bibtotalpagesname{pages}% TODO
    \def\jbarchpagename{\jbpagename}%
    \def\jbarchpagesname{\jbpagesname}%
    \def\bibarchpagename{\bibpagename}%
    \def\bibarchpagesname{\bibpagesname}%
    \def\jbpagenamenodot{p}%
    \def\alsothesisname{tir\'e de :}%
    \def\mastersthesisname{DEA}%
    \def\phdthesisname{Th\`ese de doctorat}%
    \def\jurthesisname{Th\`ese de droit}%
    \def\technicalreportname{Rapport technique}%
    \def\organizationname{}%
    \def\janname{janvier}%
    \def\febname{f\'evrier}%
    \def\marname{mars}%
    \def\aprname{avril}%
    \def\mayname{mai}%
    \def\junname{juin}%
    \def\julname{juillet}%
    \def\augname{ao\^ut}%
    \def\sepname{septembre}%
    \def\octname{octobre}%
    \def\novname{novembre}%
    \def\decname{d\'ecembre}%
    \def\firstedname{1\textsuperscript{er}}%
    \def\secondedname{2\textsuperscript{e}}%
    \def\thirdedname{3\textsuperscript{e}}%
    \def\fourthedname{4\textsuperscript{e}}%
    \def\fifthedname{5\textsuperscript{e}}%
    \def\thedname{\textsuperscript{e}}%
    \def\urldatecomment{visit\'e le }%
    \def\howcitedprefix{ (cit\'e dans : }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ (cf. n$^\circ$~}%
    \def\lookatsuffix{)}%
    \def\ibidemname{\textit{Ibid.}}%
    \def\ibidemmidname{\textit{ibid.}}%
    \def\idemname{\textit{Idem}}%
    \def\idemmidname{\textit{idem}}%
    \def\bibcontinuedname{(cont.)}%
    \def\idemSmname{\idemname}\def\idemsmname{\idemmidname}\def\idemPmname{\idemname}
    \def\idempmname{\idemmidname}\def\idemSfname{\idemname}\def\idemsfname{\idemmidname}%
    \def\idemPfname{\idemname}\def\idempfname{\idemmidname}\def\idemSnname{\idemname}%
    \def\idemsnname{\idemmidname}\def\idemPnname{\idemname}\def\idempnname{\idemmidname}%
    \def\idemSmedbyname{\idemname}\def\idemsmedbyname{\idemmidname}\def\idemPmedbyname{\idemname}%
    \def\idempmedbyname{\idemmidname}\def\idemSfedbyname{\idemname}\def\idemsfedbyname{\idemmidname}%
    \def\idemPfedbyname{\idemname}\def\idempfedbyname{\idemmidname}\def\idemSnedbyname{\idemname}%
    \def\idemsnedbyname{\idemmidname}\def\idemPnedbyname{\idemname}\def\idempnedbyname{\idemmidname}%
    \def\bibidemSmname{\idemname}\def\bibidemsmname{\idemmidname}\def\bibidemPmname{\idemname}%
    \def\bibidempmname{\idemmidname}\def\bibidemSfname{\idemname}\def\bibidemsfname{\idemmidname}%
    \def\bibidemPfname{\idemname}\def\bibidempfname{\idemmidname}\def\bibidemSnname{\idemname}%
    \def\bibidemsnname{\idemmidname}\def\bibidemPnname{\idemname}\def\bibidempnname{\idemmidname}%
    \def\trans{\ifjbweareinbib traduit\else\ifjboxford traduit\else\ifjbchicago traduit\else Traduit\fi\fi\fi}%
    \def\transfrom{\unskip\unskip\space}%
    \def\Transfrom{\unskip\unskip\space}%
    \def\transby{par}%
    \def\fromgerman{de l'allemand}%
    \def\fromenglish{de l'anglais}%
    \def\fromfrench{du français}%
    \def\fromdutch{du n\'eerlandais}%
    \def\fromspanish{de l'espagnol}%
    \def\fromitalian{de l'italien}%
    \def\fromnorsk{du norv\'egien}%
    \def\fromportuguese{TODO}%
    \def\fromfinnish{du finnois}%
    \def\Reprint{R\'e\'edition}%
    \def\reprint{r\'e\'edition}%
    \def\reviewname{TODO}%
    \def\reviewofname{TODO}%
    \def\reviewbyname{TODO}%
    \def\updatesep{,}%
    \def\updatename{derni\`ere mise \`a jour:}%
    \def\herename{TODO}%
    \def\foundername{\space\edfont{(TODO)}}% Founder of a series
    \def\afterfoundersep{\slash}%
    \addtoalllanguages%
}%
%</french>
%<*spanish>
\ProvidesFile{spjbbib.ldf}[jurabib Spanish language definitions]
\def\bibsspanish{%
    \def\etalname{\textit{\unskip\nobreakspace{}et\,al.}}%
    \def\etalnamenodot{\textit{\unskip\nobreakspace{}et\,al}}%
    \def\bibandname{y}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{y}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{\ifjboxford en:\else\ifjbchicago en\else En\fi\fi}%
    \def\incollinname{\ifjboxford en:\else\ifjbchicago en\else En\fi\fi}%
    \def\ofseriesname{de la colecci\'on}%
    \def\volumeofname{de}%
    \def\inseriesname{en}%
    \def\editorname{\unskip,\space{}director}%
    \def\editorsname{\unskip,\space{}directores}%
    \def\sndeditorname{director}%
    \def\sndeditorsname{directores}%
    \def\edbyname{dirigido por}%
    \def\Edbyname{Dirigido por}%
    \def\byname{por}%
    \def\volname{vol.}%
    \def\volumename{volumen}%
    \def\Volumename{Volumen}%
    \def\numbername{n\'umero}%
    \def\editionname{ed\/ici\'on}%
    \def\bibchaptername{cap.}%
    \def\Bibchaptername{Cap.}%
    \def\bibchapterlongname{Cap\'itulo}%
    \def\jbpagename{p\'ag.}%
    \def\jbpagesname{p\'ags.}%
    \def\jbpagenamenodot{p\'ag}%
    \def\bibpagename{p\'ag.}%
    \def\bibpagesname{p\'ags.}%
    \def\bibtotalpagesname{p\'aginas}%
    \def\jbarchpagename{\jbpagename}%
    \def\jbarchpagesname{\jbpagesname}%
    \def\bibarchpagename{\bibpagename}%
    \def\bibarchpagesname{\bibpagesname}%
    \def\mastersthesisname{Proyecto Fin de Carrera}%
    \def\phdthesisname{Tesis Doctoral}%
    \def\jurthesisname{Tesis Doctoral}%
    \def\alsothesisname{tambi\'en como}%
    \def\technicalreportname{Informe t\'ecnico}%
    \def\organizationname{Organizaci\'on}%
    \def\janname{enero}%
    \def\febname{febrero}%
    \def\marname{marzo}%
    \def\aprname{abril}%
    \def\mayname{mayo}%
    \def\junname{junio}%
    \def\julname{julio}%
    \def\augname{agosto}%
    \def\sepname{septiembre}%
    \def\octname{octubre}%
    \def\novname{noviembre}%
    \def\decname{diciembre}%
    \def\firstedname{1.\textsuperscript{a}}%
    \def\secondedname{2.\textsuperscript{a}}%
    \def\thirdedname{3.\textsuperscript{a}}%
    \def\fourthedname{4.\textsuperscript{a}}%
    \def\fifthedname{5.\textsuperscript{a}}%
    \def\thedname{.\textsuperscript{a}}%
    \def\urldatecomment{visitado el }%
    \def\howcitedprefix{ (citado en: }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ (v\'ease nota~}%
    \def\lookatsuffix{)}%
    \def\ibidemname{Ib\'{\i}d.}%
    \def\ibidemmidname{ib\'{\i}d.}%
    \def\idemname{\'{\i}dem}%
    \def\idemmidname{\'{\i}dem}%
    \def\bibcontinuedname{(cont.)}%
    \def\idemSmname{\idemname}\def\idemsmname{\idemmidname}\def\idemPmname{\idemname}
    \def\idempmname{\idemmidname}\def\idemSfname{\idemname}\def\idemsfname{\idemmidname}%
    \def\idemPfname{\idemname}\def\idempfname{\idemmidname}\def\idemSnname{\idemname}%
    \def\idemsnname{\idemmidname}\def\idemPnname{\idemname}\def\idempnname{\idemmidname}%
    \def\idemSmedbyname{\idemname}\def\idemsmedbyname{\idemmidname}\def\idemPmedbyname{\idemname}%
    \def\idempmedbyname{\idemmidname}\def\idemSfedbyname{\idemname}\def\idemsfedbyname{\idemmidname}%
    \def\idemPfedbyname{\idemname}\def\idempfedbyname{\idemmidname}\def\idemSnedbyname{\idemname}%
    \def\idemsnedbyname{\idemmidname}\def\idemPnedbyname{\idemname}\def\idempnedbyname{\idemmidname}%
    \def\bibidemSmname{\idemname}\def\bibidemsmname{\idemmidname}\def\bibidemPmname{\idemname}%
    \def\bibidempmname{\idemmidname}\def\bibidemSfname{\idemname}\def\bibidemsfname{\idemmidname}%
    \def\bibidemPfname{\idemname}\def\bibidempfname{\idemmidname}\def\bibidemSnname{\idemname}%
    \def\bibidemsnname{\idemmidname}\def\bibidemPnname{\idemname}\def\bibidempnname{\idemmidname}%
    \def\trans{\ifjbweareinbib trad.\else\ifjboxford trad.\else\ifjbchicago trad.\else Trad.\fi\fi\fi}%
    \def\transfrom{del}%
    \def\Transfrom{Del}%
    \def\transby{por}%
    \def\fromgerman{alem\'an}%
    \def\fromenglish{ingl\'es}%
    \def\fromfrench{franc\'es}%
    \def\fromdutch{holand\'es}%
    \def\fromspanish{espa\~nol}%
    \def\fromitalian{italiano}%
    \def\fromnorsk{noruego}%
    \def\fromportuguese{TODO}%
    \def\fromfinnish{fin\'es}%
    \def\Reprint{Reimpresi\'on}%
    \def\reprint{reimpresi\'on}%
    \def\reviewname{TODO}%
    \def\reviewofname{TODO}%
    \def\reviewbyname{TODO}%
    \def\updatesep{,}%
    \def\updatename{\'ultima actualizaci\'on:}%
    \def\herename{aqu\'i:~}%
    \def\foundername{\space\edfont{(orig.)}}%
    \def\afterfoundersep{\slash}%
    \addtoalllanguages%
}%
%</spanish>
%<*italian>
\ProvidesFile{itjbbib.ldf}[jurabib Italian language definitions]
\def\bibsitalian{%
    \def\etalname{\unskip\nobreakspace{}et\,al.}%
    \def\etalnamenodot{\unskip\nobreakspace{}et\,al}%
    \def\bibandname{e}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{e}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{\ifjboxford in:\else\ifjbchicago in\else In\fi\fi}%
    \def\incollinname{\ifjboxford in:\else\ifjbchicago in\else In\fi\fi}%
    \def\ofseriesname{della collana}%
    \def\volumeofname{de}%
    \def\inseriesname{in}%
    \def\editorname{(ed.)}%
    \def\editorsname{(eds.)}%
    \def\sndeditorname{(ed.)}%
    \def\sndeditorsname{(eds.)}%
    \def\edbyname{a cura di}%
    \def\Edbyname{A cura di}%
    \def\byname{di}%
    \def\volname{vol.}%
    \def\volumename{volume}%
    \def\Volumename{Volume}%
    \def\numbername{numero}%
    \def\editionname{ed\/izione}%
    \def\bibchaptername{cap.}%
    \def\Bibchaptername{Cap.}%
    \def\bibchapterlongname{Capitolo}%
    \def\jbpagename{p.}%
    \def\jbpagesname{pp.}%
    \def\bibpagename{p.}%
    \def\bibpagesname{pp.}%
    \def\bibtotalpagesname{pages}% TODO
    \def\jbarchpagename{\jbpagename}%
    \def\jbarchpagesname{\jbpagesname}%
    \def\bibarchpagename{\bibpagename}%
    \def\bibarchpagesname{\bibpagesname}%
    \def\jbpagenamenodot{p}%
    \def\mastersthesisname{Tesi di Laurea}%
    \def\phdthesisname{Tesi di dottorato}%
    \def\jurthesisname{diss. jur.}%
    \def\alsothesisname{anche}%
    \def\technicalreportname{Rapporto tecnico}%
    \def\organizationname{Organizzazione}%
    \def\janname{gennaio}%
    \def\febname{febbraio}%
    \def\marname{marzo}%
    \def\aprname{aprile}%
    \def\mayname{maggio}%
    \def\junname{giugno}%
    \def\julname{luglio}%
    \def\augname{agosto}%
    \def\sepname{settembre}%
    \def\octname{ottobre}%
    \def\novname{novembre}%
    \def\decname{dicembre}%
    \def\firstedname{1\textsuperscript{a}}%
    \def\secondedname{2\textsuperscript{a}}%
    \def\thirdedname{3\textsuperscript{a}}%
    \def\fourthedname{4\textsuperscript{a}}%
    \def\fifthedname{5\textsuperscript{a}}%
    \def\thedname{\textsuperscript{a}}%
    \def\urldatecomment{accesso a }%
    \def\howcitedprefix{ (citato da: }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ (vedi nota~}%
    \def\lookatsuffix{)}%
    \def\ibidemname{Ibid.}%
    \def\ibidemmidname{ibid.}%
    \def\idemname{Idem}%
    \def\idemmidname{idem}%
    \def\bibcontinuedname{(cont.)}%
    \def\idemSmname{\idemname}\def\idemsmname{\idemmidname}\def\idemPmname{\idemname}
    \def\idempmname{\idemmidname}\def\idemSfname{\idemname}\def\idemsfname{\idemmidname}%
    \def\idemPfname{\idemname}\def\idempfname{\idemmidname}\def\idemSnname{\idemname}%
    \def\idemsnname{\idemmidname}\def\idemPnname{\idemname}\def\idempnname{\idemmidname}%
    \def\idemSmedbyname{\idemname}\def\idemsmedbyname{\idemmidname}\def\idemPmedbyname{\idemname}%
    \def\idempmedbyname{\idemmidname}\def\idemSfedbyname{\idemname}\def\idemsfedbyname{\idemmidname}%
    \def\idemPfedbyname{\idemname}\def\idempfedbyname{\idemmidname}\def\idemSnedbyname{\idemname}%
    \def\idemsnedbyname{\idemmidname}\def\idemPnedbyname{\idemname}\def\idempnedbyname{\idemmidname}%
    \def\bibidemSmname{\idemname}\def\bibidemsmname{\idemmidname}\def\bibidemPmname{\idemname}%
    \def\bibidempmname{\idemmidname}\def\bibidemSfname{\idemname}\def\bibidemsfname{\idemmidname}%
    \def\bibidemPfname{\idemname}\def\bibidempfname{\idemmidname}\def\bibidemSnname{\idemname}%
    \def\bibidemsnname{\idemmidname}\def\bibidemPnname{\idemname}\def\bibidempnname{\idemmidname}%
    \def\trans{\ifjbweareinbib trad.\else\ifjboxford trad.\else\ifjbchicago trad.\else Trad.\fi\fi\fi}%
    \def\transfrom{dal}%
    \def\Transfrom{Dal}%
    \def\transby{da}%
    \def\fromgerman{tedesco}%
    \def\fromenglish{inglese}%
    \def\fromfrench{francese}%
    \def\fromdutch{olandese}%
    \def\fromspanish{spagnolo}%
    \def\fromitalian{italiano}%
    \def\fromnorsk{norvegese}%
    \def\fromportuguese{TODO}%
    \def\fromfinnish{finlandese}%
    \def\Reprint{Ristampa}%
    \def\reprint{ristampa}%
    \def\reviewname{TODO}%
    \def\reviewofname{TODO}%
    \def\reviewbyname{TODO}%
    \def\updatesep{,}%
    \def\updatename{ultimo aggiornamento:}%
    \def\herename{a }%
    \def\foundername{\space\edfont{(TODO)}}% Founder of a series
    \def\afterfoundersep{\slash}%
    \addtoalllanguages%
}%
%</italian>
%<*norsk>
\ProvidesFile{nojbbib.ldf}[jurabib Norsk language definitions]
\def\bibsnorsk{%
    \def\etalname{\unskip\nobreakspace{}m.fl.}%
    \def\etalnamenodot{\unskip\nobreakspace{}m.fl}%
    \def\bibandname{og}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{og}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{\ifjboxford i:\else\ifjbchicago i\else I\fi\fi}%
    \def\incollinname{\ifjboxford i:\else\ifjbchicago i\else I\fi\fi}%
    \def\ofseriesname{of}%
    \def\volumeofname{of}%
    \def\inseriesname{i}%
    \def\editorname{\unskip,\space{}redakt\o r}%
    \def\editorsname{\unskip,\space{}redakt\o rer}%
    \def\sndeditorname{redakt\o r}%
    \def\sndeditorsname{redakt\o rer}%
    \def\edbyname{redigert av}%
    \def\Edbyname{Redigert av}%
    \def\byname{av}%
    \def\volname{bd.}%
    \def\volumename{bind}%
    \def\Volumename{Bind}%
    \def\numbername{nummer}%
    \def\editionname{utgave}%
    \def\bibchaptername{kap.}%
    \def\Bibchaptername{Kap.}%
    \def\bibchapterlongname{kapittel}%
    \def\jbpagename{s.}%
    \def\jbpagesname{sider}%
    \def\bibpagename{s.}%
    \def\bibpagesname{s.}%
    \def\bibtotalpagesname{sider}%
    \def\jbarchpagename{\jbpagename}%
    \def\jbarchpagesname{\jbpagesname}%
    \def\bibarchpagename{\bibpagename}%
    \def\bibarchpagesname{\bibpagesname}%
    \def\jbpagenamenodot{s}%
    \def\alsothesisname{ogs\aa}%
    \def\phdthesisname{Doktorgradsavhandling}%
    \def\mastersthesisname{Hovedoppgave}%
    \def\jurthesisname{diss. jur.}%
    \def\technicalreportname{Teknisk rapport}%
    \def\organizationname{\textup{(Org.)}}%
    \def\janname{januar}%
    \def\febname{februar}%
    \def\marname{mars}%
    \def\aprname{april}%
    \def\mayname{mai}%
    \def\junname{juni}%
    \def\julname{juli}%
    \def\augname{august}%
    \def\sepname{september}%
    \def\octname{oktober}%
    \def\novname{november}%
    \def\decname{desember}%
    \def\firstedname{1.}%
    \def\secondedname{2.}%
    \def\thirdedname{3.}%
    \def\fourthedname{4.}%
    \def\fifthedname{5.}%
    \def\thedname{.}%
    \def\urldatecomment{sjekket: }%
    \def\howcitedprefix{ henv: }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ ((Se note~}%
    \def\lookatsuffix{)}%
    \def\ibidemname{Ibid.}%
    \def\ibidemmidname{ibid.}%
    \def\idemname{Idem}%
    \def\idemmidname{idem}%
    \def\bibcontinuedname{(forts.)}%
    \def\idemSmname{\idemname}\def\idemsmname{\idemmidname}\def\idemPmname{\idemname}
    \def\idempmname{\idemmidname}\def\idemSfname{\idemname}\def\idemsfname{\idemmidname}%
    \def\idemPfname{\idemname}\def\idempfname{\idemmidname}\def\idemSnname{\idemname}%
    \def\idemsnname{\idemmidname}\def\idemPnname{\idemname}\def\idempnname{\idemmidname}%
    \def\idemSmedbyname{\idemname}\def\idemsmedbyname{\idemmidname}\def\idemPmedbyname{\idemname}%
    \def\idempmedbyname{\idemmidname}\def\idemSfedbyname{\idemname}\def\idemsfedbyname{\idemmidname}%
    \def\idemPfedbyname{\idemname}\def\idempfedbyname{\idemmidname}\def\idemSnedbyname{\idemname}%
    \def\idemsnedbyname{\idemmidname}\def\idemPnedbyname{\idemname}\def\idempnedbyname{\idemmidname}%
    \def\bibidemSmname{\idemname}\def\bibidemsmname{\idemmidname}\def\bibidemPmname{\idemname}%
    \def\bibidempmname{\idemmidname}\def\bibidemSfname{\idemname}\def\bibidemsfname{\idemmidname}%
    \def\bibidemPfname{\idemname}\def\bibidempfname{\idemmidname}\def\bibidemSnname{\idemname}%
    \def\bibidemsnname{\idemmidname}\def\bibidemPnname{\idemname}\def\bibidempnname{\idemmidname}%
    \def\trans{\ifjbweareinbib oversatt\else\ifjboxford oversatt\else\ifjbchicago oversatt\else Oversatt\fi\fi\fi}%
    \def\transfrom{fra}%
    \def\Transfrom{Fra}%
    \def\transby{av}%
    \def\fromgerman{tysk}%
    \def\fromenglish{engelsk}%
    \def\fromfrench{fransk}%
    \def\fromdutch{nederlandsk}%
    \def\fromspanish{spansk}%
    \def\fromitalian{italiensk}%
    \def\fromnorsk{norsk}%
    \def\fromportuguese{TODO}%
    \def\fromfinnish{TODO}%
    \def\Reprint{Opptrykk}%
    \def\reprint{opptrykk}%
    \def\reviewname{TODO}%
    \def\reviewofname{TODO}%
    \def\reviewbyname{TODO}%
    \def\updatesep{,}%
    \def\updatename{oppdatert senest:}%
    \def\herename{p\aa}%
    \def\foundername{\space\edfont{(TODO)}}% Founder of a series
    \def\afterfoundersep{\slash}%
    \addtoalllanguages%
}%
%</norsk>
%<*portuguese>
\ProvidesFile{ptjbbib.ldf}[jurabib Portuguese language definitions]
\def\bibsportuguese{%
    \def\etalname{\textit{\unskip\nobreakspace{}et\,al.}}%
    \def\etalnamenodot{\textit{\unskip\nobreakspace{}et\,al}}%
    \def\bibandname{e}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{e}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{\ifjboxford en:\else\ifjbchicago en\else En\fi\fi}%
    \def\incollinname{\ifjboxford en:\else\ifjbchicago en\else En\fi\fi}%
    \def\ofseriesname{da colec\c{c}\~a}%
    \def\volumeofname{de}%
    \def\inseriesname{em}%
    \def\editorname{\unskip,\space{}editor}%
    \def\editorsname{\unskip,\space{}editores}%
    \def\sndeditorname{editor}%
    \def\sndeditorsname{editores}%
    \def\edbyname{editado por}%
    \def\Edbyname{Editado por}%
    \def\byname{por}%
    \def\volname{vol.}%
    \def\volumename{volume}%
    \def\Volumename{Volume}%
    \def\numbername{n\'umero}%
    \def\editionname{edi\c{c}\~ao}%
    \def\bibchaptername{cap.}%
    \def\Bibchaptername{Cap.}%
    \def\bibchapterlongname{Cap\'itulo}%
    \def\jbpagename{p.}%
    \def\jbpagesname{pp.}%
    \def\jbpagenamenodot{p}%
    \def\bibpagename{p.}%
    \def\bibpagesname{pp.}%
    \def\bibtotalpagesname{p\'aginas}%
    \def\jbarchpagename{\jbpagename}%
    \def\jbarchpagesname{\jbpagesname}%
    \def\bibarchpagename{\bibpagename}%
    \def\bibarchpagesname{\bibpagesname}%
    \def\mastersthesisname{Tese de Mestrado}%
    \def\phdthesisname{Tese de Doutoramento}%
    \def\jurthesisname{Tese de Doutoramento}%
    \def\alsothesisname{tamb\'em}%
    \def\technicalreportname{Relat\'orio T\'ecnico}%
    \def\organizationname{Organiza\c{c}\~ao}%
    \def\janname{Janeiro}%
    \def\febname{Fevereiro}%
    \def\marname{Mar\c{c}o}%
    \def\aprname{Abril}%
    \def\mayname{Maio}%
    \def\junname{Junho}%
    \def\julname{Julho}%
    \def\augname{Agosto}%
    \def\sepname{Setembro}%
    \def\octname{Outubro}%
    \def\novname{Novembro}%
    \def\decname{Dezembro}%
    \def\firstedname{1.\textsuperscript{a}}%
    \def\secondedname{2.\textsuperscript{a}}%
    \def\thirdedname{3.\textsuperscript{a}}%
    \def\fourthedname{4.\textsuperscript{a}}%
    \def\fifthedname{5.\textsuperscript{a}}%
    \def\thedname{.\textsuperscript{a}}%
    \def\urldatecomment{acedido em }%
    \def\howcitedprefix{ (citado como }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ (ver nota }%
    \def\lookatsuffix{)}%
    \def\ibidemname{Ibidem}%
    \def\ibidemmidname{ibidem}%
    \def\idemname{idem}%
    \def\idemmidname{idem}%
    \def\bibcontinuedname{(cont.)}%
    \def\idemSmname{\idemname}\def\idemsmname{\idemmidname}\def\idemPmname{\idemname}
    \def\idempmname{\idemmidname}\def\idemSfname{\idemname}\def\idemsfname{\idemmidname}%
    \def\idemPfname{\idemname}\def\idempfname{\idemmidname}\def\idemSnname{\idemname}%
    \def\idemsnname{\idemmidname}\def\idemPnname{\idemname}\def\idempnname{\idemmidname}%
    \def\idemSmedbyname{\idemname}\def\idemsmedbyname{\idemmidname}\def\idemPmedbyname{\idemname}%
    \def\idempmedbyname{\idemmidname}\def\idemSfedbyname{\idemname}\def\idemsfedbyname{\idemmidname}%
    \def\idemPfedbyname{\idemname}\def\idempfedbyname{\idemmidname}\def\idemSnedbyname{\idemname}%
    \def\idemsnedbyname{\idemmidname}\def\idemPnedbyname{\idemname}\def\idempnedbyname{\idemmidname}%
    \def\bibidemSmname{\idemname}\def\bibidemsmname{\idemmidname}\def\bibidemPmname{\idemname}%
    \def\bibidempmname{\idemmidname}\def\bibidemSfname{\idemname}\def\bibidemsfname{\idemmidname}%
    \def\bibidemPfname{\idemname}\def\bibidempfname{\idemmidname}\def\bibidemSnname{\idemname}%
    \def\bibidemsnname{\idemmidname}\def\bibidemPnname{\idemname}\def\bibidempnname{\idemmidname}%
    \def\trans{\ifjbweareinbib trad.\else\ifjboxford trad.\else\ifjbchicago trad.\else Trad.\fi\fi\fi}%
    \def\transfrom{de}%
    \def\Transfrom{De}%
    \def\transby{por}%
    \def\fromgerman{alem\~ao}%
    \def\fromenglish{ingl\^es}%
    \def\fromfrench{franc\^es}%
    \def\fromdutch{holand\^es}%
    \def\fromspanish{espanhol}%
    \def\fromitalian{italiano}%
    \def\fromnorsk{noruegu\^es}%
    \def\fromportuguese{TODO}%
    \def\fromfinnish{TODO}%
    \def\Reprint{Reimpress\~ao}%
    \def\reprint{reimpress\~ao}%
    \def\reviewname{TODO}%
    \def\reviewofname{TODO}%
    \def\reviewbyname{TODO}%
    \def\updatesep{,}%
    \def\updatename{\'ultima actualiza\c{c}\~ao:}%
    \def\herename{aqui:~}%
    \def\foundername{\space\edfont{(orig.)}}%
    \def\afterfoundersep{\slash}%
    \addtoalllanguages%
}%
%</portuguese>
%<*finnish>
\ProvidesFile{fijbbib.ldf}[jurabib Finnish language definitions]
\def\bibsfinnish{%
    \def\etalname{\unskip\nobreakspace{}et\,al.}%
    \def\etalnamenodot{\unskip\nobreakspace{}et\,al}%
    \def\bibandname{ja}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{ja}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{\ifjboxford teoksessa:\else\ifjbchicago teoksessa\else Teoksessa\fi\fi}%
    \def\incollinname{\ifjboxford teoksessa:\else\ifjbchicago teoksessa\else Teoksessa\fi\fi}%
    \def\ofseriesname{sarjan}%
    \def\volumeofname{, }%
    \def\inseriesname{sarjassa}%
    \def\editorname{\unskip,\space{}toim.}%
    \def\editorsname{\unskip,\space{}toim.}%
    \def\sndeditorname{toim.}%
    \def\sndeditorsname{toim.}%
    \def\edbyname{toim.}%
    \def\Edbyname{Toim.}%
    \def\byname{}%
    \def\volname{osa}%
    \def\volumename{osa}%
    \def\Volumename{Osa}%
    \def\numbername{numero}%
    \def\editionname{versio}%
    \def\bibchaptername{luku}%
    \def\Bibchaptername{Luku}%
    \def\bibchapterlongname{luku}%
    \def\jbpagename{s.}%
    \def\jbpagesname{ss.}%
    \def\bibpagename{s.}%
    \def\bibpagesname{ss.}%
    \def\bibtotalpagesname{sivua}%
    \def\jbpagenamenodot{s}%
    \def\alsothesisname{my\"os}%
    \def\phdthesisname{V\"ait\"oskirja}%
    \def\mastersthesisname{Pro Gradu -ty\"o}%
    \def\jurthesisname{diss. jur.}%
    \def\technicalreportname{Tekninen raportti}%
    \def\organizationname{\textup{(Org.)}}%
    \def\janname{Tammikuu}%
    \def\febname{Helmikuu}%
    \def\marname{Maaliskuu}%
    \def\aprname{Huhtikuu}%
    \def\mayname{Toukokuu}%
    \def\junname{Kes\"akuu}%
    \def\julname{Hein\"akuu}%
    \def\augname{Elokuu}%
    \def\sepname{Syyskuu}%
    \def\octname{Lokakuu}%
    \def\novname{Marraskuu}%
    \def\decname{Joulukuu}%
    \def\firstedname{1.}%
    \def\secondedname{2.}%
    \def\thirdedname{3.}%
    \def\fourthedname{4.}%
    \def\fifthedname{5.}%
    \def\thedname{.}%
    \def\urldatecomment{vierailtu }%
    \def\howcitedprefix{ (siteerattu: }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ (ks. viite~}%
    \def\lookatsuffix{)}%
    \def\ibidemname{Ibid.}%
    \def\ibidemmidname{ibid.}%
    \def\idemname{Idem}%
    \def\idemmidname{idem}%
    \def\ajtsep{}%
    \def\bibcontinuedname{(jatkuu\ldots{})}%
    \def\idemSmname{\idemname}\def\idemsmname{\idemmidname}\def\idemPmname{\idemname}
    \def\idempmname{\idemmidname}\def\idemSfname{\idemname}\def\idemsfname{\idemmidname}%
    \def\idemPfname{\idemname}\def\idempfname{\idemmidname}\def\idemSnname{\idemname}%
    \def\idemsnname{\idemmidname}\def\idemPnname{\idemname}\def\idempnname{\idemmidname}%
    \def\idemSmedbyname{\idemname}\def\idemsmedbyname{\idemmidname}\def\idemPmedbyname{\idemname}%
    \def\idempmedbyname{\idemmidname}\def\idemSfedbyname{\idemname}\def\idemsfedbyname{\idemmidname}%
    \def\idemPfedbyname{\idemname}\def\idempfedbyname{\idemmidname}\def\idemSnedbyname{\idemname}%
    \def\idemsnedbyname{\idemmidname}\def\idemPnedbyname{\idemname}\def\idempnedbyname{\idemmidname}%
    \def\bibidemSmname{\idemname}\def\bibidemsmname{\idemmidname}\def\bibidemPmname{\idemname}%
    \def\bibidempmname{\idemmidname}\def\bibidemSfname{\idemname}\def\bibidemsfname{\idemmidname}%
    \def\bibidemPfname{\idemname}\def\bibidempfname{\idemmidname}\def\bibidemSnname{\idemname}%
    \def\bibidemsnname{\idemmidname}\def\bibidemPnname{\idemname}\def\bibidempnname{\idemmidname}%
    \def\trans{\ifjbweareinbib k\"a\"ant\"anyt\else\ifjboxford k\"a\"ant\"anyt\else\ifjbchicago k\"a\"ant\"anyt\else K\"a\"ant\"anyt\fi\fi\fi}%
    \def\transfrom{}%
    \def\Transfrom{}%
    \def\transby{}%
    \def\fromgerman{saksan kielest\"a}%
    \def\fromenglish{englannin kielest\"a}%
    \def\fromfrench{ranskan kielest\"a}%
    \def\fromdutch{hollannin kielest\"a}%
    \def\fromspanish{espanjan kielest\"a}%
    \def\fromitalian{italian kielest\"a}%
    \def\fromnorsk{norjan kielest\"a}%
    \def\fromportuguese{TODO}%
    \def\fromfinnish{suomen kielest\"a}%
    \def\Reprint{Uudelleenpainatus}%
    \def\reprint{uudelleenpainatus}%
    \def\reviewname{TODO}%
    \def\reviewofname{TODO}%
    \def\reviewbyname{TODO}%
    \def\updatesep{,}%
    \def\updatename{p\"aivitetty:}%
    \def\herename{t\"a\"all\"a:~}%
    \def\foundername{\space\edfont{(TODO)}}%
    \def\afterfoundersep{\slash}%
    \addtoalllanguages%
}%
%</finnish>
%<*danish>
\ProvidesFile{dajbbib.ldf}[jurabib Danish language definitions]
\def\bibsdanish{%
    \def\etalname{\unskip\nobreakspace{}et\,al.}%
    \def\etalnamenodot{\unskip\nobreakspace{}et\,al}%
    \def\bibandname{og}%
    \def\textandname{\bibandname}%
    \def\commaname{,}%
    \def\bibeandname{og}%
    \def\texteandname{\bibeandname}%
    \def\commaename{,}%
    \def\inname{\ifjboxford i:\else\ifjbchicago i\else I\fi\fi}%
    \def\incollinname{\ifjboxford i:\else\ifjbchicago i\else I\fi\fi}%
    \def\ofseriesname{af}%
    \def\volumeofname{af}%
    \def\inseriesname{i}%
    \def\editorname{\unskip,\space{}redakt\o r}%
    \def\editorsname{\unskip,\space{}redakt\o ere}%
    \def\sndeditorname{redakt\o r}%
    \def\sndeditorsname{redakt\o rer}%
    \def\edbyname{redigeret af}%
    \def\Edbyname{Redigeret af}%
    \def\byname{af}%
    \def\volname{vol.}%
    \def\volumename{volume}%
    \def\Volumename{Volume}%
    \def\numbername{Nummer}%
    \def\editionname{udgave}%
    \def\bibchaptername{kap.}%
    \def\Bibchaptername{Kap.}%
    \def\bibchapterlongname{kapitel}%
    \def\jbpagename{p.}%
    \def\jbpagesname{pp.}%
    \def\bibpagename{p.}%
    \def\bibpagesname{pp.}%
    \def\bibtotalpagesname{sider}%
    \def\jbarchpagename{\jbpagename}%
    \def\jbarchpagesname{\jbpagesname}%
    \def\bibarchpagename{\bibpagename}%
    \def\bibarchpagesname{\bibpagesname}%
    \def\jbpagenamenodot{p}%
    \def\alsothesisname{og}%
    \def\phdthesisname{Ph.\,D afhandling}%
    \def\mastersthesisname{Kandidat afhandling}%
    \def\jurthesisname {diss. jur.}%
    \def\technicalreportname{Teknisk rapport}%
    \def\organizationname{\textup{(Org.)}}%
    \def\janname{januar}%
    \def\febname{februar}%
    \def\marname{marts}%
    \def\aprname{april}%
    \def\mayname{maj}%
    \def\junname{juni}%
    \def\julname{juli}%
    \def\augname{august}%
    \def\sepname{september}%
    \def\octname{oktober}%
    \def\novname{november}%
    \def\decname{december}%
    \def\firstedname{1.}%
    \def\secondedname{2.}%
    \def\thirdedname{3.}%
    \def\fourthedname{4.}%
    \def\fifthedname{5.}%
    \def\thedname{.}%
    \def\urldatecomment{bes\o gt den }%
    \def\howcitedprefix{ (citeret: }%
    \def\howcitedsuffix{)}%
    \def\lookatprefix{ (som i nr.~}%
    \def\lookatsuffix{)}%
    \def\ibidemname{Ibid.}%
    \def\ibidemmidname{ibid.}%
    \def\idemname{Idem}%
    \def\idemmidname{idem}%
    \def\bibcontinuedname{(forts.)}%
    \def\idemSmname{\idemname}\def\idemsmname{\idemmidname}\def\idemPmname{\idemname}
    \def\idempmname{\idemmidname}\def\idemSfname{\idemname}\def\idemsfname{\idemmidname}%
    \def\idemPfname{\idemname}\def\idempfname{\idemmidname}\def\idemSnname{\idemname}%
    \def\idemsnname{\idemmidname}\def\idemPnname{\idemname}\def\idempnname{\idemmidname}%
    \def\idemSmedbyname{\idemname}\def\idemsmedbyname{\idemmidname}\def\idemPmedbyname{\idemname}%
    \def\idempmedbyname{\idemmidname}\def\idemSfedbyname{\idemname}\def\idemsfedbyname{\idemmidname}%
    \def\idemPfedbyname{\idemname}\def\idempfedbyname{\idemmidname}\def\idemSnedbyname{\idemname}%
    \def\idemsnedbyname{\idemmidname}\def\idemPnedbyname{\idemname}\def\idempnedbyname{\idemmidname}%
    \def\bibidemSmname{\idemname}\def\bibidemsmname{\idemmidname}\def\bibidemPmname{\idemname}%
    \def\bibidempmname{\idemmidname}\def\bibidemSfname{\idemname}\def\bibidemsfname{\idemmidname}%
    \def\bibidemPfname{\idemname}\def\bibidempfname{\idemmidname}\def\bibidemSnname{\idemname}%
    \def\bibidemsnname{\idemmidname}\def\bibidemPnname{\idemname}\def\bibidempnname{\idemmidname}%
    \def\trans{\ifjbweareinbib oversat\else\ifjboxford oversat\else\ifjbchicago oversat\else Oversat\fi\fi\fi}%
    \def\transfrom{fra}%
    \def\Transfrom{Fra}%
    \def\transby{af}%
    \def\fromgerman{tysk}%
    \def\fromenglish{engelsk}%
    \def\fromfrench{fransk}%
    \def\fromdutch{nederlandsk}%
    \def\fromspanish{spansk}%
    \def\fromitalian{italiensk}%
    \def\fromnorsk{norsk}%
    \def\fromportuguese{portugisisk}%
    \def\fromfinnish{finsk}%
    \def\Reprint{Genoptryk}%
    \def\reprint{genoptryk}%
    \def\reviewname{Anmeldelse}%
    \def\reviewofname{af}%
    \def\reviewbyname{af}%
    \def\updatesep{,}%
    \def\updatename{sidste opdatering:}%
    \def\herename{her:~}%
    \def\foundername{\space\edfont{(TODO)}}%
    \def\afterfoundersep{\slash}%
    \addtoalllanguages%
}%
%</danish>
%<*jbtesttex|jbtestbttex>
\documentclass[12pt]{book}
\usepackage[latin1]{inputenc}
\usepackage[%
 %citefull=first,%
 %citefull=chapter,%
 %citefull=section,%
 %citefull=all,%
 %
 %authorformat=smallcaps,%
 %authorformat=italic,%
 %authorformat=dynamic,%
 %authorformat=citationreversed,%
 %authorformat=allreversed,%
 %authorformat=firstnotreversed,%
 %authorformat=reducedifibidem,%
 %authorformat=abbrv,%
 %authorformat=and,%
 %authorformat=year,%
 %authorformat=indexed,%
 %
 %annotatorformat=italic,%
 %annotatorformat=normal,%
 %
 %annotatorfirstsep=in,%
 %annotatorfirstsep=comma,%
 %annotatorlastsep=divis,%
 %
 %titleformat=italic,%
 %titleformat=all,%
 %titleformat=commasep,%
 %titleformat=colonsep,%
 %titleformat=noreplace,%
 %
 %ibidem=strict,%
 %ibidem=strictdoublepage,%
 %ibidem=nostrict,%
 %ibidem=name,%
 %ibidem=name&title,%
 %ibidem=name&title&auto,%
 %
 %idem=strict,%
 %idem=strictdoublepage,%
 %idem=nostrict,%
 %
 %opcit=true,%
 %opcit=chapter,%
 %opcit=section,%
 %
 %bibformat=tabular,%
 %bibformat=nohang,%
 %bibformat=numbered,%
 %bibformat=ibidem,%
 %bibformat=ibidemalt,%
 %bibformat=compress,%
 %bibformat=raggedright,%
 %
 %crossref=long,%
 %crossref=short,%
 %crossref=dynamic,%
 %
 %superscriptedition=all,%
 %superscriptedition=switch,%
 %superscriptedition=commented,%
 %superscriptedition=bib,%
 %
 %pages=always,%
 %pages=test,%
 %pages=format,%
 %
 %howcited=all,%
 %howcited=normal,%
 %howcited=compare,%
 %howcited=multiple,%
 %
 %dotafter=bibentry,%
 %dotafter=endnote,%
 %
 %see=true,%
 %lookat=true,%
 %human=true,%
 %oxford=true,%
 %chicago=true,%
 %edby=true,%
 %endnote=true,%
 %biblikecite=true,%
 %commabeforerest=true,%
 %round,%
 %square,%
 %annote=true,%
 %citetoend=true,%
 %hypercite=false,%
 %super,
 %lookforgender,
 %silent,%
 %jurabiborder,%
 %config=your_config_filename_here%
]{jurabib}
%</jbtesttex|jbtestbttex>
%<jbtestbttex>\usepackage{bibtopic}
%
%<jbtesttex|jbtestbttex>\begin{document}
%
%<jbtesttex>\bibliography{jbtest}
%
%<jbtesttex|jbtestbttex>\bibliographystyle{jurabib}
%
%<*jbtestbttex>
\chapter*{Literature}
\begin{btSect}{book}
\section*{Monographs}
\btPrintCited
\end{btSect}
\begin{btSect}{comment}
\section*{Commentaries}
\btPrintCited
\end{btSect}
%</jbtestbttex>
%
%<*jbtesttex|jbtestbttex>
This is a test\footcite[Rn.~357]{medicus}\footcite[Rn.~78]{broxbgb}\footcite[Rn.~168]{broxbgb}
\newpage
\footcite[Rn.~170]{broxbgb}%
\footcite[Rn.~473]{broxbgb}%
\footcite[Rn.~709]{musielak}%
\footcite[Leptien][\S~167, Rn.~38]{soergel}%
\footcite[\S~15, III, 1]{koehler}%
\footfullcite[Rn. 186]{broxbgb}%
\footcite[Brox][\S~147, Rn.~2]{erm}%
\footcite[Rn.~493]{broxbgb}%
\footcite[Rn.~372]{broxbgb}%
\footcite[Rn.~944]{medicus}%
\footcite[Rn.~949]{huebner}%
\footcite[Brox][\S~167, Rn.~27]{erm}%
\footfullcite{jbtesturl}
\end{document}
%</jbtesttex|jbtestbttex>
%
%<*jbtestcbtex>
\documentclass[12pt]{report}
\usepackage{german}
\usepackage[%
    authorformat=smallcaps,%
    commabeforerest,%
    titleformat=colonsep,%
    bibformat={tabular,ibidem},%
    pages=format,%
]{jurabib}
\usepackage[duplicate]{chapterbib}
\usepackage{remreset}
\renewcommand*{\StartFinalBibs}{%
    \renewcommand*{\refname}{\chaptername\space\thechapter}%
}%
\makeatletter
\@removefromreset{footnote}{chapter}
\renewcommand*{\bib@heading}{%
    \section*{\refname\@mkboth{\refname}{\refname}}%
}%
\makeatother
\begin{document}
\tableofcontents
\include{jbtestcb1}
\include{jbtestcb2}
\chapter*{Literature}\addcontentsline{toc}{chapter}{Literature}
\bibliographystyle{jurabib}
\bibliography{jbtest}
\end{document}
%</jbtestcbtex>
%<*jbtestcb1>
\chapter{One}

    That's a very small example document to illustrate the usage of \textsf{jurabib}
    \footcite[34]{broxschr} together with \textsf{chapterbib}.\footcite[34]{broxbgb}

\bibliographystyle{jurabib}
\bibliography{jbtest}
%</jbtestcb1>
%
%<*jbtestcb2>
\chapter{Two}

    That's a very small example document to illustrate the usage of \textsf{jurabib}
    \footcite[34]{broxschr} together with \textsf{chapterbib}.\footcite[34]{palandt}

\bibliographystyle{jurabib}
\bibliography{jbtest}
%</jbtestcb2>
%
%<*jbtestbib|book>
@BOOK{broxbgb,
  author      = {Hans Brox},
  title       = {Allgemeiner Teil des B{\"u}rgerlichen Gesetzbuches},
  shorttitle  = {BGB~AT},
  year        = 1996,
  language    = {german},
  address     = {K{\"o}ln, Berlin, Bonn, M{\"u}nchen},
  edition     = 20,
  annote      = {This is a senseless test for testing the annote field.\par If
                 you are reading this text now, note that you can switch
                 off the output of this field by removing the \texttt{annote} option
                 \begin{itemize}\item You are able to use lists inside the annote field\end{itemize}}
}
@BOOK{broxschr,
  author      = {Hans Brox},
  title       = {Besonderes Schuldrecht},
  shorttitle  = {SchR~BT},
  year        = 1995,
  language    = {german},
  address     = {M{\"u}nchen},
  edition     = 20
}
@BOOK{canaris,
  author      = {Claus Wilhelm Cannabis},
  title       = {Die Vertrauenshaftung im deutschen Privatrecht},
  shorttitle  = {Vertrauenshaftung},
  year        = 1971,
  language    = {german},
  address     = {M{\"u}nchen}
}
@BOOK{ennenipp,
  author      = {Ludwig Enneccerus and Hans Carl Nipperdey},
  title       = {Allgemeiner Teil des B{\"u}rgerlichen Rechts},
  year        = 1960,
  volume      = {1},
  language    = {german},
  volumetitle = {zweiter Halbband},
  address     = {T{\"u}bingen},
  edition     = 15
}
@BOOK{huebner,
  author      = {Heinz H{\"u}bner},
  title       = {Allgemeiner Teil des B{\"u}rgerlichen Gesetzbuches},
  shorttitle  = {BGB~AT},
  year        = 1996,
  language    = {german},
  address     = {Berlin, New York},
  edition     = 2
}
@BOOK{koehler,
  author      = {Helmut K{\"o}hler},
  title       = {BGB Allgemeiner Teil},
  shorttitle  = {BGB~AT},
  language    = {german},
  year        = 1996,
  address     = {M{\"u}nchen},
  edition     = 23
}
@BOOK{medicus,
  author      = {Dieter Medicus},
  title       = {Allgemeiner Teil des BGB},
  shorttitle  = {BGB~AT},
  year        = 1995,
  howcited    = 1,
  address     = {M{\"u}nchen},
  edition     = {6}
}
@BOOK{musielak,
  author      = {Hans-Joachim Musielak},
  title       = {Grundkurs BGB},
  shorttitle  = {BGB~GK},
  language    = {german},
  year        = 1994,
  address     = {M{\"u}nchen}
}
@BOOK{alexy,
  author      = {Alexy, Robert},
  title       = {Theorie der Grundrechte},
  year        = 1985,
  address     = {Baden-Baden},
  school      = {G{\"o}ttingen},
  dissyear    = 1984
}
@BOOK{kkstrr,
  author      = {Kurt Kodal and Joachim Kr{\"a}mer},
  title       = {Stra{\ss}enrecht},
  shorttitle  = {StrR},
  year        = 1995,
  address     = {M{\"u}nchen},
  edition     = {5},
  pages       = {30--34, \S~24}
}
%</jbtestbib|book>
%<*jbtestbib>
@ARTICLE{broxja,
  author      = {Hans Brox},
  gender      = {sm},
  title       = {Die Anfechtung bei der Stellvertretung},
  journal     = {JA},
  language    = {german},
  year        = 1980,
  address     = {M{\"u}nchen}
}
@ARTICLE{eujenfrank,
  author      = {Heiko Eujen and Rainer Frank},
  gender      = {pm},
  title       = {Anfechtung der Bevollm{\"a}chtigung nach Abschluß des
                 Vertretergesch{\"a}ftes\,?},
  language    = {german},
  journal     = {JZ},
  year        = 1973
}
@ARTICLE{proelss,
  author      = {J{\"u}rgen Pr{\"o}lss},
  gender      = {sm},
  title       = {Vertretung ohne Vertretungsmacht\,?},
  journal     = {JuS},
  language    = {german},
  year        = 1985
}
@PERIODICAL{oellers,
  author      = {Bernd Oellers},
  gender      = {sm},
  title       = {Doppelwirkung im Recht\,?},
  journal     = {AcP},
  language    = {german},
  year        = 1969,
  volume      = 169
}
%</jbtestbib>
%<*jbtestbib|comment>
@COMMENTED{erm,
  author      = {Walther Erman},
  gender      = {sm},
  title       = {Handkommentar zum B{\"u}rgerlichen Gesetzbuch},
  address     = {M{\"u}nster},
  language    = {german},
  year        = 1993,
  volume      = 1,
  edition     = {9}
}
@COMMENTED{mueko,
  title       = {Kommentar zum B{\"u}rgerlichen Gesetzbuch},
  shortauthor = {M{\"u}Ko},
  address     = {M{\"u}nchen},
  language    = {german},
  year        = 1994,
  volume      = 2,
  volumetitle = {-- Schuldrecht -- Allgemeiner Teil},
  edition     = {3}
}
@COMMENTED{palandt,
  author      = {Otto Palandt},
  gender      = {sm},
  title       = {Kommentar zum B{\"u}rgerlichen Gesetzbuch},
  address     = {M{\"u}nchen},
  language    = {german},
  year        = 1996,
  edition     = {6}
}
@COMMENTED{soergel,
  author      = {Hans Theodor Soergel},
  gender      = {sm},
  title       = {Kommentar zum B{\"u}rgerlichen Gesetzbuch},
  address     = {Stuttgart, Berlin, K{\"o}ln, Mainz},
  year        = 1987,
  howcited    = 1,
  edition     = 12,
  volume      = 1,
  language    = {german}
}
%</jbtestbib|comment>
%<*jbtestbib|other>
@MASTERSTHESIS{alexymthesis,
  author      = {Alexy, Robert},
  gender      = {sm},
  title       = {Theorie der Grundrechte},
  year        = 1984,
  school      = {G{\"o}ttingen}
}
@PHDTHESIS{alexyphdthesisi,
  author      = {Alexy, Robert},
  gender      = {sm},
  title       = {Theorie der Grundrechte},
  year        = 1984,
  school      = {G{\"o}ttingen}
}
@PHDTHESIS{alexyphdthesisii,
  author      = {Alexy, Robert},
  gender      = {sm},
  title       = {Theorie der Grundrechte},
  year        = 1984,
  type        = {Habil.},
  school      = {G{\"o}ttingen}
}
@JURTHESIS{alexyjurthesisi,
  author      = {Alexy, Robert},
  gender      = {sm},
  title       = {Theorie der Grundrechte},
  year        = 1984,
  school      = {G{\"o}ttingen}
}
@JURTHESIS{alexyjurthesis,
  author      = {Alexy, Robert},
  gender      = {sm},
  title       = {Theorie der Grundrechte},
  year        = 1984,
  type        = {Habil.},
  school      = {G{\"o}ttingen}
}
@WWW{jbtesturl,
  author      = {Jens Berger},
  gender      = {sm},
  title       = {Home of jurabib},
  url         = {http://www.jurabib.org/docs/english/jbendoc.html},
}
%</jbtestbib|other>
%<*config>
\ProvidesFile{jurabib.cfg}[jurabib local configuration file]
\jurabibsetup{%
 %citefull=first,%
 %citefull=chapter,%
 %citefull=section,%
 %citefull=all,%
 %
 %authorformat=smallcaps,%
 %authorformat=italic,%
 %authorformat=dynamic,%
 %authorformat=citationreversed,%
 %authorformat=allreversed,%
 %authorformat=firstnotreversed,%
 %authorformat=reducedifibidem,%
 %authorformat=abbrv,%
 %authorformat=and,%
 %authorformat=year,%
 %authorformat=indexed,%
 %
 %annotatorformat=italic,%
 %annotatorformat=normal,%
 %
 %annotatorfirstsep=in,%
 %annotatorfirstsep=comma,%
 %annotatorlastsep=divis,%
 %
 %titleformat=italic,%
 %titleformat=all,%
 %titleformat=commasep,%
 %titleformat=colonsep,%
 %titleformat=noreplace,%
 %
 %ibidem=strict,%
 %ibidem=strictdoublepage,%
 %ibidem=nostrict,%
 %ibidem=name,%
 %ibidem=name&title,%
 %ibidem=name&title&auto,%
 %
 %idem=strict,%
 %idem=strictdoublepage,%
 %idem=nostrict,%
 %
 %opcit=true,%
 %opcit=chapter,%
 %opcit=section,%
 %
 %bibformat=tabular,%
 %bibformat=nohang,%
 %bibformat=numbered,%
 %bibformat=ibidem,%
 %bibformat=ibidemalt,%
 %bibformat=compress,%
 %bibformat=raggedright,%
 %
 %crossref=long,%
 %crossref=short,%
 %crossref=dynamic,%
 %
 %superscriptedition=all,%
 %superscriptedition=switch,%
 %superscriptedition=commented,%
 %superscriptedition=bib,%
 %
 %pages=always,%
 %pages=test,%
 %pages=format,%
 %
 %howcited=all,%
 %howcited=normal,%
 %howcited=compare,%
 %howcited=multiple,%
 %
 %dotafter=bibentry,%
 %dotafter=endnote,%
 %
 %see=true,%
 %lookat=true,%
 %human=true,%
 %oxford=true,%
 %chicago=true,%
 %edby=true,%
 %endnote=true,%
 %biblikecite=true,%
 %commabeforerest=true,%
 %round,%
 %square,%
 %annote=true,%
 %citetoend=true,%
 %hypercite=false,%
 %super,
 %lookforgender,
 %silent,%
 %jurabiborder,%
 %config=your_config_filename_here%
}
%</config>
%<*jbtesthutex>
\documentclass[12pt,a4paper,german,dutch,english]{article}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[%
     titleformat=italic,%
     titleformat=all,%
     titleformat=noreplace,%
     titleformat=commasep,%
     commabeforerest,%
     ibidem=strict,%
     citefull=first,%
     lookat,%
     oxford,%
     pages=format,%
]{jurabib}

\begin{document}
\footcite[23--67]{bergmeier80}%
\footcite[23--67]{helm72}%
\footcite[23--67]{helm82}%
\footcite[23--67]{helm82a}%
\footcite[23--67]{helm97}%
\footcite[23--67]{LunWalThis99}%
\footcite[23--67]{bergmeier80}%
\footcite[23--67]{Thiselton99}%
\footcite[23--67]{LunWalThis99}%
\footcite[23--67]{Lundin99}%
\footcite[23--67]{Lundin99}%
\footcite[67f]{Lundin99}%
\footcite[23--67]{Kraft74}%
\footcite[23--67]{Oberman88}%

\footcite[67ff]{bergmeier80}%
\footcite[67]{helm72}%
\footcite[67]{helm82}%
\footcite[67]{helm82a}%
\footcite[67]{helm97}%
\footcite[67]{bergmeier80}%
\footcite[67]{Thiselton99}%
\footcite[67]{LunWalThis99}%
\footcite[67]{Lundin99}%
\footcite[67]{Kraft74}%
\footcite[67]{Oberman88}%
\footnote{In ``\citefield{title}{Thiselton99}'' Thiselton said~\dots}

This is a very simple test document to illustrate some of the
capabilities of \textsf{jurabib} in the humanities.
If someone can contribute a better one, please e-mail me:
\texttt{jb@jurabib.org}.


\bibliographystyle{jurabib}
%%\bibliographystyle{jox}
\bibliography{jbtesthu}

\end{document}
%</jbtesthutex>
%<*jbtestmbtex>
\documentclass{article}
\usepackage{jurabib}
\usepackage{multibib}% multibib has to be loaded after jurabib

%% Definition of _sec_ond bibliography
\newcites{sec}{Secondary Literature}

%% Remember: You have to run 'bibtex sec' to produce the _sec_ond bibliography!

\begin{document}

This is a simple test document to demonstrate \textsf{jurabib} and \textsf{multibib} interaction.
This citation appears in the normal bibliography\footcite{helm72}.
This citation appears in the second bibliography\footcitesec{helm82}.

%% The normal bibliography
\bibliography{jbtesthu}
\bibliographystyle{jurabib} 

%% The _sec_ond bibliography
\bibliographysec{jbtesthu}
\bibliographystylesec{jurabib}  

\end{document}
%</jbtestmbtex>
%<*jbtestbutex>
\documentclass{article}
\usepackage{jurabib}
\usepackage{bibunits}

%% Remember: You have to run 'bibtex bu1' for the first and 'bibtex bu2' for the second bibliography!

\begin{document}

\begin{bibunit}[jurabib]
    A small bibunit to demonstrate \textsf{jurabib} and \textsf{bibunits} interaction~\cite{helm72}.
    \putbib[jbtesthu]
\end{bibunit}

\begin{bibunit}[jureco]
    A new bibunit with a different style~\cite{helm82}.
    \putbib[jbtesthu]
\end{bibunit}

\end{document}
%</jbtestbutex>
%<*jbtesthubib>
@BOOK{bergmeier80,
  author      = {Bergmeier, Roland},
  gender      = {sm},
  title       = {Glaube als Gabe nach Johannes: Religions- und
                Theologiegeschichtliche Studien zum pr{\"a}destinatianischen
                Dualismus im vierten Evangelium},
  publisher   = {W. Kohlhammer},
  year        = 1980,
  volume      = 112,
  series      = {Beitr{\"a}ge zur Wissenschaft vom Alten und Neuen Testament},
  address     = {Stuttgart etc.},
  keywords    = {Predestinatie; Johannes; Gnostiek; Qumran; Dualisme},
  language    = {german},
  shorttitle  = {Glaube als Gabe},
  annote      = {This is a senseless test for testing the annote field.\par If
                 you are reading this text now, note that you can switch
                 off the output of this field by removing the \texttt{annote} option
                 \begin{itemize}\item You are able to use lists inside the annote field\end{itemize}}
}
@ARTICLE{helm72,
  author      = {Helm, Paul},
  gender      = {sm},
  title       = {Revealed Propositions and Timeless Truths},
  journal     = {Religious Studies},
  year        = 1972,
  volume      = 8,
  pages       = {127--136},
  comment     = {Nog eens kopieren}
}
@BOOK{helm82,
  author      = {Helm, Paul},
  gender      = {sm},
  title       = {Divine Revelation: The Basic Issues},
  year        = 1982,
  address     = {London},
  annote      = {Verdediging van propositionele visie op Openbaring},
  language    = {english},
  shorttitle  = {Divine Revelation}
}
@INCOLLECTION{helm82a,
  author      = {Helm, Paul},
  gender      = {sm},
  title       = {The Role of Logic in Biblical Interpretation},
  editor      = {E. Radmacher and R. Preus},
  booktitle   = {Hermeneutics, Inerrancy, \& the Bible},
  year        = 1982,
  pages       = {841--858},
  address     = {Grand Rapids},
  language    = {english},
  shorttitle  = {Role of Logic}
}
@BOOK{helm97,
  author      = {Helm, Paul},
  gender      = {sm},
  title       = {Faith and Understanding},
  year        = 1997,
  series      = {Reason and Religion},
  address     = {Edinburgh},
  publisher   = {Edinburgh University Press},
  language    = {english}
}
@INCOLLECTION{Thiselton99,
  author      = {Thiselton, Anthony C.},
  gender      = {sm},
  title       = {Communicative Action and Promise in
                 Interdisciplinary, Biblical, and Theological Hermeneutics},
  booktitle   = {The Promise of Hermeneutics},
  pages       = {133--240},
  crossref    = {LunWalThis99},
  shorttitle  = {Communicative Action}
}
@BOOK{LunWalThis99,
  editor      = {Lundin, Roger and Walhout, Clarence and Thiselton, Anthony C.},
  gender      = {pm},
  year        = 1999,
  title       = {The Promise of Hermeneutics},
  publisher   = {Eerdmans},
  address     = {Grand Rapids},
  shorttitle  = {Promise}
}
@INCOLLECTION{Lundin99,
  author      = {Lundin, Roger},
  gender      = {sm},
  title       = {Interpreting Orphans: Hermeneutics in the Cartesian
                 Tradition},
  booktitle   = {The Promise of Hermeneutics},
  pages       = {1--64},
  crossref    = {LunWalThis99},
  shorttitle  = {Interpreting Orphans}
}
@Book{Oberman88,
  author      = {Oberman, Heiko Augustinus},
  gender      = {sm},
  title       = {De erfenis van Calvijn: grootheid en grenzen: drie
                 lezingen},
  publisher   = {Kok},
  year        = 1988,
  address     = {Kampen},
  annote      = {zie liter},
  series      = {Kuyper-voordrachten},
  language    = {dutch}
}
@Book{Kraft74,
  editor      = {Kraft, Robert A. and Attridge, Harold and Spittler, Russell and Timbie, Janet},
  gender      = {pm},
  title       = {The Testament of Job According to the SV Text},
  publisher   = {Society of Biblical Literature \& Scholars' Press},
  year        = 1937,
  volume      = 4,
  series      = {Texts and Translations 5: Pseudepigrapha Series},
  address     = {Missoula, Montana},
}
%</jbtesthubib>
%<*jblongcfg>
%% This is a example configuration file to use for exam homeworks,
%% dissertations and the like for german law students, contributed
%% by Tilman Finke (Tilman.Finke@web.de) If you want to use it,
%% rename it to `jurabib.cfg'.
%% If you want to share your personal configuration file (e.g. if it
%% reflects the requests of your university), please send it to
%% jb@jurabib.org
\jurabibsetup{authorformat=dynamic,
              superscriptedition=all,
              titleformat=all,
              titleformat=commasep,
              titleformat=noreplace,
              annotatorlastsep=divis,
              howcited=compare,
              commabeforerest,
              bibformat=ibidemalt,
              bibformat=compress,
              pages=always}
\renewcommand*{\bibjtsep}{in: }
\renewcommand*{\bibatsep}{,}
\renewcommand*{\bibbdsep}{}
\renewcommand*{\jbaensep}{,}
\jbdotafterbibentry
\formatpages[ ]{article}{(}{)}
%</jblongcfg>
\endinput
%   \fi
%    \Finale
%\endinput
