latex3 / babel

The babel system for LaTeX, LuaLaTeX and XeLaTeX
LaTeX Project Public License v1.3c
125 stars 34 forks source link

Option handling is broken with braces #198

Closed Skillmon closed 1 year ago

Skillmon commented 1 year ago

If the global option list or the package option list of babel contains braces the checks for conflicts in the load order of languages due to global and local options is broken and leads to a Missing \begin{document} error. The problematic code is the code starting in line 4428 of the current babel.sty:

  \bbl@for\bbl@tempb\bbl@tempa{%
    \bbl@xin@{,\bbl@tempb,}{,\bbl@loaded,}%
    \ifin@\edef\bbl@tempc{\bbl@tempb}\fi}

MWE:

\documentclass[foo={bar}]{article}

\usepackage[english]{babel}

\begin{document}
\end{document}
jbezos commented 1 year ago

Formerly the braces were not allowed. I’ll adapt it to this new behavior.

Skillmon commented 1 year ago

@jbezos yes, they weren't. I just noticed that now that they are they break babel :) Thanks for the fix!