Skip to content

Commit b42543e

Browse files
committed
Merge branch 'crossref/as_latex'
2 parents 5b1501c + 3684c41 commit b42543e

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

news/changelog-1.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ All changes included in 1.7:
3636
## `pdf` format
3737

3838
- ([#11835](https://github.com/quarto-dev/quarto-cli/issues/11835)): Take markdown structure into account when detecting minimum heading level.
39+
- ([#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'`.
3940

4041
## `typst` format
4142

src/resources/filters/crossref/meta.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function crossrefMetaInject()
66
return {
77
Meta = function(meta)
88
local function as_latex(inlines)
9-
return trim(pandoc.write(pandoc.Pandoc(inlines), "latex"))
9+
return trim(pandoc.write(pandoc.Pandoc(quarto.utils.as_blocks(inlines)), "latex"))
1010
end
1111
metaInjectLatex(meta, function(inject)
1212

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Multi word fig title should be one line
3+
format: latex
4+
crossref:
5+
fig-title: 'Supplementary Figure'
6+
_quarto:
7+
tests:
8+
latex:
9+
ensureFileRegexMatches:
10+
- ['\\figurename\{Supplementary Figure\}']
11+
- []
12+
---
13+
14+
## Unresolved Crossref Figure
15+
16+
![Elephant](img/surus.jpg){#fig-elephant}
17+
18+
See @fig-elephant for examples.

0 commit comments

Comments
 (0)