当使用法语版 biblatex 时,如何删除引文中的小写字母,并将其保留在参考书目中?

当使用法语版 biblatex 时,如何删除引文中的小写字母,并将其保留在参考书目中?

使用 XeLaTeX 时,当我[backend=biber, style=authoryear-icomp, dashed=false]{biblatex}与 一起使用\usepackage{polyglossia}\setmainlanguage{french},引用和参考文献都以小写字母书写。我的编辑希望我删除文本和脚注中的小写字母,但保留参考书目中的小写字母。

我找到的答案别处\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily},但这确实会删除文本和参考书目中的小写字母。

MWE 如下:

\documentclass{article}

\usepackage[normalem]{ulem}  
\usepackage[no-math]{fontspec}
\usepackage{polyglossia}
\usepackage[backend=biber, style=authoryear-icomp, dashed=false]{biblatex} 
\usepackage{csquotes}
\setmainlanguage{french}
\setotherlanguage{english}
\setotherlanguage{latin}
\setotherlanguage[variant=ancient]{greek}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.5]{Scheherazade}
\newfontfamily\greekfont[Script=Greek]{Linux Libertine O}

\usepackage{filecontents}

\begin{filecontents}{biblio.bib}
@article{abel2018,
  title = {Estimates of {{Global Bilateral Migration Flows}} by {{Gender}} between 1960 and 2015},
  author = {Abel, Guy J.},
  date = {2018},
  journaltitle = {International Migration Review},
  shortjournal = {International Migration Review},
  volume = {52},
  pages = {809--852},
  doi = {10.1111/imre.12327},
  url = {http://journals.sagepub.com/doi/10.1111/imre.12327},
  urldate = {2019-12-14},
  langid = {english},
  number = {3}
}
\end{filecontents}

\addbibresource{biblio.bib}

\begin{document}
I want to remove the small capitals here : \cite{abel2018}
\printbibliography[title={I want to keep the small capitals here}]
\end{document}

我拥有的:

在此处输入图片描述

当然,添加简写 = {Abel 2018} 也可以,但我有或多或少一千个条目,而且生活短暂。

答案1

您可以\mkbibnamefamily在打印参考书目之前重新定义。

{
  \protected\def\mkbibnamefamily#1{\textsc{#1}}
  \printbibliography[title={I want to keep the small capitals here}]
}

您的 MWE:

\documentclass{article}

\usepackage[normalem]{ulem}  
\usepackage[no-math]{fontspec}
\usepackage{polyglossia}
\usepackage[backend=biber, style=authoryear-icomp,  dashed=false]{biblatex} 
\usepackage{csquotes}
\setmainlanguage{french}
\setotherlanguage{english}
%\setotherlanguage{latin}
%\setotherlanguage[variant=ancient]{greek}
%\newfontfamily\arabicfont[Script=Arabic,Scale=1.5]{Scheherazade}
%\newfontfamily\greekfont[Script=Greek]{Linux Libertine O}
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
\usepackage{filecontents}

\begin{filecontents}{biblio.bib}
@article{abel2018,
  title = {Estimates of {{Global Bilateral Migration Flows}} by {{Gender}} between 1960 and 2015},
  author = {Abel, Guy J.},
  date = {2018},
  journaltitle = {International Migration Review},
  shortjournal = {International Migration Review},
  volume = {52},
  pages = {809--852},
  doi = {10.1111/imre.12327},
  url = {http://journals.sagepub.com/doi/10.1111/imre.12327},
  urldate = {2019-12-14},
  langid = {english},
  number = {3}
}
\end{filecontents}

\addbibresource{biblio.bib}

\begin{document}
I want to remove the small capitals here : \cite{abel2018}

{
  \protected\def\mkbibnamefamily#1{\textsc{#1}}
  \printbibliography[title={I want to keep the small capitals here}]
}
\end{document}

答案2

如果您想要一个仅存在于序言中的解决方案,则可以\mkbibnamefamily通过\ifbibliography检查重新定义。

\documentclass{article}

\usepackage[normalem]{ulem}  
\usepackage[no-math]{fontspec}
\usepackage{polyglossia}
\usepackage[backend=biber, style=authoryear-icomp, dashed=false]{biblatex} 
\usepackage{csquotes}
\setmainlanguage{french}
\setotherlanguage{english}
\setotherlanguage{latin}
\setotherlanguage[variant=ancient]{greek}
%\newfontfamily\arabicfont[Script=Arabic,Scale=1.5]{Scheherazade}
\newfontfamily\greekfont[Script=Greek]{Linux Libertine O}

\DefineBibliographyExtras{french}{%
  \renewcommand*\mkbibnamefamily[1]{%
    \ifbibliography
      {\textsc{#1}}
      {#1}}}


\begin{filecontents}{\jobname.bib}
@article{abel2018,
  title        = {Estimates of Global Bilateral Migration Flows by Gender between 1960 and 2015},
  author       = {Abel, Guy J.},
  date         = {2018},
  journaltitle = {International Migration Review},
  shortjournal = {International Migration Review},
  volume       = {52},
  pages        = {809--852},
  doi          = {10.1111/imre.12327},
  url          = {http://journals.sagepub.com/doi/10.1111/imre.12327},
  urldate      = {2019-12-14},
  langid       = {english},
  number       = {3},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
I want to remove the small capitals here : \cite{abel2018}
\printbibliography[title={I want to keep the small capitals here}]
\end{document}

引用中不使用小写字母。参考书目中使用小写字母。

相关内容