From 72b182a1a10e2beb8fb02167ad1e3354732deaac Mon Sep 17 00:00:00 2001 From: MBe-iUS Date: Fri, 7 Nov 2025 14:22:24 +0100 Subject: [PATCH 01/11] Fix: Vertical alignment div has no effect for pdf output --- src/resources/filters/layout/latex.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/resources/filters/layout/latex.lua b/src/resources/filters/layout/latex.lua index e5bce66ba45..d514ddabd79 100644 --- a/src/resources/filters/layout/latex.lua +++ b/src/resources/filters/layout/latex.lua @@ -67,8 +67,9 @@ function latexPanel(layout) end local caption = create_latex_caption(layout) - -- read vertical alignment and strip attribute - local vAlign = validatedVAlign(layout.attributes[kLayoutVAlign]) + -- convert valign_class to latex notion, read vertical alignment and strip attribute + local vAlign = string.gsub(layout.valign_class,"quarto-layout-valign-","") + vAlign = validatedVAlign(vAlign) layout.attributes[kLayoutVAlign] = nil for i, row in ipairs(layout.rows.content) do From 2d440707cbc51bf79284ec5b822903e1c5d6c2bc Mon Sep 17 00:00:00 2001 From: MBe-iUS Date: Fri, 7 Nov 2025 14:49:34 +0100 Subject: [PATCH 02/11] Inform changelog --- news/changelog-1.9.md | 1 + 1 file changed, 1 insertion(+) diff --git a/news/changelog-1.9.md b/news/changelog-1.9.md index 36e401833de..aa7eba46148 100644 --- a/news/changelog-1.9.md +++ b/news/changelog-1.9.md @@ -40,6 +40,7 @@ All changes included in 1.9: - ([#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. - ([rstudio/tinytex-releases#49](https://github.com/rstudio/tinytex-releases/issues/49)): Fix detection of LuaTeX-ja missing file errors by matching both "File" and "file" in error messages. +- ([#9091](https://github.com/quarto-dev/quarto-cli/issues/9091)): Fix vertical alignment div has no effect for pdf output ## Projects From 4e884cca871a52eeb46345a870384a425f80e199 Mon Sep 17 00:00:00 2001 From: MBe-iUS Date: Fri, 7 Nov 2025 15:14:06 +0100 Subject: [PATCH 03/11] Handle valign_class is nil --- src/resources/filters/layout/latex.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/resources/filters/layout/latex.lua b/src/resources/filters/layout/latex.lua index d514ddabd79..2ac95b60b24 100644 --- a/src/resources/filters/layout/latex.lua +++ b/src/resources/filters/layout/latex.lua @@ -68,7 +68,12 @@ function latexPanel(layout) local caption = create_latex_caption(layout) -- convert valign_class to latex notion, read vertical alignment and strip attribute - local vAlign = string.gsub(layout.valign_class,"quarto-layout-valign-","") + local vAlign = "top" + if layout.valign_class ~= nil then + local vAlignClass = layout.valign_class + vAlign = vAlignClass:gsub("quarto-layout-valign-","") + end + vAlign = validatedVAlign(vAlign) layout.attributes[kLayoutVAlign] = nil From dba95cbebaddb4f892fd10478e75b9199e98f64a Mon Sep 17 00:00:00 2001 From: MBe-iUS Date: Fri, 7 Nov 2025 20:12:11 +0100 Subject: [PATCH 04/11] Escape lua pattern hyphen --- src/resources/filters/layout/latex.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/filters/layout/latex.lua b/src/resources/filters/layout/latex.lua index 2ac95b60b24..e693fa64521 100644 --- a/src/resources/filters/layout/latex.lua +++ b/src/resources/filters/layout/latex.lua @@ -71,7 +71,7 @@ function latexPanel(layout) local vAlign = "top" if layout.valign_class ~= nil then local vAlignClass = layout.valign_class - vAlign = vAlignClass:gsub("quarto-layout-valign-","") + vAlign = vAlignClass:gsub("quarto%-layout%-valign%-","") end vAlign = validatedVAlign(vAlign) From 95b81c62c2f8f4cad8b20b75717ddc71a78e1764 Mon Sep 17 00:00:00 2001 From: MBe-iUS Date: Sat, 8 Nov 2025 15:45:16 +0100 Subject: [PATCH 05/11] Adapt test file snapshot Default setting in function VAlignValidated for minipage is "top". This is now preset and needs to be reflected in the snapshot file. --- tests/docs/smoke-all/2024/01/19/8354.tex.snapshot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docs/smoke-all/2024/01/19/8354.tex.snapshot b/tests/docs/smoke-all/2024/01/19/8354.tex.snapshot index 305c0eb2744..81614883005 100644 --- a/tests/docs/smoke-all/2024/01/19/8354.tex.snapshot +++ b/tests/docs/smoke-all/2024/01/19/8354.tex.snapshot @@ -220,7 +220,7 @@ \caption{\label{tbl-tables}Tables} -\begin{minipage}{0.50\linewidth} +\begin{minipage}[t]{0.50\linewidth} \subcaption{\label{tbl-tables-1}cars} @@ -243,7 +243,7 @@ speed & dist\\ \end{minipage}% % -\begin{minipage}{0.50\linewidth} +\begin{minipage}[t]{0.50\linewidth} \subcaption{\label{tbl-tables-2}pressure} From 2cb5f096ece07add128a021ca46d35b64e7e17ae Mon Sep 17 00:00:00 2001 From: Maarten Becker Date: Sat, 8 Nov 2025 16:07:26 +0100 Subject: [PATCH 06/11] New test for valign=bottom --- tests/README.md | 2 +- tests/docs/smoke-all/2025/11/08/9109.qmd | 26 ++ .../smoke-all/2025/11/08/9109.tex.snapshot | 277 ++++++++++++++++++ 3 files changed, 304 insertions(+), 1 deletion(-) create mode 100644 tests/docs/smoke-all/2025/11/08/9109.qmd create mode 100644 tests/docs/smoke-all/2025/11/08/9109.tex.snapshot diff --git a/tests/README.md b/tests/README.md index 5a6c200169f..3dbfd0dc65d 100644 --- a/tests/README.md +++ b/tests/README.md @@ -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. diff --git a/tests/docs/smoke-all/2025/11/08/9109.qmd b/tests/docs/smoke-all/2025/11/08/9109.qmd new file mode 100644 index 00000000000..0c3dbdc63db --- /dev/null +++ b/tests/docs/smoke-all/2025/11/08/9109.qmd @@ -0,0 +1,26 @@ +--- +title: "Untitled" +format: latex +execute: + warning: false +_quarto: + tests: + latex: + ensureSnapshotMatches: true +--- + +```{r} +#| label: tbl-tables +#| tbl-cap: "Tables" +#| tbl-subcap: +#| - cars +#| - pressure +#| layout-ncol: 2 +#| layout-valign: bottom + +library(knitr) +kable(head(cars)) +kable(head(pressure)) +``` + +See @tbl-tables for examples. In particular, @tbl-tables-2. diff --git a/tests/docs/smoke-all/2025/11/08/9109.tex.snapshot b/tests/docs/smoke-all/2025/11/08/9109.tex.snapshot new file mode 100644 index 00000000000..5e8ffedf59e --- /dev/null +++ b/tests/docs/smoke-all/2025/11/08/9109.tex.snapshot @@ -0,0 +1,277 @@ +% Options for packages loaded elsewhere +% Options for packages loaded elsewhere +\PassOptionsToPackage{unicode}{hyperref} +\PassOptionsToPackage{hyphens}{url} +\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} +% +\documentclass[ + letterpaper, + DIV=11, + numbers=noendperiod]{scrartcl} +\usepackage{xcolor} +\usepackage{amsmath,amssymb} +\setcounter{secnumdepth}{-\maxdimen} % remove section numbering +\usepackage{iftex} +\ifPDFTeX + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{textcomp} % provide euro and other symbols +\else % if luatex or xetex + \usepackage{unicode-math} % this also loads fontspec + \defaultfontfeatures{Scale=MatchLowercase} + \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} +\fi +\usepackage{lmodern} +\ifPDFTeX\else + % xetex/luatex font selection +\fi +% Use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +\IfFileExists{microtype.sty}{% use microtype if available + \usepackage[]{microtype} + \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +\makeatletter +\@ifundefined{KOMAClassName}{% if non-KOMA class + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt}} +}{% if KOMA class + \KOMAoptions{parskip=half}} +\makeatother +% Make \paragraph and \subparagraph free-standing +\makeatletter +\ifx\paragraph\undefined\else + \let\oldparagraph\paragraph + \renewcommand{\paragraph}{ + \@ifstar + \xxxParagraphStar + \xxxParagraphNoStar + } + \newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}} + \newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else + \let\oldsubparagraph\subparagraph + \renewcommand{\subparagraph}{ + \@ifstar + \xxxSubParagraphStar + \xxxSubParagraphNoStar + } + \newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}} + \newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}} +\fi +\makeatother + +\usepackage{color} +\usepackage{fancyvrb} +\newcommand{\VerbBar}{|} +\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} +\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} +% Add ',fontsize=\small' for more characters per line +\usepackage{framed} +\definecolor{shadecolor}{RGB}{241,243,245} +\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}} +\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.40,0.45,0.13}{#1}} +\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\CharTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} +\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} +\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}} +\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}} +\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} +\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.28,0.35,0.67}{#1}} +\newcommand{\ImportTok}[1]{\textcolor[rgb]{0.00,0.46,0.62}{#1}} +\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}} +\newcommand{\NormalTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} +\newcommand{\StringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} +\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.07,0.07,0.07}{#1}} +\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} +\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} + +\usepackage{longtable,booktabs,array} +\usepackage{calc} % for calculating minipage widths +% Correct order of tables after \paragraph or \subparagraph +\usepackage{etoolbox} +\makeatletter +\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} +\makeatother +% Allow footnotes in longtable head/foot +\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} +\makesavenoteenv{longtable} +\usepackage{graphicx} +\makeatletter +\newsavebox\pandoc@box +\newcommand*\pandocbounded[1]{% scales image to fit in text height/width + \sbox\pandoc@box{#1}% + \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}% + \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}% + \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both + \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}% + \else\usebox{\pandoc@box}% + \fi% +} +% Set default figure placement to htbp +\def\fps@figure{htbp} +\makeatother + + + + + +\setlength{\emergencystretch}{3em} % prevent overfull lines + +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} + + + + + + +\KOMAoption{captions}{tableheading} +\makeatletter +\@ifpackageloaded{caption}{}{\usepackage{caption}} +\AtBeginDocument{% +\ifdefined\contentsname + \renewcommand*\contentsname{Table of contents} +\else + \newcommand\contentsname{Table of contents} +\fi +\ifdefined\listfigurename + \renewcommand*\listfigurename{List of Figures} +\else + \newcommand\listfigurename{List of Figures} +\fi +\ifdefined\listtablename + \renewcommand*\listtablename{List of Tables} +\else + \newcommand\listtablename{List of Tables} +\fi +\ifdefined\figurename + \renewcommand*\figurename{Figure} +\else + \newcommand\figurename{Figure} +\fi +\ifdefined\tablename + \renewcommand*\tablename{Table} +\else + \newcommand\tablename{Table} +\fi +} +\@ifpackageloaded{float}{}{\usepackage{float}} +\floatstyle{ruled} +\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]} +\floatname{codelisting}{Listing} +\newcommand*\listoflistings{\listof{codelisting}{List of Listings}} +\makeatother +\makeatletter +\makeatother +\makeatletter +\@ifpackageloaded{caption}{}{\usepackage{caption}} +\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}} +\makeatother +\usepackage{bookmark} +\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available +\urlstyle{same} +\hypersetup{ + pdftitle={Untitled}, + colorlinks=true, + linkcolor={blue}, + filecolor={Maroon}, + citecolor={Blue}, + urlcolor={Blue}, + pdfcreator={LaTeX via pandoc}} + + +\title{Untitled} +\author{} +\date{} +\begin{document} +\maketitle + + +\begin{Shaded} +\begin{Highlighting}[] +\FunctionTok{library}\NormalTok{(knitr)} +\FunctionTok{kable}\NormalTok{(}\FunctionTok{head}\NormalTok{(cars))} +\FunctionTok{kable}\NormalTok{(}\FunctionTok{head}\NormalTok{(pressure))} +\end{Highlighting} +\end{Shaded} + +\begin{table} + +\caption{\label{tbl-tables}Tables} + +\begin{minipage}[b]{0.50\linewidth} + +\subcaption{\label{tbl-tables-1}cars} + +\centering{ + +\begin{tabular}{rr} +\toprule +speed & dist\\ +\midrule +4 & 2\\ +4 & 10\\ +7 & 4\\ +7 & 22\\ +8 & 16\\ +9 & 10\\ +\bottomrule +\end{tabular} + +} + +\end{minipage}% +% +\begin{minipage}[b]{0.50\linewidth} + +\subcaption{\label{tbl-tables-2}pressure} + +\centering{ + +\begin{tabular}{rr} +\toprule +temperature & pressure\\ +\midrule +0 & 0.0002\\ +20 & 0.0012\\ +40 & 0.0060\\ +60 & 0.0300\\ +80 & 0.0900\\ +100 & 0.2700\\ +\bottomrule +\end{tabular} + +} + +\end{minipage}% + +\end{table}% + +See Table~\ref{tbl-tables} for examples. In particular, +Table~\ref{tbl-tables-2}. + + + + +\end{document} From 90084202613fae73e9bc1470e6e675214f87a039 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Tue, 3 Mar 2026 17:12:45 +0100 Subject: [PATCH 07/11] Move changelog in correct place --- news/changelog-1.9.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/changelog-1.9.md b/news/changelog-1.9.md index 44a9bd76904..0f6d777234a 100644 --- a/news/changelog-1.9.md +++ b/news/changelog-1.9.md @@ -89,11 +89,11 @@ 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. - ([rstudio/tinytex-releases#49](https://github.com/rstudio/tinytex-releases/issues/49)): Fix detection of LuaTeX-ja missing file errors by matching both "File" and "file" in error messages. -- ([#9091](https://github.com/quarto-dev/quarto-cli/issues/9091)): Fix vertical alignment div has no effect for pdf output - ([#13667](https://github.com/quarto-dev/quarto-cli/issues/13667)): Fix LaTeX compilation error with Python error output containing caret characters. - ([#13730](https://github.com/quarto-dev/quarto-cli/issues/13730)): Fix TinyTeX detection when `~/.TinyTeX/` directory exists without binaries. Quarto now verifies that the bin directory and tlmgr binary exist before reporting TinyTeX as available, allowing proper fallback to system PATH installations. - ([#13919](https://github.com/quarto-dev/quarto-cli/issues/13919)): Fix margin citations with citeproc showing unresolved `?quarto-cite:` placeholders in PDF output. Caused by Pandoc 3.6+ adding `\protect` before `\phantomsection` in bibliography anchors. From da91d5573ff063efa6ae7cbd3a4f02fc582ff34d Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Tue, 3 Mar 2026 17:40:10 +0100 Subject: [PATCH 08/11] Typo in comment --- src/resources/filters/layout/latex.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/filters/layout/latex.lua b/src/resources/filters/layout/latex.lua index 65e6420682a..3244b20c1ce 100644 --- a/src/resources/filters/layout/latex.lua +++ b/src/resources/filters/layout/latex.lua @@ -67,7 +67,7 @@ function latexPanel(layout) end local caption = create_latex_caption(layout) - -- convert valign_class to latex notion, read vertical alignment and strip attribute + -- 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 From b942a52ab34b1772a0ede8b33836c7e7444f9a8c Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Tue, 3 Mar 2026 17:41:05 +0100 Subject: [PATCH 09/11] kLayoutVAlign already removed in panellayout.lua --- src/resources/filters/layout/latex.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/src/resources/filters/layout/latex.lua b/src/resources/filters/layout/latex.lua index 3244b20c1ce..58e4dd9165e 100644 --- a/src/resources/filters/layout/latex.lua +++ b/src/resources/filters/layout/latex.lua @@ -75,7 +75,6 @@ function latexPanel(layout) end vAlign = validatedVAlign(vAlign) - layout.attributes[kLayoutVAlign] = nil for i, row in ipairs(layout.rows.content) do From 2b3d6fc22dc574a2b54f30256672fb210b435444 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Tue, 3 Mar 2026 18:10:49 +0100 Subject: [PATCH 10/11] Fix layout-valign tests to match positional argument in minipage Convert snapshot tests (8354, 9109) to ensureLatexFileRegexMatches and update 7262 regex to expect [b] position. Add center alignment test coverage. --- tests/docs/smoke-all/2023/11/02/7262.qmd | 6 +- tests/docs/smoke-all/2024/01/19/8354.qmd | 10 +- .../smoke-all/2024/01/19/8354.tex.snapshot | 278 ------------------ .../docs/smoke-all/2025/11/08/9109-center.qmd | 30 ++ tests/docs/smoke-all/2025/11/08/9109.qmd | 10 +- .../smoke-all/2025/11/08/9109.tex.snapshot | 277 ----------------- 6 files changed, 47 insertions(+), 564 deletions(-) delete mode 100644 tests/docs/smoke-all/2024/01/19/8354.tex.snapshot create mode 100644 tests/docs/smoke-all/2025/11/08/9109-center.qmd delete mode 100644 tests/docs/smoke-all/2025/11/08/9109.tex.snapshot diff --git a/tests/docs/smoke-all/2023/11/02/7262.qmd b/tests/docs/smoke-all/2023/11/02/7262.qmd index 841c575a53d..a274632cf2e 100644 --- a/tests/docs/smoke-all/2023/11/02/7262.qmd +++ b/tests/docs/smoke-all/2023/11/02/7262.qmd @@ -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 diff --git a/tests/docs/smoke-all/2024/01/19/8354.qmd b/tests/docs/smoke-all/2024/01/19/8354.qmd index d2c4e1ca252..90d3925a9e3 100644 --- a/tests/docs/smoke-all/2024/01/19/8354.qmd +++ b/tests/docs/smoke-all/2024/01/19/8354.qmd @@ -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} diff --git a/tests/docs/smoke-all/2024/01/19/8354.tex.snapshot b/tests/docs/smoke-all/2024/01/19/8354.tex.snapshot deleted file mode 100644 index 697505df4c7..00000000000 --- a/tests/docs/smoke-all/2024/01/19/8354.tex.snapshot +++ /dev/null @@ -1,278 +0,0 @@ -% Options for packages loaded elsewhere -% Options for packages loaded elsewhere -\PassOptionsToPackage{unicode}{hyperref} -\PassOptionsToPackage{hyphens}{url} -\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} -% -\documentclass[ - letterpaper, - DIV=11, - numbers=noendperiod]{scrartcl} -\usepackage{xcolor} -\usepackage{amsmath,amssymb} -\setcounter{secnumdepth}{-\maxdimen} % remove section numbering -\usepackage{iftex} -\ifPDFTeX - \usepackage[T1]{fontenc} - \usepackage[utf8]{inputenc} - \usepackage{textcomp} % provide euro and other symbols -\else % if luatex or xetex - \usepackage{unicode-math} % this also loads fontspec - \defaultfontfeatures{Scale=MatchLowercase} - \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} -\fi -\usepackage{lmodern} -\ifPDFTeX\else - % xetex/luatex font selection -\fi -% Use upquote if available, for straight quotes in verbatim environments -\IfFileExists{upquote.sty}{\usepackage{upquote}}{} -\IfFileExists{microtype.sty}{% use microtype if available - \usepackage[]{microtype} - \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts -}{} -\makeatletter -\@ifundefined{KOMAClassName}{% if non-KOMA class - \IfFileExists{parskip.sty}{% - \usepackage{parskip} - }{% else - \setlength{\parindent}{0pt} - \setlength{\parskip}{6pt plus 2pt minus 1pt}} -}{% if KOMA class - \KOMAoptions{parskip=half}} -\makeatother -% Make \paragraph and \subparagraph free-standing -\makeatletter -\ifx\paragraph\undefined\else - \let\oldparagraph\paragraph - \renewcommand{\paragraph}{ - \@ifstar - \xxxParagraphStar - \xxxParagraphNoStar - } - \newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}} - \newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}} -\fi -\ifx\subparagraph\undefined\else - \let\oldsubparagraph\subparagraph - \renewcommand{\subparagraph}{ - \@ifstar - \xxxSubParagraphStar - \xxxSubParagraphNoStar - } - \newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}} - \newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}} -\fi -\makeatother - -\usepackage{color} -\usepackage{fancyvrb} -\newcommand{\VerbBar}{|} -\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} -\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} -% Add ',fontsize=\small' for more characters per line -\usepackage{framed} -\definecolor{shadecolor}{RGB}{241,243,245} -\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}} -\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.40,0.45,0.13}{#1}} -\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\CharTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} -\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} -\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}} -\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}} -\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} -\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.28,0.35,0.67}{#1}} -\newcommand{\ImportTok}[1]{\textcolor[rgb]{0.00,0.46,0.62}{#1}} -\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}} -\newcommand{\NormalTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} -\newcommand{\StringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} -\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.07,0.07,0.07}{#1}} -\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} -\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} - -\usepackage{longtable,booktabs,array} -\newcounter{none} % for unnumbered tables -\usepackage{calc} % for calculating minipage widths -% Correct order of tables after \paragraph or \subparagraph -\usepackage{etoolbox} -\makeatletter -\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} -\makeatother -% Allow footnotes in longtable head/foot -\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} -\makesavenoteenv{longtable} -\usepackage{graphicx} -\makeatletter -\newsavebox\pandoc@box -\newcommand*\pandocbounded[1]{% scales image to fit in text height/width - \sbox\pandoc@box{#1}% - \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}% - \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}% - \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both - \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}% - \else\usebox{\pandoc@box}% - \fi% -} -% Set default figure placement to htbp -\def\fps@figure{htbp} -\makeatother - - - - - -\setlength{\emergencystretch}{3em} % prevent overfull lines - -\providecommand{\tightlist}{% - \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} - - - - - - -\KOMAoption{captions}{tableheading} -\makeatletter -\@ifpackageloaded{caption}{}{\usepackage{caption}} -\AtBeginDocument{% -\ifdefined\contentsname - \renewcommand*\contentsname{Table of contents} -\else - \newcommand\contentsname{Table of contents} -\fi -\ifdefined\listfigurename - \renewcommand*\listfigurename{List of Figures} -\else - \newcommand\listfigurename{List of Figures} -\fi -\ifdefined\listtablename - \renewcommand*\listtablename{List of Tables} -\else - \newcommand\listtablename{List of Tables} -\fi -\ifdefined\figurename - \renewcommand*\figurename{Figure} -\else - \newcommand\figurename{Figure} -\fi -\ifdefined\tablename - \renewcommand*\tablename{Table} -\else - \newcommand\tablename{Table} -\fi -} -\@ifpackageloaded{float}{}{\usepackage{float}} -\floatstyle{ruled} -\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]} -\floatname{codelisting}{Listing} -\newcommand*\listoflistings{\listof{codelisting}{List of Listings}} -\makeatother -\makeatletter -\makeatother -\makeatletter -\@ifpackageloaded{caption}{}{\usepackage{caption}} -\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}} -\makeatother -\usepackage{bookmark} -\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available -\urlstyle{same} -\hypersetup{ - pdftitle={Untitled}, - colorlinks=true, - linkcolor={blue}, - filecolor={Maroon}, - citecolor={Blue}, - urlcolor={Blue}, - pdfcreator={LaTeX via pandoc}} - - -\title{Untitled} -\author{} -\date{} -\begin{document} -\maketitle - - -\begin{Shaded} -\begin{Highlighting}[] -\FunctionTok{library}\NormalTok{(knitr)} -\FunctionTok{kable}\NormalTok{(}\FunctionTok{head}\NormalTok{(cars))} -\FunctionTok{kable}\NormalTok{(}\FunctionTok{head}\NormalTok{(pressure))} -\end{Highlighting} -\end{Shaded} - -\begin{table} - -\caption{\label{tbl-tables}Tables} - -\begin{minipage}[t]{0.50\linewidth} - -\subcaption{\label{tbl-tables-1}cars} - -\centering{ - -\begin{tabular}{rr} -\toprule -speed & dist\\ -\midrule -4 & 2\\ -4 & 10\\ -7 & 4\\ -7 & 22\\ -8 & 16\\ -9 & 10\\ -\bottomrule -\end{tabular} - -} - -\end{minipage}% -% -\begin{minipage}[t]{0.50\linewidth} - -\subcaption{\label{tbl-tables-2}pressure} - -\centering{ - -\begin{tabular}{rr} -\toprule -temperature & pressure\\ -\midrule -0 & 0.0002\\ -20 & 0.0012\\ -40 & 0.0060\\ -60 & 0.0300\\ -80 & 0.0900\\ -100 & 0.2700\\ -\bottomrule -\end{tabular} - -} - -\end{minipage}% - -\end{table}% - -See Table~\ref{tbl-tables} for examples. In particular, -Table~\ref{tbl-tables-2}. - - - - -\end{document} diff --git a/tests/docs/smoke-all/2025/11/08/9109-center.qmd b/tests/docs/smoke-all/2025/11/08/9109-center.qmd new file mode 100644 index 00000000000..189c3a9689b --- /dev/null +++ b/tests/docs/smoke-all/2025/11/08/9109-center.qmd @@ -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. diff --git a/tests/docs/smoke-all/2025/11/08/9109.qmd b/tests/docs/smoke-all/2025/11/08/9109.qmd index 0c3dbdc63db..ecdc43d249f 100644 --- a/tests/docs/smoke-all/2025/11/08/9109.qmd +++ b/tests/docs/smoke-all/2025/11/08/9109.qmd @@ -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\}\[b\]\{0\.50\\linewidth\}'] + - [] --- ```{r} diff --git a/tests/docs/smoke-all/2025/11/08/9109.tex.snapshot b/tests/docs/smoke-all/2025/11/08/9109.tex.snapshot deleted file mode 100644 index 5e8ffedf59e..00000000000 --- a/tests/docs/smoke-all/2025/11/08/9109.tex.snapshot +++ /dev/null @@ -1,277 +0,0 @@ -% Options for packages loaded elsewhere -% Options for packages loaded elsewhere -\PassOptionsToPackage{unicode}{hyperref} -\PassOptionsToPackage{hyphens}{url} -\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} -% -\documentclass[ - letterpaper, - DIV=11, - numbers=noendperiod]{scrartcl} -\usepackage{xcolor} -\usepackage{amsmath,amssymb} -\setcounter{secnumdepth}{-\maxdimen} % remove section numbering -\usepackage{iftex} -\ifPDFTeX - \usepackage[T1]{fontenc} - \usepackage[utf8]{inputenc} - \usepackage{textcomp} % provide euro and other symbols -\else % if luatex or xetex - \usepackage{unicode-math} % this also loads fontspec - \defaultfontfeatures{Scale=MatchLowercase} - \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} -\fi -\usepackage{lmodern} -\ifPDFTeX\else - % xetex/luatex font selection -\fi -% Use upquote if available, for straight quotes in verbatim environments -\IfFileExists{upquote.sty}{\usepackage{upquote}}{} -\IfFileExists{microtype.sty}{% use microtype if available - \usepackage[]{microtype} - \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts -}{} -\makeatletter -\@ifundefined{KOMAClassName}{% if non-KOMA class - \IfFileExists{parskip.sty}{% - \usepackage{parskip} - }{% else - \setlength{\parindent}{0pt} - \setlength{\parskip}{6pt plus 2pt minus 1pt}} -}{% if KOMA class - \KOMAoptions{parskip=half}} -\makeatother -% Make \paragraph and \subparagraph free-standing -\makeatletter -\ifx\paragraph\undefined\else - \let\oldparagraph\paragraph - \renewcommand{\paragraph}{ - \@ifstar - \xxxParagraphStar - \xxxParagraphNoStar - } - \newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}} - \newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}} -\fi -\ifx\subparagraph\undefined\else - \let\oldsubparagraph\subparagraph - \renewcommand{\subparagraph}{ - \@ifstar - \xxxSubParagraphStar - \xxxSubParagraphNoStar - } - \newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}} - \newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}} -\fi -\makeatother - -\usepackage{color} -\usepackage{fancyvrb} -\newcommand{\VerbBar}{|} -\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} -\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} -% Add ',fontsize=\small' for more characters per line -\usepackage{framed} -\definecolor{shadecolor}{RGB}{241,243,245} -\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}} -\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.40,0.45,0.13}{#1}} -\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\CharTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} -\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} -\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}} -\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}} -\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} -\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.28,0.35,0.67}{#1}} -\newcommand{\ImportTok}[1]{\textcolor[rgb]{0.00,0.46,0.62}{#1}} -\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}} -\newcommand{\NormalTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} -\newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} -\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} -\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} -\newcommand{\StringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} -\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.07,0.07,0.07}{#1}} -\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} -\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} - -\usepackage{longtable,booktabs,array} -\usepackage{calc} % for calculating minipage widths -% Correct order of tables after \paragraph or \subparagraph -\usepackage{etoolbox} -\makeatletter -\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} -\makeatother -% Allow footnotes in longtable head/foot -\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} -\makesavenoteenv{longtable} -\usepackage{graphicx} -\makeatletter -\newsavebox\pandoc@box -\newcommand*\pandocbounded[1]{% scales image to fit in text height/width - \sbox\pandoc@box{#1}% - \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}% - \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}% - \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both - \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}% - \else\usebox{\pandoc@box}% - \fi% -} -% Set default figure placement to htbp -\def\fps@figure{htbp} -\makeatother - - - - - -\setlength{\emergencystretch}{3em} % prevent overfull lines - -\providecommand{\tightlist}{% - \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} - - - - - - -\KOMAoption{captions}{tableheading} -\makeatletter -\@ifpackageloaded{caption}{}{\usepackage{caption}} -\AtBeginDocument{% -\ifdefined\contentsname - \renewcommand*\contentsname{Table of contents} -\else - \newcommand\contentsname{Table of contents} -\fi -\ifdefined\listfigurename - \renewcommand*\listfigurename{List of Figures} -\else - \newcommand\listfigurename{List of Figures} -\fi -\ifdefined\listtablename - \renewcommand*\listtablename{List of Tables} -\else - \newcommand\listtablename{List of Tables} -\fi -\ifdefined\figurename - \renewcommand*\figurename{Figure} -\else - \newcommand\figurename{Figure} -\fi -\ifdefined\tablename - \renewcommand*\tablename{Table} -\else - \newcommand\tablename{Table} -\fi -} -\@ifpackageloaded{float}{}{\usepackage{float}} -\floatstyle{ruled} -\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]} -\floatname{codelisting}{Listing} -\newcommand*\listoflistings{\listof{codelisting}{List of Listings}} -\makeatother -\makeatletter -\makeatother -\makeatletter -\@ifpackageloaded{caption}{}{\usepackage{caption}} -\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}} -\makeatother -\usepackage{bookmark} -\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available -\urlstyle{same} -\hypersetup{ - pdftitle={Untitled}, - colorlinks=true, - linkcolor={blue}, - filecolor={Maroon}, - citecolor={Blue}, - urlcolor={Blue}, - pdfcreator={LaTeX via pandoc}} - - -\title{Untitled} -\author{} -\date{} -\begin{document} -\maketitle - - -\begin{Shaded} -\begin{Highlighting}[] -\FunctionTok{library}\NormalTok{(knitr)} -\FunctionTok{kable}\NormalTok{(}\FunctionTok{head}\NormalTok{(cars))} -\FunctionTok{kable}\NormalTok{(}\FunctionTok{head}\NormalTok{(pressure))} -\end{Highlighting} -\end{Shaded} - -\begin{table} - -\caption{\label{tbl-tables}Tables} - -\begin{minipage}[b]{0.50\linewidth} - -\subcaption{\label{tbl-tables-1}cars} - -\centering{ - -\begin{tabular}{rr} -\toprule -speed & dist\\ -\midrule -4 & 2\\ -4 & 10\\ -7 & 4\\ -7 & 22\\ -8 & 16\\ -9 & 10\\ -\bottomrule -\end{tabular} - -} - -\end{minipage}% -% -\begin{minipage}[b]{0.50\linewidth} - -\subcaption{\label{tbl-tables-2}pressure} - -\centering{ - -\begin{tabular}{rr} -\toprule -temperature & pressure\\ -\midrule -0 & 0.0002\\ -20 & 0.0012\\ -40 & 0.0060\\ -60 & 0.0300\\ -80 & 0.0900\\ -100 & 0.2700\\ -\bottomrule -\end{tabular} - -} - -\end{minipage}% - -\end{table}% - -See Table~\ref{tbl-tables} for examples. In particular, -Table~\ref{tbl-tables-2}. - - - - -\end{document} From d84d5ceff4c82b583c4f2874f86d0fa7baa91946 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Tue, 3 Mar 2026 18:35:19 +0100 Subject: [PATCH 11/11] Add test for layout-valign with plain markdown content Covers the exact scenario from #9109: div syntax with layout-valign on plain text, no code execution needed. --- .../smoke-all/2025/11/08/9109-markdown.qmd | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/docs/smoke-all/2025/11/08/9109-markdown.qmd diff --git a/tests/docs/smoke-all/2025/11/08/9109-markdown.qmd b/tests/docs/smoke-all/2025/11/08/9109-markdown.qmd new file mode 100644 index 00000000000..29c24ee5ce2 --- /dev/null +++ b/tests/docs/smoke-all/2025/11/08/9109-markdown.qmd @@ -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 + +:::