Skip to content

Language options in \DocumentMetadata #334

Open
@jbezos

Description

@jbezos

There are currently to ways to set the main locale for a document, as shown:

\DocumentMetadata{lang=ga}

and

\documentclass[irish]{article}

(Or a package option, but in the examples I only use class options.)

They should be coordinated somehow. Let’s consider several scenarios.


\DocumentMetadata{}
\documentclass[irish]{article}

Here we can pass lang=ga to \DocumentMetadata, which is more or less obvious. Loading multiple languages as options also has a straightforward interpretation.


\DocumentMetadata{lang=ga}
\documentclass{article}

But \usepackage{babel} is currently valid even if there is no class option, so this will be an incompatible change. Furthermore, packages declaring macros for the irish option won’t recognize the language.


\DocumentMetadata{lang=ga}
\documentclass[irish]{article}

Redundant, but it makes sense. On the other hand...


\DocumentMetadata{lang=ga}
\documentclass[english]{article}

Is this a contradiction, or perhaps is irish the main language and english a secondary one?


\DocumentMetadata{lang=ga}
\documentclass[english,irish]{article}

It makes sense. But...


\DocumentMetadata{lang=ga}
\documentclass[irish,english]{article}

Again, what does this mean? Should it just be forbidden?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions