Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ All changes included in 1.9:
### `pdf`

- ([#4426](https://github.com/quarto-dev/quarto-cli/issues/4426)): Add `pdf-standard` option for PDF/A, PDF/UA, and PDF version control. Supports standards like `a-2b`, `ua-1`, and versions `1.7`, `2.0`. Works with both LaTeX and Typst formats.
- ([#9091](https://github.com/quarto-dev/quarto-cli/issues/9091)): Fix vertical alignment div has no effect for pdf output
- ([#10291](https://github.com/quarto-dev/quarto-cli/issues/10291)): Fix detection of babel hyphenation warnings with straight-quote format instead of backtick-quote format.
- ([#13248](https://github.com/quarto-dev/quarto-cli/issues/13248)): Fix image alt text not being passed to LaTeX `\includegraphics[alt={...}]` for PDF accessibility. Markdown image captions and `fig-alt` attributes are now preserved for PDF/UA compliance.
- ([#13661](https://github.com/quarto-dev/quarto-cli/issues/13661)): Fix LaTeX compilation errors when using `mermaid-format: svg` with PDF/LaTeX output. SVG diagrams are now written directly without HTML script tags. Note: `mermaid-format: png` is recommended for best compatibility. SVG format requires `rsvg-convert` (or Inkscape with `use-rsvg-convert: false`) in PATH for conversion to PDF, and may experience text clipping in diagrams with multi-line labels.
Expand Down
11 changes: 8 additions & 3 deletions src/resources/filters/layout/latex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,14 @@ function latexPanel(layout)
end
local caption = create_latex_caption(layout)

-- read vertical alignment and strip attribute
local vAlign = validatedVAlign(layout.attributes[kLayoutVAlign])
layout.attributes[kLayoutVAlign] = nil
-- convert valign_class to latex notation, read vertical alignment and strip attribute
local vAlign = "top"
if layout.valign_class ~= nil then
local vAlignClass = layout.valign_class
vAlign = vAlignClass:gsub("quarto%-layout%-valign%-","")
end

vAlign = validatedVAlign(vAlign)

for i, row in ipairs(layout.rows.content) do

Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We run several type of tests

- Unit tests, located in `unit/` folder
- Integration tests, located in `integration/` folder
- smoke tests localed in `smoke` folder
- smoke tests located in `smoke` folder

Tests are run in our CI workflow on GHA at each commit, and for each PR.

Expand Down
6 changes: 3 additions & 3 deletions tests/docs/smoke-all/2023/11/02/7262.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ _quarto:
# Verify outer figure environment wraps the layout
- '\\begin\{figure\}[\s\S]*\\begin\{minipage\}'
# Verify two minipages with equal width
- '\\begin\{minipage\}\{0\.50\\linewidth\}'
- '\\begin\{minipage\}\[b\]\{0\.50\\linewidth\}'
# Verify figure[H] inside first minipage with caption and label
- '\\begin\{minipage\}[\s\S]*\\begin\{figure\}\[H\][\s\S]*\\caption\{\\label\{fig-example\}Figure caption\}'
- '\\begin\{minipage\}\[b\][\s\S]*\\begin\{figure\}\[H\][\s\S]*\\caption\{\\label\{fig-example\}Figure caption\}'
# Verify longtable (NOT wrapped in table environment) inside second minipage
- '\\begin\{minipage\}\{0\.50\\linewidth\}[\s\S]*\\begin\{longtable\}'
- '\\begin\{minipage\}\[b\]\{0\.50\\linewidth\}[\s\S]*\\begin\{longtable\}'
# Verify table caption with label
- '\\caption\{\\label\{tbl-example\}Table caption\}'
# Verify minipage ends before outer figure ends
Expand Down
10 changes: 7 additions & 3 deletions tests/docs/smoke-all/2024/01/19/8354.qmd
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
---
title: "Untitled"
format: latex
format:
pdf:
keep-tex: true
execute:
warning: false
_quarto:
tests:
latex:
ensureSnapshotMatches: true
pdf:
ensureLatexFileRegexMatches:
- ['\\begin\{minipage\}\[t\]\{0\.50\\linewidth\}']
- []
---

```{r}
Expand Down
278 changes: 0 additions & 278 deletions tests/docs/smoke-all/2024/01/19/8354.tex.snapshot

This file was deleted.

30 changes: 30 additions & 0 deletions tests/docs/smoke-all/2025/11/08/9109-center.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "Untitled"
format:
pdf:
keep-tex: true
execute:
warning: false
_quarto:
tests:
pdf:
ensureLatexFileRegexMatches:
- ['\\begin\{minipage\}\[c\]\{0\.50\\linewidth\}']
- []
---

```{r}
#| label: tbl-tables
#| tbl-cap: "Tables"
#| tbl-subcap:
#| - cars
#| - pressure
#| layout-ncol: 2
#| layout-valign: center

library(knitr)
kable(head(cars))
kable(head(pressure))
```

See @tbl-tables for examples. In particular, @tbl-tables-2.
19 changes: 19 additions & 0 deletions tests/docs/smoke-all/2025/11/08/9109-markdown.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
format:
pdf:
keep-tex: true
_quarto:
tests:
pdf:
ensureLatexFileRegexMatches:
- ['\\begin\{minipage\}\[t\]']
- []
---

::: {layout="[40, -2, 40]" layout-valign="top"}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Lorem ipsum dolor sit amet, consectetur adipiscing elit

:::
Loading
Loading