New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docusaurus] Table having many columns output from knitr with df-print: kable
seems broken (Quarto 1.4)
#8332
Comments
df-print: kable
seems broken (Quarto 1.4)
df-print: kable
seems broken (Quarto 1.4)df-print: kable
seems broken (Quarto 1.4)
df-print: kable
seems broken (Quarto 1.4)df-print: kable
seems broken (Quarto 1.4)
df-print: kable
seems broken (Quarto 1.4)df-print: kable
seems broken (Quarto 1.4)
df-print: kable
seems broken (Quarto 1.4)df-print: kable
seems broken (Quarto 1.4)
What do you mean by broken exactly ? Does pipe table syntax matters in the docusaurus rendering ? Do you see some impact ? They both have pipe table just formatted a bit differently comparing spaces in number of In short: The change from before to after conversion is the result of converting to More detailed about this conclusion below The intermediate Markdown is like this ---
title: foo
format:
docusaurus-md:
df-print: kable
keep-md: true
---
::: {.cell}
```{.r .cell-code}
1:100 |>
as.character() |>
t() |>
as.data.frame()
```
::: {.cell-output-display}
<div class="kable-table">
|V1 |V2 |V3 |V4 |V5 |V6 |V7 |V8 |V9 |V10 |V11 |V12 |V13 |V14 |V15 |V16 |V17 |V18 |V19 |V20 |V21 |V22 |V23 |V24 |V25 |V26 |V27 |V28 |V29 |V30 |V31 |V32 |V33 |V34 |V35 |V36 |V37 |V38 |V39 |V40 |V41 |V42 |V43 |V44 |V45 |V46 |V47 |V48 |V49 |V50 |V51 |V52 |V53 |V54 |V55 |V56 |V57 |V58 |V59 |V60 |V61 |V62 |V63 |V64 |V65 |V66 |V67 |V68 |V69 |V70 |V71 |V72 |V73 |V74 |V75 |V76 |V77 |V78 |V79 |V80 |V81 |V82 |V83 |V84 |V85 |V86 |V87 |V88 |V89 |V90 |V91 |V92 |V93 |V94 |V95 |V96 |V97 |V98 |V99 |V100 |
|:--|:--|:--|:--|:--|:--|:--|:--|:--|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:----|
|1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |40 |41 |42 |43 |44 |45 |46 |47 |48 |49 |50 |51 |52 |53 |54 |55 |56 |57 |58 |59 |60 |61 |62 |63 |64 |65 |66 |67 |68 |69 |70 |71 |72 |73 |74 |75 |76 |77 |78 |79 |80 |81 |82 |83 |84 |85 |86 |87 |88 |89 |90 |91 |92 |93 |94 |95 |96 |97 |98 |99 |100 |
</div>
:::
::: So ---
title: foo
format: docusaurus-md
keep-md: true
---
|V1 |V2 |V3 |V4 |V5 |V6 |V7 |V8 |V9 |V10 |
|:--|:--|:--|:--|:--|:--|:--|:--|:--|:---|
|1 |2 |3 |4 |5 |6 |7 |8 |9 |10 | The mdx output table will be slightly different ---
title: foo
format: docusaurus-md
keep-md: true
---
| V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | V10 |
|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
And this is the result of Pandoc conversion. For docusaurus, as it is not a support Pandoc format, we write to And the result is the same with Pandoc directly > quarto pandoc -t markdown_strict+pipe_tables
|V1 |V2 |V3 |V4 |V5 |V6 |V7 |V8 |V9 |V10 |
|:--|:--|:--|:--|:--|:--|:--|:--|:--|:---|
|1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |
| V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | V10 |
|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | And same with the very long table produced by kable> quarto pandoc -t markdown_strict+pipe_tables
|V1 |V2 |V3 |V4 |V5 |V6 |V7 |V8 |V9 |V10 |V11 |V12 |V13 |V14 |V15 |V16 |V17 |V18 |V19 |V20 |V21 |V22 |V23 |V24 |V25 |V26 |V27 |V28 |V29 |V30 |V31 |V32 |V33 |V34 |V35 |V36 |V37 |V38 |V39 |V40 |V41 |V42 |V43 |V44 |V45 |V46 |V47 |V48 |V49 |V50 |V51 |V52 |V53 |V54 |V55 |V56 |V57 |V58 |V59 |V60 |V61 |V62 |V63 |V64 |V65 |V66 |V67 |V68 |V69 |V70 |V71 |V72 |V73 |V74 |V75 |V76 |V77 |V78 |V79 |V80 |V81 |V82 |V83 |V84 |V85 |V86 |V87 |V88 |V89 |V90 |V91 |V92 |V93 |V94 |V95 |V96 |V97 |V98 |V99 |V100 |
|:--|:--|:--|:--|:--|:--|:--|:--|:--|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:----|
|1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |40 |41 |42 |43 |44 |45 |46 |47 |48 |49 |50 |51 |52 |53 |54 |55 |56 |57 |58 |59 |60 |61 |62 |63 |64 |65 |66 |67 |68 |69 |70 |71 |72 |73 |74 |75 |76 |77 |78 |79 |80 |81 |82 |83 |84 |85 |86 |87 |88 |89 |90 |91 |92 |93 |94 |95 |96 |97 |98 |99 |100 |
| V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | V10 | V11 | V12 | V13 | V14 | V15 | V16 | V17 | V18 | V19 | V20 | V21 | V22 | V23 | V24 | V25 | V26 | V27 | V28 | V29 | V30 | V31 | V32 | V33 | V34 | V35 | V36 | V37 | V38 | V39 | V40 | V41 | V42 | V43 | V44 | V45 | V46 | V47 | V48 | V49 | V50 | V51 | V52 | V53 | V54 | V55 | V56 | V57 | V58 | V59 | V60 | V61 | V62 | V63 | V64 | V65 | V66 | V67 | V68 | V69 | V70 | V71 | V72 | V73 | V74 | V75 | V76 | V77 | V78 | V79 | V80 | V81 | V82 | V83 | V84 | V85 | V86 | V87 | V88 | V89 | V90 | V91 | V92 | V93 | V94 | V95 | V96 | V97 | V98 | V99 | V100 |
|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | So this is pandoc behavior. |
Why would the pipe table be transformed here in the first place? This seems very wrong from Pandoc to remove all dash because what does |
Yes agreed an issue could be opened on Pandoc side - I did not found the pipe table spec, but even with colon only, some online markdown table processor knows how to handle it. FWIW the limit is with the example shared in OP is 72 columns |V1 |V2 |V3 |V4 |V5 |V6 |V7 |V8 |V9 |V10 |V11 |V12 |V13 |V14 |V15 |V16 |V17 |V18 |V19 |V20 |V21 |V22 |V23 |V24 |V25 |V26 |V27 |V28 |V29 |V30 |V31 |V32 |V33 |V34 |V35 |V36 |V37 |V38 |V39 |V40 |V41 |V42 |V43 |V44 |V45 |V46 |V47 |V48 |V49 |V50 |V51 |V52 |V53 |V54 |V55 |V56 |V57 |V58 |V59 |V60 |V61 |V62 |V63 |V64 |V65 |V66 |V67 |V68 |V69 |V70 |V71 |V72 |
|:--|:--|:--|:--|:--|:--|:--|:--|:--|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|
|1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |40 |41 |42 |43 |44 |45 |46 |47 |48 |49 |50 |51 |52 |53 |54 |55 |56 |57 |58 |59 |60 |61 |62 |63 |64 |65 |66 |67 |68 |69 |70 |71 |72 | | V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | V10 | V11 | V12 | V13 | V14 | V15 | V16 | V17 | V18 | V19 | V20 | V21 | V22 | V23 | V24 | V25 | V26 | V27 | V28 | V29 | V30 | V31 | V32 | V33 | V34 | V35 | V36 | V37 | V38 | V39 | V40 | V41 | V42 | V43 | V44 | V45 | V46 | V47 | V48 | V49 | V50 | V51 | V52 | V53 | V54 | V55 | V56 | V57 | V58 | V59 | V60 | V61 | V62 | V63 | V64 | V65 | V66 | V67 | V68 | V69 | V70 | V71 | V72 |
|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | It will produce a table that even Pandoc won't process. If you put the first one in pandoc -f markdown -t markdown_strict+pipe_tables test.md | pandoc -t native | head -10
[ LineBlock
[ [ Str "V1"
, Space
, Str "|"
, Space
, Str "V2"
, Space
, Str "|"
, Space
, Str "V3" So definitely a problem somewhere in the processing |
So it was indeed a bug in pandoc with how the number of It seems a workaround is to set the Thanks again for the port. I'll mark this as future until we close when we update Pandoc. Pandoc version that have the fix: next one > 3.1.11.1 |
It would be great to see the fix on the pandoc side. Thanks! |
I tried Is there something wrong with the way I specify pandoc options? |
I suspect we are not passing the CLI flag that impacts the writer options to the custom docusaurus writers... |
@eitsupi we merge the PR that has the scoped fix to support setting columns in YAML or through command line. |
Confirmed, thanks! |
Perhaps the Pandoc version has been updated so you can close this? (I would recommend adding a test to prevent regression) |
Indeed thanks. I'll add a test |
Bug description
Sorry for rewriting it so many times, I haven't been able to understand the exact conditions for this bug, but it looks like at least it happens in the Docusaurus format and not in
knitr::knit
orrmarkdown::render
.Steps to reproduce
Expected behavior
Generated by Quarto 1.4.432
Actual behavior
Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: