I'm using TeXLive 2014 on FreeBSD. Every LaTeX-files produce the following warning:
LaTeX Warning: Please use \usepackage[latin2]{inputenc} with
\usepackage[magyar]{babel}.
"Magyar" is the name of the hungarian in hungarian language 🙂
The relevant part of my documents:
\documentclass[a4paper]{article}
\usepackage[magyar]{babel}
\usepackage[utf8]{inputenc}
\usepackage{t1enc}
\begin{document}
Árvíztűrő tükörfúrógép.
\end{document}
Can I skip this warning or should do something to fix it? Or maybe it's a bug?
Before TeXLive 2014 this warning didn't appear.
Best Answer
There is some mistake in the tests for input encodings in
magyar.ldf
. You get the same error message if you chooselatin2
as the encoding. The relevant part ofmagyar.ldf
is:It is clear that what is intended is that
latin2
,utf8
,utf8x
orcp1250
encodings should not give an error. It looks like this file needs some updating.Update: more analysis shows that what this command is expecting to receive is
with
latin2
replaced by whatever encoding has actually been selected, but what it actually receives isThus a simple work around is to change the first line of the definition to
so the pattern matching gobbles the
\protect
. At this stage, I suggest you copymagyar.ldf
to your working directory or local texmf tree and make this change in that copy.Update pts points out that the above does not work in old versions of
babel
. I can't test that, but his suggestion to change the definition towhich apparently works in all versions. This has now been included in the version of
magyar.ldf
on CTAN, so the recommended action now is to update to that version.