quarto-dev / quarto-dev/quarto-cli

Customize the `out-width` in multi-plot layouts on PDF output.

Open
#7,074 2 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

bug crossref latex
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

This is related to #2417.

Changing the out-width in a multi-plot layout is ignored for pdf output.

---
title: "Customize out-width in multi-plot layouts"
format: 
  pdf:
    keep-tex: true
---

::: {#fig-elephants layout-ncol="2" width="49%"}
![Surus](https://github.com/quarto-dev/quarto-web/blob/main/docs/authoring/_figure-examples/surus.png?raw=true){#fig-surus}

![Hanno](https://github.com/quarto-dev/quarto-web/blob/main/docs/authoring/_figure-examples/hanno.png?raw=true){#fig-hanno}

Famous Elephants
:::

::: {#fig-elephants-1 layout-ncol="2"}
![Surus](https://github.com/quarto-dev/quarto-web/blob/main/docs/authoring/_figure-examples/surus.png?raw=true){#fig-surus-1 width="97.5%"}

![Hanno](https://github.com/quarto-dev/quarto-web/blob/main/docs/authoring/_figure-examples/hanno.png?raw=true){#fig-hanno-2 width="97.5%"}

Famous Elephants 1
:::

Custom widths are completely ignored on pdf output.

Generated tex

\begin{figure}

\begin{minipage}[t]{0.50\linewidth}

{\centering 

\raisebox{-\height}{

\includegraphics{out-width_files/mediabag/surus.png}

}

}

\subcaption{\label{fig-surus}Surus}
\end{minipage}%
%
\begin{minipage}[t]{0.50\linewidth}

{\centering 

\raisebox{-\height}{

\includegraphics{out-width_files/mediabag/hanno.png}

}

}

\subcaption{\label{fig-hanno}Hanno}
\end{minipage}%

\caption{\label{fig-elephants}Famous Elephants}

\end{figure}

\begin{figure}

\begin{minipage}[t]{0.50\linewidth}

{\centering 

\raisebox{-\height}{

\includegraphics{out-width_files/mediabag/surus.png}

}

}

\subcaption{\label{fig-surus-1}Surus}
\end{minipage}%
%
\begin{minipage}[t]{0.50\linewidth}

{\centering 

\raisebox{-\height}{

\includegraphics{out-width_files/mediabag/hanno.png}

}

}

\subcaption{\label{fig-hanno-2}Hanno}
\end{minipage}%

\caption{\label{fig-elephants-1}Famous Elephants 1}

\end{figure}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.