Skip to content

Braces are incorrectly escaped in LaTeX package class options #10718

@rrthomas

Description

@rrthomas

Explain the problem.

When I provide the following in a YAML block:

geometry:
  - papersize={12in,12in}

The braces are escaped in LaTeX, which causes LaTeX to fail. I can work around this particular case by using paperwidth and paperheight, but there will be cases for which there isn't a workaround.

I'm not sure if this issue is related to #9262, but the solution there doesn't work for this case.

Minimal example:

Markdown input:

---
geometry:
  - papersize={12in,12in}
---

Hello.

pandoc invocation:

$ pandoc --standalone foo.md --output=foo.tex
$ grep geometry foo.tex
\usepackage[papersize=\{12in,12in\}]{geometry}

Pandoc version?

3.6.4.

Thanks for pandoc!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions