在法語中使用 biblatex 和 biblatex 時,如何刪除引文中的小寫大寫字母,並將它們保留在參考書目中?

在法語中使用 biblatex 和 biblatex 時,如何刪除引文中的小寫大寫字母,並將它們保留在參考書目中?

對於 XeLaTeX,當我[backend=biber, style=authoryear-icomp, dashed=false]{biblatex}\usepackage{polyglossia}then一起使用時\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}

引文中沒有小寫字母。參考書目中的小寫字母。

相關內容