beamerquartotikz

center tikz figure in beamer generated by quarto


I have a quarto document that I'm compiling as a beamer that contains a tikz picture.

---
format: 
  beamer:
    keep-tex: true
    theme: Antibes
---

## my picture

```{tikz}
#| echo: false

\begin{tikzpicture}
  ...
\end{tikzpicture}
```

for some reason, I can't get the figure to be vertically align on the beamer slide. I tried the fig-align attribute in the document properties and well as the \centering statement in the tikz chunk, but nothing seems to have the desired effect.


Solution

  • Finally, adding the fig.align attribute to the tikz chunk had the desired effect.

    ```{tikz}
    #| echo: false
    #| fig.align: center
    
    \begin{tikzpicture}
      ...
    \end{tikzpicture}
    ```