1

I included a figure (.png) in my Quarto Document.

As the figure is so big and rich in information I want to rotate it to a landscape format for improving readability.

I only find solutions for revealjs that do not work with an article format (see e.g., this thread: Rotate Images in Quarto)

Any suggestions?

Julian
  • 6,586
  • 2
  • 9
  • 33
kwalz
  • 21
  • 2

1 Answers1

1

Does this help (see here for more alternatives)?

---
title: "Test Landscape"
format: 
  pdf:
    number-sections: true
    include-in-header:
          - text: |
             \usepackage{lscape}
             \newcommand{\blandscape}{\begin{landscape}}
             \newcommand{\elandscape}{\end{landscape}}
---


# normal
```{r}
hist(mtcars$mpg)
```


\blandscape
# Landscape {#sec-landscape}
```{r}
#| fig-cap: A Caption
#| label: fig-hist
hist(mtcars$mpg)
```
\elandscape

Let's try out crossreference.

We can see in section @sec-landscape that the histogram @fig-hist is turned around.

enter image description here

Julian
  • 6,586
  • 2
  • 9
  • 33
  • Thank you very much, it works (almost) perfectly! Now, I have the problem that my figure title and reference is not longer displayed and therefore my cross-reference also does not work anymore. Do you also have an idea about that? – kwalz Jul 18 '23 at 09:24
  • I made an edit, maybe it hints you how you can solve it for your diss. – Julian Jul 18 '23 at 09:45