在 Biblatex 中将作者斜体化

在 Biblatex 中将作者斜体化

我想在我的参考书目中将会议论文的作者姓名用斜体显示。我正在使用 biblatex,但我不知道该怎么做。(我也不知道如何使用 bibtex。)

我曾尝试改变

author = {John Smith and Jim Smythe}

author = {John Smith and \emph{Jim Smythe}}

这种方法虽然能部分解决问题,但会弄乱引用标签(SS12 变成 Se12,S12 变成12)。有没有聪明的方法可以做到这一点?我在这里的前 10 页搜索结果中找不到帮助。谢谢!

答案1

人名被分成几个部分,因此不应进行格式化。解决此问题的一种方法是使用额外的书目数据来指示演讲者。在这里,我们将演讲者在作者列表中的排名放在字段中usera。如果没有给出排名,则假定第一作者为演讲者。

\documentclass{article}
\usepackage[style=alphabetic]{biblatex}
\usepackage{xpatch}

\newbibmacro*{name:emph}{%
  \ifboolexpr{ test {\ifcurrentname{author}} and test {\ifbibliography}
    and test {\ifentrytype{inproceedings}}
    and ( ( test {\iffieldundef{usera}}
            and test {\ifnumequal{\value{listcount}}{1}} )
          or test {\ifnumequal{\thefield{usera}+0}{\value{listcount}}} ) }
   {\itshape}{}}

\xpretobibmacro{name:last}{\begingroup\usebibmacro{name:emph}}{}{}
\xpretobibmacro{name:first-last}{\begingroup\usebibmacro{name:emph}}{}{}
\xpretobibmacro{name:last-first}{\begingroup\usebibmacro{name:emph}}{}{}    
\xpretobibmacro{name:delim}{\begingroup\normalfont}{}{}    

\xapptobibmacro{name:last}{\endgroup}{}{}
\xapptobibmacro{name:first-last}{\endgroup}{}{}
\xapptobibmacro{name:last-first}{\endgroup}{}{}    
\xapptobibmacro{name:delim}{\endgroup}{}{}    

\begin{filecontents}{\jobname.bib}
@InProceedings{bart,
  author = {Bart-Smith, H. and Bastawros, A.-F. and Mumm, D. R. and
            Evans, A. G. and Sypeck, D. J. and Wadley, H. N. G.},
  usera = {2},
  title = {Compressive Deformation...},
  booktitle = {Porous and Cellular Materials for Structural Applications},
  pages = {71--81},
  editor = {Schwartz, D. S. and Shih, D. S. and Evans, A. G.
            and Wadley, H. N. G.},
  volume = 521,
  series = {Symposium Proceedings},
  location = {Warrendale, Pennsylvania},
  year = {1998},
  publisher = {Materials Research Society}}
@InProceedings{arzt,
  author = {Arzt, M. and Brocks, W. and Mohr, R.},
  usera = {3},
  title = {An implicit integration method...},
  booktitle = {Proceedings of CMEM 99},
  pages = {371--380},
  year = {1999},
  editor = {Carlomagno, C. M. and Brebbia, C. A.},
  volume = {2},
  series = {Computational Engineering},
  address = {Southhampton},
  publisher = {WIT Press},
  isbn = {1-85312-683-7}}
\end{filecontents}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

% just for demonstration
\ExecuteBibliographyOptions{firstinits,maxbibnames=99}
\DeclareNameAlias{default}{last-first/first-last}

\begin{document}
Filler text \cite{moraux,companion,bart,arzt}.
\citeauthor{moraux,bart,arzt} showed that...
\printbibliography
\end{document}

在此处输入图片描述

相关内容