reutenauer / polyglossia

An alternative to Babel for XeLaTeX and LuaLaTeX
http://www.ctan.org/pkg/polyglossia
MIT License
189 stars 51 forks source link

Hungarian language causes compilation to fail on Windows/MiKTeX #373

Closed Hanziness closed 4 years ago

Hanziness commented 4 years ago
OS: Windows 10 1903 (x64)
LaTeX distribution: MiKTex (2.9.7250 64-bit) (latest as of 2019-12-16)
Compiler: Xe(La)TeX, Version 3.14159265-2.6-0.999991

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 including polyglossia, 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

\documentclass{article}
%\usepackage{csquotes}
\usepackage{polyglossia}

% Using option swapstrings=none (instead of default "all") also doesn't fix the problem
\setdefaultlanguage{hungarian}

% This works though (but it's not Hungarian):
% \setdefaultlanguage{german}

\begin{document}
\section{Hello world.}
\begin{figure}
    % Should write "1. ábra: Hello!"
    \caption{Hello!}
\end{figure}

This document uses ``\languagename''.
\end{document}

Compiler output

This is XeTeX, Version 3.14159265-2.6-0.999991 (MiKTeX 2.9.7250 64-bit)
entering extended mode
(g:/Projektek/LaTeX/Test/polyglossia-mwe/polyglossia-test.tex
LaTeX2e <2019-10-01> patch level 3
("F:\Program Files\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2019/10/25 v1.4k Standard LaTeX document class
("F:\Program Files\MiKTeX 2.9\tex/latex/base\size10.clo"))
("F:\Program Files\MiKTeX 2.9\tex/latex/polyglossia\polyglossia.sty"
("F:\Program Files\MiKTeX 2.9\tex/latex/etoolbox\etoolbox.sty")
("F:\Program Files\MiKTeX 2.9\tex/latex/makecmds\makecmds.sty")
("F:\Program Files\MiKTeX 2.9\tex/latex/xkeyval\xkeyval.sty"
("F:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkeyval.tex"
("F:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkvutils.tex"
("F:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\keyval.tex"))))
("F:\Program Files\MiKTeX 2.9\tex/latex/fontspec\fontspec.sty"
("F:\Program Files\MiKTeX 2.9\tex/latex/l3packages/xparse\xparse.sty"
("F:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3.sty"
("F:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3-code.tex"
("F:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\l3deprecation.def"))
("F:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-xdvipdfmx.def")))
("F:\Program Files\MiKTeX 2.9\tex/latex/fontspec\fontspec-xetex.sty"
("F:\Program Files\MiKTeX 2.9\tex/latex/base\fontenc.sty"
("F:\Program Files\MiKTeX 2.9\tex/latex/base\tuenc.def"))
("F:\Program Files\MiKTeX 2.9\tex/latex/fontspec\fontspec.cfg")))
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/generic/iftex\ifluatex.sty
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/generic/iftex\iftex.sty))
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/generic/iftex\ifxetex.sty)
("F:\Program Files\MiKTeX 2.9\tex/latex/l3packages/l3keys2e\l3keys2e.sty")
("F:\Program Files\MiKTeX 2.9\tex/latex/filehook\filehook.sty")
("F:\Program Files\MiKTeX 2.9\tex/latex/polyglossia\gloss-latex.ldf"))
("F:\Program Files\MiKTeX 2.9\tex/latex/polyglossia\gloss-hungarian.ldf")
No file polyglossia-test.aux.
g:/Projektek/LaTeX/Test/polyglossia-mwe/polyglossia-test.tex:13: Extra \fi.
\hungarian@capsformat ...ngarian}}\fi \fi \fi \fi 

l.13 \begin{document}

[1] (polyglossia-test.aux)
g:/Projektek/LaTeX/Test/polyglossia-mwe/polyglossia-test.tex:21: Extra \fi.
\enddocument ...letter \@@input \jobname .aux \fi 
                                                  \@dofilelist \ifdim \font@...
l.21 \end{document}

 )
(see the transcript file for additional information)
Output written on polyglossia-test.pdf (1 page).
SyncTeX written on polyglossia-test.synctex.gz.
Transcript written on polyglossia-test.log.

polyglossia-test.log:

This is XeTeX, Version 3.14159265-2.6-0.999991 (MiKTeX 2.9.7250 64-bit) (preloaded format=xelatex 2019.12.16)  16 DEC 2019 12:14
entering extended mode
**./polyglossia-test.tex
(polyglossia-test.tex
LaTeX2e <2019-10-01> patch level 3
("F:\Program Files\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2019/10/25 v1.4k Standard LaTeX document class
("F:\Program Files\MiKTeX 2.9\tex/latex/base\size10.clo"
File: size10.clo 2019/10/25 v1.4k Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("F:\Program Files\MiKTeX 2.9\tex/latex/polyglossia\polyglossia.sty"
Package: polyglossia 2019/11/15 v1.46 Alternative to Babel for XeLaTeX and LuaL
aTeX

("F:\Program Files\MiKTeX 2.9\tex/latex/etoolbox\etoolbox.sty"
Package: etoolbox 2019/09/21 v2.5h e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count88
)
("F:\Program Files\MiKTeX 2.9\tex/latex/makecmds\makecmds.sty"
Package: makecmds 2009/09/03 v1.0a extra command making commands
)
("F:\Program Files\MiKTeX 2.9\tex/latex/xkeyval\xkeyval.sty"
Package: xkeyval 2014/12/03 v2.7a package option processing (HA)

("F:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkeyval.tex"
("F:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkvutils.tex"
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15

("F:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\keyval.tex"))
\XKV@depth=\count89
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
("F:\Program Files\MiKTeX 2.9\tex/latex/fontspec\fontspec.sty"
("F:\Program Files\MiKTeX 2.9\tex/latex/l3packages/xparse\xparse.sty"
("F:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3.sty"
Package: expl3 2019-11-07 L3 programming layer (loader) 

("F:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3-code.tex"
Package: expl3 2019-11-07 L3 programming layer (code)
\c_max_int=\count90
\l_tmpa_int=\count91
\l_tmpb_int=\count92
\g_tmpa_int=\count93
\g_tmpb_int=\count94
\l__seq_internal_a_int=\count95
\l__seq_internal_b_int=\count96
\g__kernel_prg_map_int=\count97
\c__ior_term_noprompt_ior=\count98
\c_log_iow=\count99
\l_iow_line_count_int=\count100
\l__iow_line_target_int=\count101
\l__iow_one_indent_int=\count102
\l__iow_indent_int=\count103
\c_zero_dim=\dimen103
\c_max_dim=\dimen104
\l_tmpa_dim=\dimen105
\l_tmpb_dim=\dimen106
\g_tmpa_dim=\dimen107
\g_tmpb_dim=\dimen108
\c_zero_skip=\skip43
\c_max_skip=\skip44
\l_tmpa_skip=\skip45
\l_tmpb_skip=\skip46
\g_tmpa_skip=\skip47
\g_tmpb_skip=\skip48
\c_zero_muskip=\muskip10
\c_max_muskip=\muskip11
\l_tmpa_muskip=\muskip12
\l_tmpb_muskip=\muskip13
\g_tmpa_muskip=\muskip14
\g_tmpb_muskip=\muskip15
\l_keys_choice_int=\count104
\l__intarray_loop_int=\count105
\c__intarray_sp_dim=\dimen109
\g__intarray_font_int=\count106
\c__fp_leading_shift_int=\count107
\c__fp_middle_shift_int=\count108
\c__fp_trailing_shift_int=\count109
\c__fp_big_leading_shift_int=\count110
\c__fp_big_middle_shift_int=\count111
\c__fp_big_trailing_shift_int=\count112
\c__fp_Bigg_leading_shift_int=\count113
\c__fp_Bigg_middle_shift_int=\count114
\c__fp_Bigg_trailing_shift_int=\count115
\g__fp_array_int=\count116
\l__fp_array_loop_int=\count117
\l__sort_length_int=\count118
\l__sort_min_int=\count119
\l__sort_top_int=\count120
\l__sort_max_int=\count121
\l__sort_true_max_int=\count122
\l__sort_block_int=\count123
\l__sort_begin_int=\count124
\l__sort_end_int=\count125
\l__sort_A_int=\count126
\l__sort_B_int=\count127
\l__sort_C_int=\count128
\l__str_internal_int=\count129
\l__tl_analysis_normal_int=\count130
\l__tl_analysis_index_int=\count131
\l__tl_analysis_nesting_int=\count132
\l__tl_analysis_type_int=\count133
\l__regex_internal_a_int=\count134
\l__regex_internal_b_int=\count135
\l__regex_internal_c_int=\count136
\l__regex_balance_int=\count137
\l__regex_group_level_int=\count138
\l__regex_mode_int=\count139
\c__regex_cs_in_class_mode_int=\count140
\c__regex_cs_mode_int=\count141
\l__regex_catcodes_int=\count142
\l__regex_default_catcodes_int=\count143
\c__regex_catcode_L_int=\count144
\c__regex_catcode_O_int=\count145
\c__regex_catcode_A_int=\count146
\c__regex_all_catcodes_int=\count147
\l__regex_show_lines_int=\count148
\l__regex_min_state_int=\count149
\l__regex_max_state_int=\count150
\l__regex_left_state_int=\count151
\l__regex_right_state_int=\count152
\l__regex_capturing_group_int=\count153
\l__regex_min_pos_int=\count154
\l__regex_max_pos_int=\count155
\l__regex_curr_pos_int=\count156
\l__regex_start_pos_int=\count157
\l__regex_success_pos_int=\count158
\l__regex_curr_char_int=\count159
\l__regex_curr_catcode_int=\count160
\l__regex_last_char_int=\count161
\l__regex_case_changed_char_int=\count162
\l__regex_curr_state_int=\count163
\l__regex_step_int=\count164
\l__regex_min_active_int=\count165
\l__regex_max_active_int=\count166
\l__regex_replacement_csnames_int=\count167
\l__regex_match_count_int=\count168
\l__regex_min_submatch_int=\count169
\l__regex_submatch_int=\count170
\l__regex_zeroth_submatch_int=\count171
\g__regex_trace_regex_int=\count172
\c_empty_box=\box27
\l_tmpa_box=\box28
\l_tmpb_box=\box29
\g_tmpa_box=\box30
\g_tmpb_box=\box31
\l__box_top_dim=\dimen110
\l__box_bottom_dim=\dimen111
\l__box_left_dim=\dimen112
\l__box_right_dim=\dimen113
\l__box_top_new_dim=\dimen114
\l__box_bottom_new_dim=\dimen115
\l__box_left_new_dim=\dimen116
\l__box_right_new_dim=\dimen117
\l__box_internal_box=\box32
\l__coffin_internal_box=\box33
\l__coffin_internal_dim=\dimen118
\l__coffin_offset_x_dim=\dimen119
\l__coffin_offset_y_dim=\dimen120
\l__coffin_x_dim=\dimen121
\l__coffin_y_dim=\dimen122
\l__coffin_x_prime_dim=\dimen123
\l__coffin_y_prime_dim=\dimen124
\c_empty_coffin=\box34
\l__coffin_aligned_coffin=\box35
\l__coffin_aligned_internal_coffin=\box36
\l_tmpa_coffin=\box37
\l_tmpb_coffin=\box38
\g_tmpa_coffin=\box39
\g_tmpb_coffin=\box40
\l__coffin_bounding_shift_dim=\dimen125
\l__coffin_left_corner_dim=\dimen126
\l__coffin_right_corner_dim=\dimen127
\l__coffin_bottom_corner_dim=\dimen128
\l__coffin_top_corner_dim=\dimen129
\l__coffin_scaled_total_height_dim=\dimen130
\l__coffin_scaled_width_dim=\dimen131
\c__coffin_empty_coffin=\box41
\l__coffin_display_coffin=\box42
\l__coffin_display_coord_coffin=\box43
\l__coffin_display_pole_coffin=\box44
\l__coffin_display_offset_dim=\dimen132
\l__coffin_display_x_dim=\dimen133
\l__coffin_display_y_dim=\dimen134
\g__char_data_ior=\read1

("F:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\l3deprecation.def"
File: l3deprecation.def 2019-04-06 v L3 Deprecated functions
))
("F:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-xdvipdfmx.def"
File: l3backend-xdvipdfmx.def 2019-04-06 L3 backend support: xdvipdfmx
\g__graphics_track_int=\count173
\l__pdf_internal_box=\box45
\g__pdf_backend_object_int=\count174
\g__pdf_backend_annotation_int=\count175
))
Package: xparse 2019-10-11 L3 Experimental document command parser
\l__xparse_current_arg_int=\count176
\g__xparse_grabber_int=\count177
\l__xparse_m_args_int=\count178
\l__xparse_v_nesting_int=\count179
)
Package: fontspec 2019/10/19 v2.7d Font selection for XeLaTeX and LuaLaTeX

("F:\Program Files\MiKTeX 2.9\tex/latex/fontspec\fontspec-xetex.sty"
Package: fontspec-xetex 2019/10/19 v2.7d Font selection for XeLaTeX and LuaLaTe
X
\l__fontspec_script_int=\count180
\l__fontspec_language_int=\count181
\l__fontspec_strnum_int=\count182
\l__fontspec_tmp_int=\count183
\l__fontspec_tmpa_int=\count184
\l__fontspec_tmpb_int=\count185
\l__fontspec_tmpc_int=\count186
\l__fontspec_em_int=\count187
\l__fontspec_emdef_int=\count188
\l__fontspec_strong_int=\count189
\l__fontspec_strongdef_int=\count190
\l__fontspec_tmpa_dim=\dimen135
\l__fontspec_tmpb_dim=\dimen136
\l__fontspec_tmpc_dim=\dimen137

("F:\Program Files\MiKTeX 2.9\tex/latex/base\fontenc.sty"
Package: fontenc 2018/08/11 v2.0j Standard LaTeX package

("F:\Program Files\MiKTeX 2.9\tex/latex/base\tuenc.def"
File: tuenc.def 2018/08/11 v2.0j Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding TU on input line 82.
))
("F:\Program Files\MiKTeX 2.9\tex/latex/fontspec\fontspec.cfg")
LaTeX Info: Redefining \itshape on input line 4047.
LaTeX Info: Redefining \slshape on input line 4052.
LaTeX Info: Redefining \scshape on input line 4057.
LaTeX Info: Redefining \upshape on input line 4062.
LaTeX Info: Redefining \em on input line 4092.
LaTeX Info: Redefining \emph on input line 4117.
))
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/generic/iftex\ifluatex.sty
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.

(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/generic/iftex\iftex.sty
Package: iftex 2019/11/07 v1.0c TeX engine tests
))
(C:\Users\****\AppData\Roaming\MiKTeX\2.9\tex/generic/iftex\ifxetex.sty
Package: ifxetex 2019/10/25 v0.7 ifxetex legacy package. Use iftex instead.
)
("F:\Program Files\MiKTeX 2.9\tex/latex/l3packages/l3keys2e\l3keys2e.sty"
Package: l3keys2e 2019-10-11 LaTeX2e option processing using LaTeX3 keys
)
("F:\Program Files\MiKTeX 2.9\tex/latex/filehook\filehook.sty"
Package: filehook 2019/10/03 v0.6 Hooks for input files
)
\xpg@normalclass=\XeTeXcharclass1

("F:\Program Files\MiKTeX 2.9\tex/latex/polyglossia\gloss-latex.ldf"
File: gloss-latex.ldf polyglossia: module for default language
The property list \polyglossia@langsetup contains the pairs (without outer
braces):
>  {latex/script}  =>  {latin}
>  {latex/lcscript}  =>  {latin}
>  {latex/scripttag}  =>  {}
>  {latex/language}  =>  {Latex}
>  {latex/langtag}  =>  {ENG}
>  {latex/hyphennames}  =>  {english}
>  {latex/direction}  =>  {LR}
>  {latex/hyphenmins}  =>  {2,3}
>  {latex/frenchspacing}  =>  {false}
>  {latex/indentfirst}  =>  {false}
>  {latex/fontsetup}  =>  {true}
>  {latex/envname}  =>  {latex}
>  {latex/babelname}  =>  {latex}
>  {latex/localnumeral}  =>  {polyglossia@C@localnumeral}
>  {latex/Localnumeral}  =>  {polyglossia@C@localnumeral}.
)
Package polyglossia Info: Default language is latex.
Package polyglossia Info: Option: localmarks.
)
("F:\Program Files\MiKTeX 2.9\tex/latex/polyglossia\gloss-hungarian.ldf"
File: gloss-hungarian.ldf polyglossia: module for hungarian
The property list \polyglossia@langsetup contains the pairs (without outer
braces):
>  {latex/script}  =>  {latin}
>  {latex/lcscript}  =>  {latin}
>  {latex/scripttag}  =>  {}
>  {latex/language}  =>  {Latex}
>  {latex/langtag}  =>  {ENG}
>  {latex/hyphennames}  =>  {english}
>  {latex/direction}  =>  {LR}
>  {latex/hyphenmins}  =>  {2,3}
>  {latex/frenchspacing}  =>  {false}
>  {latex/indentfirst}  =>  {false}
>  {latex/fontsetup}  =>  {true}
>  {latex/envname}  =>  {latex}
>  {latex/babelname}  =>  {latex}
>  {latex/localnumeral}  =>  {polyglossia@C@localnumeral}
>  {latex/Localnumeral}  =>  {polyglossia@C@localnumeral}
>  {hungarian/script}  =>  {latin}
>  {hungarian/lcscript}  =>  {latin}
>  {hungarian/scripttag}  =>  {}
>  {hungarian/language}  =>  {Hungarian}
>  {hungarian/langtag}  =>  {HUN}
>  {hungarian/hyphennames}  =>  {hungarian,magyar}
>  {hungarian/direction}  =>  {LR}
>  {hungarian/hyphenmins}  =>  {2,2}
>  {hungarian/frenchspacing}  =>  {false}
>  {hungarian/indentfirst}  =>  {false}
>  {hungarian/fontsetup}  =>  {true}
>  {hungarian/envname}  =>  {hungarian}
>  {hungarian/babelname}  =>  {magyar}
>  {hungarian/localnumeral}  =>  {polyglossia@C@localnumeral}
>  {hungarian/Localnumeral}  =>  {polyglossia@C@localnumeral}.
Package polyglossia Info: Option: Hungarian, swapstrings=all.
)
Package polyglossia Info: Default language is hungarian.

No file polyglossia-test.aux.
\openout1 = `polyglossia-test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.

Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid
(fontspec)             this).

\symlegacymaths=\mathgroup4
LaTeX Font Info:    Overwriting symbol font `legacymaths' in version `bold'
(Font)                  OT1/cmr/m/n --> OT1/cmr/bx/n on input line 13.
LaTeX Font Info:    Redeclaring math accent \acute on input line 13.
LaTeX Font Info:    Redeclaring math accent \grave on input line 13.
LaTeX Font Info:    Redeclaring math accent \ddot on input line 13.
LaTeX Font Info:    Redeclaring math accent \tilde on input line 13.
LaTeX Font Info:    Redeclaring math accent \bar on input line 13.
LaTeX Font Info:    Redeclaring math accent \breve on input line 13.
LaTeX Font Info:    Redeclaring math accent \check on input line 13.
LaTeX Font Info:    Redeclaring math accent \hat on input line 13.
LaTeX Font Info:    Redeclaring math accent \dot on input line 13.
LaTeX Font Info:    Redeclaring math accent \mathring on input line 13.
LaTeX Font Info:    Redeclaring math symbol \colon on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Gamma on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Delta on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Theta on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Lambda on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Xi on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Pi on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Sigma on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Upsilon on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Phi on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Psi on input line 13.
LaTeX Font Info:    Redeclaring math symbol \Omega on input line 13.
LaTeX Font Info:    Redeclaring math symbol \mathdollar on input line 13.
LaTeX Font Info:    Redeclaring symbol font `operators' on input line 13.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `normal' on input line 13.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> TU/lmr/m/n on input line 13.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `bold' on input line 13.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> TU/lmr/m/n on input line 13.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  TU/lmr/m/n --> TU/lmr/m/n on input line 13.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> TU/lmr/m/it on input line 13.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> TU/lmr/bx/n on input line 13.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> TU/lmss/m/n on input line 13.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/m/n on input line 13.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  TU/lmr/m/n --> TU/lmr/bx/n on input line 13.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> TU/lmr/bx/it on input line 13.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> TU/lmss/bx/n on input line 13.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/bx/n on input line 13.
! You can't use `macro parameter character #' in vertical mode.
\hungarian@capsformat ....\ \@chapapp \ \fi \fi ##
                                                  1}}{}}\else \ifdefined \ch...
l.13 \begin{document}

? 
! Too many }'s.
\hungarian@capsformat ... \@chapapp \ \fi \fi ##1}
                                                  }{}}\else \ifdefined \chap...
l.13 \begin{document}

? 
! Too many }'s.
\hungarian@capsformat ...\@chapapp \ \fi \fi ##1}}
                                                  {}}\else \ifdefined \chapt...
l.13 \begin{document}

? 
! Too many }'s.
\hungarian@capsformat ...hapapp \ \fi \fi ##1}}{}}
                                                  \else \ifdefined \chapterm...
l.13 \begin{document}

? 
! Extra \else.
\hungarian@capsformat ... \ \fi \fi ##1}}{}}\else 
                                                  \ifdefined \chaptermark \l...
l.13 \begin{document}

? 
! Extra \fi.
\hungarian@capsformat ...ngarian}}\fi \fi \fi \fi 

l.13 \begin{document}

? 
The property list \polyglossia@langsetup contains the pairs (without outer
braces):
>  {latex/script}  =>  {latin}
>  {latex/lcscript}  =>  {latin}
>  {latex/scripttag}  =>  {}
>  {latex/language}  =>  {Latex}
>  {latex/langtag}  =>  {ENG}
>  {latex/hyphennames}  =>  {english}
>  {latex/direction}  =>  {LR}
>  {latex/hyphenmins}  =>  {2,3}
>  {latex/frenchspacing}  =>  {false}
>  {latex/indentfirst}  =>  {false}
>  {latex/fontsetup}  =>  {true}
>  {latex/envname}  =>  {latex}
>  {latex/babelname}  =>  {latex}
>  {latex/localnumeral}  =>  {polyglossia@C@localnumeral}
>  {latex/Localnumeral}  =>  {polyglossia@C@localnumeral}
>  {hungarian/script}  =>  {latin}
>  {hungarian/lcscript}  =>  {latin}
>  {hungarian/scripttag}  =>  {}
>  {hungarian/language}  =>  {Hungarian}
>  {hungarian/langtag}  =>  {HUN}
>  {hungarian/hyphennames}  =>  {hungarian,magyar}
>  {hungarian/direction}  =>  {LR}
>  {hungarian/hyphenmins}  =>  {2,2}
>  {hungarian/frenchspacing}  =>  {false}
>  {hungarian/indentfirst}  =>  {false}
>  {hungarian/fontsetup}  =>  {true}
>  {hungarian/envname}  =>  {hungarian}
>  {hungarian/babelname}  =>  {magyar}
>  {hungarian/localnumeral}  =>  {polyglossia@C@localnumeral}
>  {hungarian/Localnumeral}  =>  {polyglossia@C@localnumeral}.
[1

] (polyglossia-test.aux
! You can't use `macro parameter character #' in vertical mode.
\hungarian@capsformat ....\ \@chapapp \ \fi \fi ##
                                                  1}}{}}\else \ifdefined \ch...
l.3 \selectlanguage *{hungarian}

? 
! Extra }, or forgotten \endgroup.
\hungarian@capsformat ... \@chapapp \ \fi \fi ##1}
                                                  }{}}\else \ifdefined \chap...
l.3 \selectlanguage *{hungarian}

? 
! Extra }, or forgotten \endgroup.
\hungarian@capsformat ...\@chapapp \ \fi \fi ##1}}
                                                  {}}\else \ifdefined \chapt...
l.3 \selectlanguage *{hungarian}

? 
! Extra }, or forgotten \endgroup.
\hungarian@capsformat ...hapapp \ \fi \fi ##1}}{}}
                                                  \else \ifdefined \chapterm...
l.3 \selectlanguage *{hungarian}

? 
! Extra \else.
\hungarian@capsformat ... \ \fi \fi ##1}}{}}\else 
                                                  \ifdefined \chaptermark \l...
l.3 \selectlanguage *{hungarian}

? 
)
! Extra \fi.
\enddocument ...letter \@@input \jobname .aux \fi 
                                                  \@dofilelist \ifdim \font@...
l.21 \end{document}

? 
 ) 
Here is how much of TeX's memory you used:
 13562 strings out of 427233
 301210 string characters out of 3145603
 402019 words of memory out of 3000000
 18058 multiletter control sequences out of 15000+200000
 532378 words of font info for 29 fonts, out of 3000000 for 9000
 1348 hyphenation exceptions out of 8191
 52i,4n,47p,809b,429s stack positions out of 5000i,500n,10000p,200000b,50000s

Output written on polyglossia-test.pdf (1 page).

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).

jspitz commented 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.

Hanziness commented 4 years ago

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.

reutenauer commented 4 years ago

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?

Hanziness commented 4 years ago

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}):

Compilation log

``` 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 for immediate help. ... l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra }, or forgotten \endgroup. \hungarian@capsformat ... \@chapapp \ \fi \fi ##1} }{}}}{\ifcsdef {chaptermar... l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra }, or forgotten \endgroup. \hungarian@capsformat ...\@chapapp \ \fi \fi ##1}} {}}}{\ifcsdef {chaptermark... l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra }, or forgotten \endgroup. \hungarian@capsformat ...hapapp \ \fi \fi ##1}}{}} }{\ifcsdef {chaptermark}{\... l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra }, or forgotten \endgroup. \hungarian@capsformat ...apapp \ \fi \fi ##1}}{}}} {\ifcsdef {chaptermark}{\i... l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra }, or forgotten \endgroup. \hungarian@capsformat ...k for Hungarian}}}{}}{}}} \fi l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra \fi. \hungarian@capsformat ...r Hungarian}}}{}}{}}}\fi l.3 ...language *[swapstrings=captions]{hungarian} ) (F:\Programs\MiKTeX\tex/latex/base\ts1cmr.fd) g:/Dokumentumok/temp/polyglossiatest.tex:10: You can't use `macro parameter cha racter #' in vertical mode. \hungarian@capsformat ....\ \@chapapp \ \fi \fi ## 1}}{}}}{\ifcsdef {chapterm... l.10 \begin{document} g:/Dokumentumok/temp/polyglossiatest.tex:10: Too many }'s. \hungarian@capsformat ... \@chapapp \ \fi \fi ##1} }{}}}{\ifcsdef {chaptermar... l.10 \begin{document} g:/Dokumentumok/temp/polyglossiatest.tex:10: Too many }'s. \hungarian@capsformat ...\@chapapp \ \fi \fi ##1}} {}}}{\ifcsdef {chaptermark... l.10 \begin{document} g:/Dokumentumok/temp/polyglossiatest.tex:10: Too many }'s. \hungarian@capsformat ...hapapp \ \fi \fi ##1}}{}} }{\ifcsdef {chaptermark}{\... l.10 \begin{document} g:/Dokumentumok/temp/polyglossiatest.tex:10: Too many }'s. \hungarian@capsformat ...apapp \ \fi \fi ##1}}{}}} {\ifcsdef {chaptermark}{\i... l.10 \begin{document} g:/Dokumentumok/temp/polyglossiatest.tex:10: Too many }'s. \hungarian@capsformat ...k for Hungarian}}}{}}{}}} \fi l.10 \begin{document} g:/Dokumentumok/temp/polyglossiatest.tex:10: Extra \fi. \hungarian@capsformat ...r Hungarian}}}{}}{}}}\fi l.10 \begin{document} [1] (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: Extra }, or forgotten \endgroup. \hungarian@capsformat ... \@chapapp \ \fi \fi ##1} }{}}}{\ifcsdef {chaptermar... l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra }, or forgotten \endgroup. \hungarian@capsformat ...\@chapapp \ \fi \fi ##1}} {}}}{\ifcsdef {chaptermark... l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra }, or forgotten \endgroup. \hungarian@capsformat ...hapapp \ \fi \fi ##1}}{}} }{\ifcsdef {chaptermark}{\... l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra }, or forgotten \endgroup. \hungarian@capsformat ...apapp \ \fi \fi ##1}}{}}} {\ifcsdef {chaptermark}{\i... l.3 ...language *[swapstrings=captions]{hungarian} polyglossiatest.aux:3: Extra }, or forgotten \endgroup. \hungarian@capsformat ...k for Hungarian}}}{}}{}}} \fi l.3 ...language *[swapstrings=captions]{hungarian} ) g:/Dokumentumok/temp/polyglossiatest.tex:18: Extra \fi. \enddocument ...letter \@@input \jobname .aux \fi \@dofilelist \ifdim \font@... l.18 \end{document} ) (see the transcript file for additional information) Output written on polyglossiatest.pdf (1 page). SyncTeX written on polyglossiatest.synctex.gz. Transcript written on polyglossiatest.log. ```

jspitz commented 4 years ago

(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.

jspitz commented 4 years ago

By the way, which version of polyglossia do you have?

jspitz commented 4 years ago

By the way, which version of polyglossia do you have?

Never mind, you already reported that (1.48)

reutenauer commented 4 years ago

15ab669 should fix the rest of the issue.

Hanziness commented 4 years ago

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!

jspitz commented 4 years ago

Good.

Arthur, I think this justifies a quick release of 1.49.

jspitz commented 4 years ago

BTW thanks @Hanziness for this really detailed and precise bug report. This is very helpful.

Hanziness commented 4 years ago

You're welcome! Glad I could help! :)

reutenauer commented 4 years ago

I just uploaded the package to CTAN and it will make its way to the distributions within a few days as usual.