3

I am writing a multilingual document and want bibliography entries properly hyphenated for their language. I do not want to translate terms in the bibliography like "in", "p.", and "edited by". As I read the BibLaTeX documentation, autolang=hyphen should do this, and it seems to me that it worked in the past, but now it also causes the translation of terms used in the bibliography, like "pp." to "S." for a German entry, which is what I would expect from autolang=other. Here's a MWE:

\documentclass[a4paper]{article}
\usepackage{polyglossia}
\setdefaultlanguage[variant=american]{english}
\setotherlanguage{german}
\usepackage{csquotes}
\usepackage[style=verbose-ibid,autolang=hyphen,backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
Here I cite Sigfridsson\autocite{sigfridsson} and Spiegelberg\autocite{spiegelberg}.
\printbibliography
\end{document}

The example bibliography entries use langid to specify the language ("american" and "german" respectively). I get this (with similar results in the footnotes):

enter image description here

Update: since the problem was identified as a bug, I add some version numbers in case anyone reads this in the future: BibLaTeX 3.7, Polyglossia 1.42.4.

jcr
  • 753
  • Unfortunately, polygossia support is shaky it best. If you don't need any of polyglossia's special features you might be better of using babel instead. – moewe Apr 19 '17 at 17:18
  • I have a long document that sometimes quotes texts in non-Latin scripts, so I'm using XeLaTeX. I'm using polyglossia because I understood that it should be used instead of babel with XeLaTeX. Am I mistaken? Since the primary language is English, all I really want from babel or polyglossia is hyphenation: I don't need translations of dates or terms used by LaTeX. – jcr Apr 20 '17 at 17:54
  • If you are using non-Latin scripts you are indeed often better of with polyglossia. I have not that much experience with polyglossia/babel on Xe/LuaLaTeX, but I'm lead to believe that even though generally polyglossia is 'preferred' sometimes babel is good enough (cf babel vs. polyglossia). – moewe Apr 21 '17 at 06:40

1 Answers1

4

Update polyglossia support in biblatex should be functionally equivalent to babel support in biblatex 3.14 (or above) and polyglossia 1.46 (or above).

At the moment polyglossia support in biblatex is still quite shaky. Language version detection (american vs. british) does not work at all right now.

The environment used with autolang=hyphen is hyphenrules, which needs an exception when processed by biblatex's polyglossia interface. This is addressed in issue #564 on the github bug tracker.

Things should work as expected again in the upcoming release. If you don't need polyglossia features, you can always switch to babel. Currently babel support is more mature and stable.

moewe
  • 175,683
  • What do you mean by "hyphenrules, which is not currently supported by polyglossia"? hyphenrules is part of the kernel. It is defined even without babel or polyglossia. – Ulrike Fischer Apr 19 '17 at 21:11
  • @UlrikeFischer Ah yes, sorry I was mistaken in my analysis. I have edited the answer and will do some more investigation, which will probably lead to an issue in the github repository. – moewe Apr 20 '17 at 07:08
  • 1
    Good. I don't have the time to investigate but I had the impression that it should be possible to get autolang=hyphen working -- if needed with some manual translation command "\declarealiaslangidname{american}{british}" if automatic detection is too complicated. – Ulrike Fischer Apr 20 '17 at 07:20
  • @UlrikeFischer If you can find the time I would appreciate you having a look at my proposed solution in https://github.com/plk/biblatex/issues/564. I would very much value any input you have. Also if you have any more ideas for proper polyglossia support that would be really appreciated. – moewe Apr 20 '17 at 07:22
  • Well my general view point is, that some language support should go in the kernel. – Ulrike Fischer Apr 20 '17 at 08:04
  • @UlrikeFischer That would of course be nice, but we have to deal with the status quo. The first problem for biblatex is that babel and polyglossia don't have a standardised (or rather the same) interface. Language support seems a bit babel-centric at the moment. – moewe Apr 20 '17 at 10:08