Thanks to visit codestin.com
Credit goes to github.com

Skip to content

key shorthands not supported in variable babeloptions #11160

@chrisaga

Description

@chrisaga

Explain the problem.
Activating language shorthands via babeloptions crashes LaTeX rendering.

  1. Set yaml preamble of a markdown document like this
---
lang : fr
papersize : a4
babeloptions:
- shorthands=:;!?

...
  1. Render document in PDF leads to this error
! Package babel Error: Bad option 'shorthands=:;!?'. Either you have misspelled
 the
(babel)                key or there is a previous setting of 'shorthands'. Vali
d
(babel)                keys are, among others, 'shorthands', 'main', 'bidi',
(babel)                'strings', 'config', 'headfoot', 'safe', 'math'..

See the babel package documentation for explanation.

Indeed Pandoc calls babel like this

\ifLuaTeX
\usepackage[bidi=basic,shorthands=off,shorthands=:;!?]{babel}
\else
\usepackage[bidi=default,shorthands=off,shorthands=:;!?]{babel}
\fi

babel doesn't allow using the shorthands key twice

Some time ago Pandoc (version 3.5) was redefining \languageshorthands to deactivate shorthands. This was reversible at the document level. Forcing shorthands=off in babel options is not. So it's also a functional regression.

There might be some reasons to deactivate shorthands by default but we should be able to activate them again.

Pandoc version?
pandoc 3.8 on Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions