为什么作者后面的逗号在 author 后面是斜体,而在 et al. 后面却是常规逗号?

为什么作者后面的逗号在 author 后面是斜体,而在 et al. 后面却是常规逗号?

我知道这biblatex可能是解决这个问题的更好的选择,但这将是对文档的最后一次更改,之后将会发布,因此我们现在根本不能冒险进行更改。

问题的起源是斜体作者后的 cite by jurabib 逗号未用斜体表示虽然问题本身已经解决,但现在参考文献中又出现了一个问题,因为作者数量足够多,因此需要用 et al 来代替。在这种情况下,我们现在在常规 et al 后面也有一个斜体逗号。虽然我认为 et al. 需要是常规的,但逗号现在也应该是常规的。

所以问题是,是否可以jurabib根据前面的 et al. 来格式化逗号?

这是代码:

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

这是当前的输出: 在此处输入图片描述

答案1

这是一个强力解决方案,它在打印“et al.”时设置一个标志,该标志可用于决定不以\jbhowsepbeforetitle斜体打印作者标题分隔符。

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

罗马数字,即非斜体,“et al.”后面有逗号。

我尝试使所需代码尽可能简短。现在您可能知道,深入研究内部结构jurabib有点碰运气,因此请仔细检查输出。

相关内容