Skip to content

Commit

Permalink
Merge branch 'crossref/as_latex'
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv committed Jan 21, 2025
2 parents 5b1501c + 3684c41 commit b42543e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/changelog-1.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ All changes included in 1.7:
## `pdf` format

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

## `typst` format

Expand Down
2 changes: 1 addition & 1 deletion src/resources/filters/crossref/meta.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function crossrefMetaInject()
return {
Meta = function(meta)
local function as_latex(inlines)
return trim(pandoc.write(pandoc.Pandoc(inlines), "latex"))
return trim(pandoc.write(pandoc.Pandoc(quarto.utils.as_blocks(inlines)), "latex"))
end
metaInjectLatex(meta, function(inject)

Expand Down
18 changes: 18 additions & 0 deletions tests/docs/smoke-all/crossrefs/float/latex/latex-fig-title.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Multi word fig title should be one line
format: latex
crossref:
fig-title: 'Supplementary Figure'
_quarto:
tests:
latex:
ensureFileRegexMatches:
- ['\\figurename\{Supplementary Figure\}']
- []
---

## Unresolved Crossref Figure

![Elephant](img/surus.jpg){#fig-elephant}

See @fig-elephant for examples.

0 comments on commit b42543e

Please sign in to comment.