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