Closed Hanziness closed 4 years ago
Thanks. This is a known bug, and it's already fixed for the next release. A workaround for the time being is to use swapstring=captions
.
Hello!
It seems to me that selecting the Hungarian language still prevents documents from compiling. On the latest MiKTeX (2020-04-05) the following minimal document fails to compile with both XeLaTeX and LuaLaTeX.
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{hungarian}
\begin{document}
\section{Test}
Hello!
\end{document}
The error message is the following:
(polyglossiatest.aux) (F:\Programs\MiKTeX\tex/latex/base\ts1cmr.fd)
! Undefined control sequence.
\adddialect ...####1####2####3####4{}\fi }\bbl@cs
{languages}\endgroup
l.5 \begin{document}
? X
No pages of output.
Transcript written on polyglossiatest.log.
Uncommenting the \setdefaultlanguage{hungarian}
part allows the document to compile just fine. Using the swapstrings=captions
option does not affect anything, the same error pops up - it didn't fix the issue I was having previously, either (I worked around the issue by using babel
and LuaLaTeX, but I still cannot use XeLaTeX with Hungarian translations). Shall I open a new issue with this? MiKTeX says the package version is 1.48, packaged on 26th March.
Thanks for the report. This is strange, it’s an unrelated issue that arose recently (see #400) and we thought we had fixed it in 1.48. Can you try adding
\makeatletter
\def\bbl@cs#1{\csname bbl@#1\endcsname}
\makeatother
in the preamble of your document?
Thank you, that does fix the issue, but not in all cases. Luckily, it works with the default Hungarian options (that is, swapstrings=all
, the most complete option), but it causes a large error log with swapstrings=captions
(same error with swapstrings=headings
and swapstrings=none
).
swapstrings=headers
, swapstrings=hheaders
work like swapstrings=all
does with the snippet included in the preamble. It truly looks like the same error as in #400 .
(Edit) For a quick reference, the error with the snippet included is different, here is the excerpt from the compile log:
polyglossiatest.aux:3: You can't use `macro parameter character #' in vertical
mode.
\hungarian@capsformat ....\ \@chapapp \ \fi \fi ##
1}}{}}}{\ifcsdef {chapterm...
l.3 ...language *[swapstrings=captions]{hungarian}
For the sake of readability, I collected the options that work and those that don't (with the snippet in the preamble) in the table below, I hope it can help narrow down the issue. Without your snippet, none of the options passed to the language will work and all throw the same error as the default setting.
swapstrings |
Compile error? |
---|---|
all (default) |
No |
captions |
Yes (see below) |
headings |
Yes (see below) |
headers |
No |
hheaders |
No |
none |
Yes (see below) |
I find it strange that the none
option also causes the same error (I would think it disables more functionality than captions
or headings
does, eliminating the error). Here's a full compilation log with swapstrings=captions
(the full command used is \setdefaultlanguage[swapstrings=captions]{hungarian}
):
```
icle.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(F:\Programs\MiKTeX\tex/latex/base\size10.clo))
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/latex/polyglossia\polyglossia.st
y (F:\Programs\MiKTeX\tex/latex/etoolbox\etoolbox.sty)
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/latex/makecmds\makecmds.sty)
(F:\Programs\MiKTeX\tex/latex/xkeyval\xkeyval.sty
(F:\Programs\MiKTeX\tex/generic/xkeyval\xkeyval.tex
(F:\Programs\MiKTeX\tex/generic/xkeyval\xkvutils.tex
(F:\Programs\MiKTeX\tex/generic/xkeyval\keyval.tex))))
(F:\Programs\MiKTeX\tex/latex/fontspec\fontspec.sty
(F:\Programs\MiKTeX\tex/latex/l3packages/xparse\xparse.sty
(F:\Programs\MiKTeX\tex/latex/l3kernel\expl3.sty
(F:\Programs\MiKTeX\tex/latex/l3backend\l3backend-xdvipdfmx.def)))
(F:\Programs\MiKTeX\tex/latex/fontspec\fontspec-xetex.sty
(F:\Programs\MiKTeX\tex/latex/base\fontenc.sty)
(F:\Programs\MiKTeX\tex/latex/fontspec\fontspec.cfg)))
(F:\Programs\MiKTeX\tex/generic/iftex\ifluatex.sty
(F:\Programs\MiKTeX\tex/generic/iftex\iftex.sty))
(F:\Programs\MiKTeX\tex/generic/iftex\ifxetex.sty)
(F:\Programs\MiKTeX\tex/latex/l3packages/l3keys2e\l3keys2e.sty)
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/latex/filehook\filehook.sty)
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/latex/polyglossia\gloss-latex.ld
f))
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/latex/polyglossia\gloss-hungaria
n.ldf) (polyglossiatest.aux
polyglossiatest.aux:3: You can't use `macro parameter character #' in vertical
mode.
\hungarian@capsformat ....\ \@chapapp \ \fi \fi ##
1}}{}}}{\ifcsdef {chapterm...
l.3 ...language *[swapstrings=captions]{hungarian}
polyglossiatest.aux:3: LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H
(Edit) For a quick reference, the error with the snippet included is different, here is the excerpt from the compile log:
polyglossiatest.aux:3: You can't use `macro parameter character #' in vertical mode. \hungarian@capsformat ....\ \@chapapp \ \fi \fi ## 1}}{}}}{\ifcsdef {chapterm... l.3 ...language *[swapstrings=captions]{hungarian}
This should be fixed with 1d6756ee245. Please verify, if possible.
By the way, which version of polyglossia do you have?
By the way, which version of polyglossia do you have?
Never mind, you already reported that (1.48)
15ab669 should fix the rest of the issue.
I patched my gloss-hungarian.ldf
as in 1d6756e, and I can confirm it works with all swapstrings
options (along with the snippet in the preamble). Thank you very much!
Good.
Arthur, I think this justifies a quick release of 1.49.
BTW thanks @Hanziness for this really detailed and precise bug report. This is very helpful.
You're welcome! Glad I could help! :)
I just uploaded the package to CTAN and it will make its way to the distributions within a few days as usual.
Hello!
I would like to apologise in advance if I'm running into something that's unrelated to
polyglossia
, but I've been experiencing this issue in the past months whenever I tried to compile a document using XeLaTex under Windows (MiKTeX). I've narrowed down the cause of the problem onto the command\setdefaultlanguage{hungarian}
(naturally after includingpolyglossia
, see the example below).This document compiles without errors on my OpenSUSE (Linux) TeX Live, so I would guess this is at least partially MiKTeX-related, but I'm not entirely sure (everything else works fine, even in a "package-heavy" document using beamer, except
polyglossia
's Hungarian) - so feel free to close this if you find it to be a purely MiKTeX-related bug, I'll contact them.I had tried reinstalling the package, the error remained. MiKTeX is fully up to date as of 2019-12-16, I remember having this issue a few months back, but I edited my presentations on Linux, so it didn't bother me. If anything else would come handy (like additional log files I missed here), please do tell and I'll try to include them.
Example demonstrating the error
To compile:
xelatex.exe polyglossia-test.tex
Compiler output
polyglossia-test.log
:Note: it says "output written", but the PDF didn't change at all (I tried a compilation with German, it worked and the strings didn't change into Hungarian after this run).