Skip to content

Block within figure error in latex beamer #12775

@ihrke

Description

@ihrke

Bug description

When I nest a block in a layout block and render to latex beamer, Quarto produces an erroneous .tex file.

Steps to reproduce

Minimal working example:

---
title: "title"
date: last-modified
format: beamer
---

## slide

::::::{layout="[48, 48]"}
:::{#first-column}
hallo
:::
:::{#second-column}
### a block title
du
:::
::::::

Actual behavior

Produces this latex code:

\begin{frame}{slide}
\phantomsection\label{slide}
\begin{figure}

\begin{minipage}{0.50\linewidth}
hallo\end{minipage}%
%
\begin{minipage}{0.50\linewidth}

\begin{block}{a block title}
\phantomsection\label{a-block-title}
du\end{minipage}%

\end{figure}%
\end{block}
\end{frame}

Note, that the \end{block} ends after the \end{figure} and the \end{minipage}. It should actually be closed before the \end{minipage}.

Expected behavior

I would expect this latex code:

\begin{frame}{slide}
\phantomsection\label{slide}
\begin{figure}

\begin{minipage}{0.50\linewidth}
hallo\end{minipage}%
%
\begin{minipage}{0.50\linewidth}

\begin{block}{a block title}
\phantomsection\label{a-block-title}
du
\end{block}

\end{minipage}%

\end{figure}%

\end{frame}

Your environment

No response

Metadata

Metadata

Assignees

Labels

beamerbugSomething isn't workinglatexLaTeX engines related libraries and technologies

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions