4

My main font unfortunately does not have support for Cyrillic script. Mixing it with Linux Libertine (which does have the required glyphs) works fine in the main text where I can simply switch the language, especially that I am writing text in large blocks so the difference in font is not visible at all.

However, what can I do with references that are written in Cyrillic? Putting font switching commands within the bibliography file doesn't work in case of author names but does look acceptably in case of titles and other elements.

Is there a cleaner way (apart from switching fonts) or one that would work with author names?

For reference, my main font is Palatino because it works wonderfully in ClassicThesis; however, if there is an alternative to Palatino that looks nicely, has ligatures and contains Cyrillic glyphs by all means please suggest it!

1 Answers1

6

You can use the package ucharclasses to automatically change the font family based on the unicode block in usage. You call it with:

\usepackage[Latin,Cyrillics]{ucharclasses}
\setTransitionsForCyrillics{<at-beginning-of-unicode-block>}{<at-end-of-unicode-block>}

I defined a new russian environment in order to both set the block language

\newenvironment{russian}
  {\begin{otherlanguage*}{russian}
    \fontspec{Linux Biolinum O}}
  {\end{otherlanguage*}}

and called it with

\setTransitionsForCyrillics{\begin{russian}}{\end{russian}}

biblatex already automates the language specifications of bibentries based on the hyphenation field with the babel=hyphen or the babel=other package options. In order to have the same functionality in citations, refer to Switching languages for citations according to the bibentry's “hyphenation” field. The MWE below uses the first answer there.

The following MWE uses Linux Biolinum O as the cyrillic typeface, to stress the difference. It is also based on the one proposed in Russian and Japanese and biblatex oh my.

\documentclass{article}
\usepackage{fontspec,microtype}
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\setmainfont{TeX Gyre Pagella}
\usepackage[russian,english]{babel}
\usepackage[babel=other,backend=biber,style=verbose-trad3]{biblatex}
\usepackage[Latin,Cyrillics]{ucharclasses}
\newenvironment{russian}
  {\begin{otherlanguage*}{russian}
    \fontspec{Linux Biolinum O}}
  {\end{otherlanguage*}}
\setTransitionsForCyrillics{\begin{russian}}{\end{russian}}
\makeatletter
\AtEveryCitekey{%
\blx@langsetup\abx@field@hyphenation%
\blx@hyphenreset%
}
\makeatother
\begin{filecontents}{\jobname.bib}
@article{Dubrovin1906,
  author = { Дубровин, А. И },
  title = { Открытое письмо Председателя Главного Совета Союза Русского Народа А. И. Дубровина от 2 декабря 1906 года митрополиту Санкт-Петербургскому Антонию, Первенствующему члену Священного Синода },
  journal = { Вече },
  edition = { 97 },
  year = { 1906 },
  month = { 7 дек. 1906 },
  pages = { 1-3 },
  keywords = {primary},
  hyphenation = { russian },
  language = { russian }
}
@article{Brumbaugh1947,
  author = { Brumbaugh, Thoburn T },
  title = { The Protestant Handicap in Japan. },
  journal = { Christian Century },
  volume = 64,
  edition = 23,
  year = { 1947 },
  month = { 4 June 1947 },
  pages = { 708-709 },
  keywords = {primary},
  hyphenation = { english },
  language = { english }
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\textcite{Brumbaugh1947}

\autocite{Brumbaugh1947}

\textcite{Dubrovin1906}

\autocite{Dubrovin1906}

\printbibliography

\end{document}

mwe

henrique
  • 6,616