1

I know that biblatex is probably the better option for this problem, but this is going to be the last change to a document, which is going to be published afterwards and hence we simply cannot take the risk of a change at this point.

The questions origin is Comma of cite by jurabib not in italics after italic author and while the problem itself is solved, there is now an issue with references, that have enough authors to be replaced with et al. In those cases, we now also have an italic comma after a regular et al. While I think the et al. needs to be regular, the comma should now be regular, too.

So the question is, is there a possibility with jurabib to format the comma based on an et al. in front?

This is the code:

\documentclass[]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{color} 
\usepackage{filecontents}
\usepackage[bibformat=tabular,authorformat={dynamic},titleformat=commasep,titleformat=all,commabeforerest,howcited=compare,annote]{jurabib}


\begin{filecontents}{literatur.bib}
@InCollection{Althoff_Inszenierte_Freiwilligkeit,
  author     = {Gerd Althoff},
  title      = {Inszenierte Freiwilligkeit. Techniken der Entmachtung im Mittelalter},
  booktitle  = {Herrschaftsverlust und Machtverfall},
    year = {2013},
  address    = {M\"unchen},
  howcited   = {1},
  shorttitle = {Inszenierte}
},
@book{TooManyAuthors,
  author     = {First Author and Second Author and Third Author and Fourth Author},
  title      = {This book has too many authors},
  year = {2004},
  address    = {Hamburg},
  howcited   = {1},
  shorttitle = {Too many}
}
\end{filecontents}

\newcommand*{\textitnic}[1]{{\itshape #1}}
\renewcommand{\jbhowsepbeforetitle}{\textitnic{,\space}}

\renewcommand*{\jbauthorfont}{\textitnic}%
\renewcommand*{\jbauthorfnfont}{\textitnic}%
\renewcommand*{\jborgauthorfont}{\textitnic}%
\renewcommand*{\jbannotatorfont}{\textitnic}%
\renewcommand*{\jbactualauthorfont}{\textitnic}%

\begin{document}

\cite{Althoff_Inszenierte_Freiwilligkeit} $\leftarrow$ cite with one author, comma italic like author name

\cite{TooManyAuthors} $\leftarrow$ Italic comma after non-italic et al.

\textit{Author} \normalfont et\,al.\textit{,} $\leftarrow$ actual

\textit{Author} \normalfont et\,al., $\leftarrow$ expected

\bibliography{literatur}
\bibliographystyle{jurabib}

\end{document}

And this is the current output: enter image description here

1 Answer 1

1

Here is a brute-force solution that sets a flag when "et al." is printed, that flag can be used to decide not to print the author title separator \jbhowsepbeforetitle in italics.

\documentclass[]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{color} 
\usepackage{filecontents}
\usepackage[bibformat=tabular,
            authorformat={dynamic},
            titleformat=commasep, titleformat=all,
            commabeforerest,
            howcited=compare,
            annote]{jurabib}

\makeatletter
\newif\ifjbetaltwo
% definition copied from jurabib.sty
% we only added the
% \global\jbetaltwotrue
\renewcommand*{\jb@checked@etal}{%
  \let\@latex@info\@gobble
  \DeclareRobustCommand{\Bibetal}{%
      \bibIMfont{\etalname}%
      \global\jbetaltwotrue
      \ifthenelse{\equal{\jb@@newpagecite}{}%
                  \or
                  \(
                      \boolean{jb@firstcite@full}%
                      \and
                      \equal{\jb@@newpagecite}{}%
                      \and
                      \equal{\@nameuse{citefull@\jb@@newauthorcite}}{citefull}%
                  \)
      }{%
           \ifthenelse{%
                \not\boolean{jbcross}%
                \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
           }{}%
      }{}%
 }%
}%
\makeatother

\newcommand*{\textitnic}[1]{{\itshape #1}}
\renewcommand{\jbhowsepbeforetitle}{%
  \ifjbetaltwo
    ,\space
  \else
    \textitnic{,\space}%
  \fi
  \global\jbetaltwofalse}

\renewcommand*{\jbauthorfont}{\textitnic}%
\renewcommand*{\jbauthorfnfont}{\textitnic}%
\renewcommand*{\jborgauthorfont}{\textitnic}%
\renewcommand*{\jbannotatorfont}{\textitnic}%
\renewcommand*{\jbactualauthorfont}{\textitnic}%

\begin{filecontents}{\jobname.bib}
@InCollection{Althoff_Inszenierte_Freiwilligkeit,
  author     = {Gerd Althoff},
  title      = {Inszenierte Freiwilligkeit. Techniken der Entmachtung im Mittelalter},
  booktitle  = {Herrschaftsverlust und Machtverfall},
    year = {2013},
  address    = {M\"unchen},
  howcited   = {1},
  shorttitle = {Inszenierte}
},
@book{TooManyAuthors,
  author     = {First Author and Second Author and Third Author and Fourth Author},
  title      = {This book has too many authors},
  year = {2004},
  address    = {Hamburg},
  howcited   = {1},
  shorttitle = {Too many}
}
\end{filecontents}

\begin{document}
\cite{Althoff_Inszenierte_Freiwilligkeit}

\cite{TooManyAuthors}

\cite{Althoff_Inszenierte_Freiwilligkeit}

\bibliographystyle{jurabib}
\bibliography{\jobname}
\end{document}

Roman, i.e. non-italic, comma after "et al."

I tried to make the required code as short as possible. By now you probably know that digging in the internals of jurabib is a bit of a hit-and-miss, so scrutinise the output carefully.

1
  • This is amazing, thank you so much @moewe! And yes I see how problematic this can be with jurabib, therefore as mentioned I hope this is the last time I needed such a dirty trick before publication.
    – TobiBS
    Commented Apr 1, 2020 at 20:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .