ismayc / thesisdown

An updated R Markdown thesis template using the bookdown package
Other
809 stars 357 forks source link

Landscape pages #196

Closed raphenya closed 1 year ago

raphenya commented 1 year ago

When putting the page to landscape to accommodate figures, the header and page numbers don't rotate, i.e., they stay on the right and left sides.

My code is as follows:


# index.Rmd
header-includes:
  - \usepackage{pdflscape}
  - \newcommand{\blandscape}{\begin{landscape}}
  - \newcommand{\elandscape}{\end{landscape}}

# 02-chap2.Rmd
\newpage
\blandscape

<!-- Figure 2 -->

(ref:figure2-cap) Some caption text.

'''{r figure2, echo=FALSE, fig.align = 'left', out.width = "100%", fig.cap = "(ref:figure2-cap)"}
knitr::include_graphics(here::here("figure", "figure2.pdf"))
'''

\elandscape
\newpage

I tried to remove the headers and numbers with \thispagestyle{empty} command and then re-add them back, but it's not working. I'm a newbie to Rmarkdown.

raphenya commented 1 year ago

I'm using the template from https://github.com/paezha/macdown.

raphenya commented 1 year ago

@paezha please note.

raphenya commented 1 year ago

Never mind, this is actually correct.

github-actions[bot] commented 1 year ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org whenever possible) and link to this issue. If a reprex is not applicable, recording a short Loom video showing what you are seeing can go a long way in helping to diagnose problems.