![当使用法语版 biblatex 时,如何删除引文中的小写字母,并将其保留在参考书目中?](https://linux22.com/image/472798/%E5%BD%93%E4%BD%BF%E7%94%A8%E6%B3%95%E8%AF%AD%E7%89%88%20biblatex%20%E6%97%B6%EF%BC%8C%E5%A6%82%E4%BD%95%E5%88%A0%E9%99%A4%E5%BC%95%E6%96%87%E4%B8%AD%E7%9A%84%E5%B0%8F%E5%86%99%E5%AD%97%E6%AF%8D%EF%BC%8C%E5%B9%B6%E5%B0%86%E5%85%B6%E4%BF%9D%E7%95%99%E5%9C%A8%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E4%B8%AD%EF%BC%9F.png)
使用 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}