Skip to content

Commit 518f530

Browse files
committed
pandoc template udpate - Improved babel support
From jgm/pandoc@9be0963 Introducing new `babeloptions` and moving option in `doc-class.tex` partial
1 parent 13652c1 commit 518f530

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

news/changelog-1.7.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ All changes included in 1.7:
4141
- ([#11835](https://github.com/quarto-dev/quarto-cli/issues/11835)): Take markdown structure into account when detecting minimum heading level.
4242
- ([#11903](https://github.com/quarto-dev/quarto-cli/issues/11903)): `crossref` configuration like `fig-title` or `tbl-title` now correctly supports multi word values, e.g. `fig-title: 'Supplementary Figure'`.
4343
- ([#11878](https://github.com/quarto-dev/quarto-cli/issues/11878), [#12085](https://github.com/quarto-dev/quarto-cli/issues/12085)): Correctly fixup raw LaTeX table having an unexpected table env with options (e.g `\begin{table}[!ht]`) to be handled as crossref table.
44+
- Update to Pandoc's LaTeX template following Pandoc 3.6.3 support:
45+
- Improved Babel support:
46+
- New `babeloptions` variable in the template to allow for more flexible Babel options.
47+
- `doc-class.tex` Quarto's partial has been updated as Babel options have been moved to `documentclass` definition in `doc-class.tex` Quarto's partial.
4448

4549
## `typst` format
4650

src/resources/formats/pdf/pandoc/doc-class.tex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
\documentclass[
2+
$for(babel-otherlangs)$
3+
$babel-otherlangs$,
4+
$endfor$
5+
$if(babel-lang)$
6+
$babel-lang$,
7+
$endif$
28
$if(fontsize)$
39
$fontsize$,
410
$endif$

src/resources/formats/pdf/pandoc/template.tex

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,22 +322,18 @@
322322
323323
$if(lang)$
324324
\ifLuaTeX
325-
\usepackage[bidi=basic]{babel}
325+
\usepackage[bidi=basic$for(babeloptions)$,$babeloptions$$endfor$]{babel}
326326
\else
327-
\usepackage[bidi=default]{babel}
327+
\usepackage[bidi=default$for(babeloptions)$,$babeloptions$$endfor$]{babel}
328328
\fi
329329
$if(babel-lang)$
330-
\babelprovide[main,import]{$babel-lang$}
331330
$if(mainfont)$
332331
\ifPDFTeX
333332
\else
334333
\babelfont{rm}[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$}
335334
\fi
336335
$endif$
337336
$endif$
338-
$for(babel-otherlangs)$
339-
\babelprovide[import]{$babel-otherlangs$}
340-
$endfor$
341337
$for(babelfonts/pairs)$
342338
\babelfont[$babelfonts.key$]{rm}{$babelfonts.value$}
343339
$endfor$

0 commit comments

Comments
 (0)