2

As of biblatex v3.12, it supports the Hungarian language, but I get a warning when I try to run pdflatex.

I have the files mwe.tex:

\UseRawInputEncoding % https://tex.stackexchange.com/a/446653/126797
\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage[magyar]{babel}
\usepackage[autostyle]{csquotes}
\DeclareQuoteStyle{magyar}{,,}{''}{>>}{<<} %magyar is not supported
\usepackage{biblatex}
\addbibresource{references.bib}

\begin{document}

Ref: \cite{testsource}.    

\printbibliography
\end{document}

and references.bib:

@article{testsource,
author = {Test Author},
title = {Test title},
journal = {Test Journal}
}

If I run pdflatex mwe, biber mwe, pdflatex mwe and pdflatex mwe, I get the Warning: Package biblatex Warning: Hungarian localisation module for biblatex loaded. Isn't it a bad design to drop a warning even though I did everything to load it correctly? Or did I make a mistake?

The warning message also states that

(biblatex) This warning can be disabled with
(biblatex) '\BiblatexHungarianWarningOff'.

But if I write \BiblatexHungarianWarningOff into the code, I get

! Undefined control sequence. 
<recently read> \BiblatexHungarianWarningOff

How to properly suppress the warning message?

3

Section 3.16 of the biblatex manual explains, why you get the warning:

The Hungarian localisation module needs to redefine certain field formats to obtain the grammatically correct word order. This means that these field formats are overwritten whenever the Hungarian localisation is active, no matter whether they were defined in the preamble or by a custom style. So please be aware that using the Hungarian localisation module may cause the bibliography output to deviate from the format dictated by the loaded style and preamble definitions. Changes to this behaviour need to be made using \DefineBibliographyExtras. In particular \mkpageprefix is redefined to output the page number as a prefix following Hungarian convention, and all formats of fields involving pages were modified so that page ranges are printed as ordinal ranges. The Hungarian localisation module will print a warning to remind you of these changes whenever it is loaded in a document. The warning tells you how to silence it.

In order to turn the warning off, you have to call \BiblatexHungarianWarningOff after \usepackage{biblatex}

  • The warning message is, actually, longer than what I wrote, see @gusbrs-s answer, and it says similar thing in short. But in the manual I didn't find that warning message, it can be extracted from the code only. Therefore, pointing out that the manual covers the special case of Hungarian (too) has an extra value. – DanielTuzes Nov 21 '18 at 11:36
2

The full warning in the log states the reason for the warning:

Package biblatex Warning: Hungarian localisation module for biblatex loaded.
(biblatex)                This module changes more definitions than usual.
(biblatex)                Please refer to the documentation for hints and
(biblatex)                check the output, especially with non-standard
(biblatex)                styles or customisations to field formats.
(biblatex)                This warning can be disabled with
(biblatex)                '\BiblatexHungarianWarningOff'.

It is, of course, just a warning, not an error. But the extensive changes, and perhaps the fact that this is a somewhat new localization module, presumably motivated developers to leave this warning.

However, \BiblatexHungarianWarningOff is indeed defined in biblatex.sty, and you should thus load it after the call to biblatex:

\UseRawInputEncoding % https://tex.stackexchange.com/a/446653/126797
\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage[magyar]{babel}
\usepackage[autostyle]{csquotes}
\DeclareQuoteStyle{magyar}{,,}{''}{>>}{<<} %magyar is not supported
\usepackage{biblatex}
\BiblatexHungarianWarningOff

\addbibresource{references.bib}

\begin{document}

Ref: \cite{testsource}.

\printbibliography
\end{document}
  • 1
    I hope they will disable this warning, bc I don't want to write extra lines into the code just because I use a "special" language. I intentionally use magyar babel and biblatex, there is no need to warn me I use it. Do you think that someone will remove it in the (near) future? And thanks for the answer, you were 7s slower :) – DanielTuzes Nov 21 '18 at 11:29
  • 1
    @DanielTuzes I was the one who put in the warning. At that time it seemed like the right thing to do and I still think it is better than to let the user experience unexpected behaviour silently. This is probably not the right forum to discuss biblatex development decisions in depth, but you are very welcome to head over to github.com/plk/biblatex/issues and open an issue to discuss this. If you are interested I can also add another answer here that explains my reasoning for the initial decision. – moewe Nov 21 '18 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.