-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Labels
duplicatealready another issue about thisalready another issue about this
Description
Hi,
I had an issue when trying to knit a reactable table using chrome_print. For some reason, when I don't include LaTeX code, the reactable table doesn't show up in the PDF, but if I do, then it actually shows up.
Here's a simple reproducible code, if it's useful:
- This is the code that works:
---
title: "Example for reactable"
author: "maibennett"
date: "April 14th, 2021"
output:
pagedown::html_paged:
toc: no
number_sections: no
paged-footnotes: true
knit: pagedown::chrome_print
---
```{r setup, warning=FALSE, message=FALSE, echo=FALSE}
library(tidyverse)
library(reactable)
library(htmltools)
```
$$\text{Including this, works}$$
```{r, echo = FALSE, message=FALSE, warning=FALSE}
data(USArrests)
USArrests_s <- USArrests %>% dplyr::filter(rownames(.)=="Alabama" | rownames(.)=="Alaska")
tbl <- USArrests_s %>%
reactable(
pagination = TRUE,
rownames = FALSE,
defaultColDef = colDef(
align = "center",
minWidth = 90)
)
div(
class = "title",
h3("This is a table"),
tbl
)
```
- This code doesn't show the reactable table:
---
title: "Example for reactable"
author: "maibennett"
date: "April 14th, 2021"
output:
pagedown::html_paged:
toc: no
number_sections: no
paged-footnotes: true
knit: pagedown::chrome_print
---
```{r setup, warning=FALSE, message=FALSE, echo=FALSE}
library(tidyverse)
library(reactable)
library(htmltools)
```
```{r, echo = FALSE, message=FALSE, warning=FALSE}
data(USArrests)
USArrests_s <- USArrests %>% dplyr::filter(rownames(.)=="Alabama" | rownames(.)=="Alaska")
tbl <- USArrests_s %>%
reactable(
pagination = TRUE,
rownames = FALSE,
defaultColDef = colDef(
align = "center",
minWidth = 90)
)
div(
class = "title",
h3("This is a table"),
tbl
)
```
I've included both PDFs outputs. If anyone has an idea of why this might be, I'd really appreciate it! Thanks.
reactable_example2.pdf
reactable_example1.pdf
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
duplicatealready another issue about thisalready another issue about this