pagedown icon indicating copy to clipboard operation
pagedown copied to clipboard

Issue "Multipages tables not supported" does not seem to be solved?

Open JosephBARBIERDARNAL opened this issue 2 months ago • 4 comments

Hi!

While checking #162 , it seems like the issue is not resolved (using latest pagedown 0.23.1) yet.

Using the same code snippet as in the original issue:

---
title: "Test"
output: 
  pagedown::html_paged
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)

library(tidyverse)
library(gt)
```

```{r}
iris %>%
    filter(Species == "setosa") %>%
    select(Species, Sepal.Length) %>%
    head(10) %>%
    gt()

iris %>%
    filter(Species == "setosa") %>%
    select(Species, Sepal.Length) %>%
    head(20) %>%
    gt()

iris %>%
    filter(Species == "setosa") %>%
    head(20) %>%
    gt()
```

(screenshot from Chrome)

Image

The thing is, I can find the additional Handler in the output file. I tried adding it as an external script, but it does not seem to fix the issue.

Did I miss something here?

JosephBARBIERDARNAL avatar Oct 23 '25 14:10 JosephBARBIERDARNAL

#162 was about simple Markdown tables generated from knitr::kable(). I'm not sure if the fix there would apply to gt tables, which are much much more complicated.

yihui avatar Oct 23 '25 17:10 yihui

Ok thanks. So just to be clear, it's not completely unexpected that a gt table is not perfectly displayed?

JosephBARBIERDARNAL avatar Nov 17 '25 13:11 JosephBARBIERDARNAL

Correct.

An alternative approach is litedown. I have done my own implementation of HTML fragmentation last year (i.e., pages.js), and here is a minimal example:

---
title: "Test"
output:
  html:
    meta:
      css: ["@default", "@pages"]
      js: ["@pages"]
knit: litedown:::knit
---

```{r}
library(dplyr)
options(xfun.md_table.limit = Inf)
```

```{r}
iris %>%
    filter(Species == "setosa") %>%
    select(Species, Sepal.Length) %>%
    head(10)

iris %>%
    filter(Species == "setosa") %>%
    select(Species, Sepal.Length) %>%
    head(20)

iris %>%
    filter(Species == "setosa") %>%
    head(20)
```

The HTML output can be printed to PDF via web browsers: Test.pdf

yihui avatar Nov 18 '25 03:11 yihui

Ok thanks! I've seen litedown before, so I'll keep that option in mind :) Thanks again.

JosephBARBIERDARNAL avatar Nov 19 '25 13:11 JosephBARBIERDARNAL