Skip to content

handling of unknown languages in \DocumentMetadata #343

@u-fischer

Description

@u-fischer

If a language that is not known to babel is set in \DocumentMetadata it errors. It doesn't matter if the language tag actually exists (in https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) or is completely wrong:

\DocumentMetadata{lang=ht} % or ff or blub
\documentclass{article}
\usepackage{babel}
\begin{document}
abc
\end{document}

gives

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...rmessage  LaTeX Error: Missing \protect \begin {document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help\@err@                                                                   
                                                                                                                                                                                                                                      
l.4115       \bbl@read@ini{\bbl@bcp}\m@ne

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions