Reputation: 1
I'm having some issues with the pagebreak command in a .qmd domument in R Markdown. I'm rendering the document as a pdf (it's my thesis). The pagebreak command after an r chunk I use to make a table with kableExtra is not rendering as a pagebreak, but the pagebreak before the code chunk works just fine.
Any insight would be greatly appreciated!
Here's my code chunk and the surrounding sentences:
...to clarify the data were not met with a response.
{{< pagebreak >}}
{r Border communications table}
#| label: tbl-2
#| tbl-cap: "Data collection from border stakeholders"
border_comms_1 <- read.csv("C:/Users/zsigm/Documents/thesis_draft_files/border_comms_1.csv")
colnames(border_comms_1)[1] <- ""
colnames(border_comms_1)[colnames(border_comms_1) == "Region...if.not.specified."] <- "Region (if not specified)"
colnames(border_comms_1)[colnames(border_comms_1) == "Years.provided"] <- "Years Provided"
colnames(border_comms_1)[colnames(border_comms_1) == "Contact.made...Y.N."] <- "Contact made? (Y/N)"
border_comms_1 %>%
kable(booktabs = T, format = "latex", escape = F, col.names = linebreak(c("", "Region\n(if not specified)", "Contact made?\n(Y/N)", "Years\nProvided"))) %>%
kable_styling(latex_options = "striped") %>%
kable_styling(latex_options = "scale_down") %>%
row_spec(0, bold = T) %>%
pack_rows("California", 1, 2, latex_gap_space = "0.3cm") %>%
pack_rows("Arizona", 3, 4, hline_before = T, latex_gap_space = "0.3cm") %>%
pack_rows("Texas", 5, 18, hline_before = T, latex_gap_space = "0.3cm") %>%
pack_rows("Multiple states", 19, 21, hline_before = T, latex_gap_space = "0.3cm") %>%
column_spec(1, width = "7cm") %>%
column_spec(2, width = "5cm") %>%
column_spec(3, width = "5cm") %>%
add_footnote(c("data were unusable"), notation = ("symbol"), threeparttable = F)
{{< pagebreak >}}
Missing Migrants Project Data
As there is no centralized reporting mechanism for migrant deaths in the United States...
And here's the YAML:
---
title: "The True Number of Migrant Deaths on the United States-Mexico Border, 2014-2017: A Multiple Systems Estimations Approach"
toc: true
date: "June 2024"
date-format: "MMMM YYYY"
format: pdf
author:
- name: Zoe Sigman
affiliations:
- name: Hertie School
template-partials:
- before-body.tex
- after-body.tex
editor: visual
execute:
echo: false
warning: false
bibliography: thesis_references.bib
csl: apa-6th-edition.csl
appendix-style: default
interlinespace: double
papersize: a4
indent: true
linestretch: 1.5
fontsize: 12pt
---
Upvotes: 0
Views: 34