Markdown Tables above a certain width seem to break the "tex -> pdf" step with any engine.
Some error message like "that markdown table is gonna end up wider than the page (so eisvogel is just gonna go up in flames)" would be helpful.
Tested with pdflatex and xelatex, pandoc 3.8.3, eisvogel 3.3.0;
Examples
4 vs. 5 Columns (max width 54 characters)
| A / B | P | Cluster | d(A, P) | d(B, P) |
|--------|--------|---------|-----------------------|-----------------------|
| (2, 3) | (1, 5) | A | abs(2-1)+abs(3-5) = 3 | abs(6-1)+abs(3-5) = 7 |
| | (2, 3) | A | 0 | abs(6-2)+abs(3-3) = 4 |
| | (2, 7) | A | abs(2-2)+abs(3-7) = 4 | abs(6-2)+abs(3-7) = 8 |
| | (3, 6) | A | abs(2-3)+abs(3-6) = 4 | abs(6-3)+abs(3-6) = 6 |
| | (5, 1) | B | abs(2-5)+abs(3-1) = 5 | abs(6-5)+abs(3-1) = 3 |
| | (5, 3) | B | abs(2-5)+abs(3-3) = 3 | abs(6-5)+abs(3-3) = 1 |
| | (5, 6) | B | abs(2-5)+abs(3-6) = 6 | abs(6-5)+abs(3-6) = 4 |
| | (6, 2) | B | abs(2-6)+abs(3-2) = 5 | abs(6-6)+abs(3-2) = 1 |
| | (6, 3) | B | abs(2-6)+abs(3-3) = 4 | 0 |
| (6, 3) | (7, 4) | B | abs(2-7)+abs(3-4) = 6 | abs(6-7)+abs(3-4) = 2 |
trying pandoc .\debug_5cols.md -o .\debug_5cols.pdf --template eisvogel directly just breaks:
Error producing PDF.
! Undefined control sequence.
<argument> ...rtpbox {\@nextchar }\insert@pcolumn
\@endpbox \do@row@strut \o...
l.271 ...width - 8\tabcolsep) * \real{0.3239}}@{}}
Relates to #434
If I simply leave out the last column (left side of the image below) it just works with any engine, however with the last column (right side below) vastly different .tex is generated.
pandoc .\debug_4cols.md -o .\debug_4cols.tex --template eisvogel
pandoc .\debug_5cols.md -o .\debug_5cols.tex --template eisvogel
11 vs. 12 (vs. 16) Columns (max width 54/79/105 characters)
Breaks at 16 Columns, breaks with at least 12 columns, works with at most 11 columns.
pandoc .\debug_long.md -o debug_long.pdf --template eisvogel
| | p1 | p2 | p3 | p4 | p5 | p6 | p7 | p8 | p9 | p10 | p11 | p12 | p13 | p14 | p15 |
|-----|------|-----|------|-----|-----|------|-----|------|-----|-----|------|-----|-----|------|------|
| p1 | | 2.8 | 1.6 | 7.2 | 6.0 | 8.1 | 6.8 | 3.0 | 6.3 | 4.6 | 3.8 | 7.9 | 7.3 | 10.1 | 7.9 |
| p2 | 2.8 | | 1.6 | 5.0 | 5.7 | 8.5 | 4.5 | 1.8 | 6.1 | 2.7 | 3.8 | 5.5 | 5.0 | 9.9 | 7.9 |
| p3 | 1.6 | 1.6 | | 6.5 | 6.4 | 8.9 | 6.0 | 1.5 | 6.7 | 4.0 | 2.8 | 7.1 | 6.5 | 10.6 | 8.5 |
| p4 | 7.2 | 5.0 | 6.5 | | 4.3 | 7.1 | 0.7 | 6.7 | 4.7 | 2.5 | 8.7 | 1.1 | 0.5 | 7.2 | 6.0 |
| p5 | 6.0 | 5.7 | 6.4 | 4.3 | | 3.0 | 4.6 | 7.4 | 0.5 | 3.6 | 9.2 | 5.4 | 4.7 | 4.2 | 2.2 |
| p6 | 8.1 | 8.5 | 8.9 | 7.1 | 3.0 | | 7.5 | 10.1 | 2.5 | 6.7 | 11.7 | 8.1 | 7.6 | 2.5 | 1.1 |
| p7 | 6.8 | 4.5 | 6.0 | 0.7 | 4.6 | 7.5 | | 6.1 | 5.1 | 2.2 | 8.1 | 1.1 | 0.5 | 7.8 | 6.5 |
| p8 | 3.0 | 1.8 | 1.5 | 6.7 | 7.4 | 10.1 | 6.1 | | 7.8 | 4.5 | 2.1 | 7.0 | 6.6 | 11.7 | 9.6 |
| p9 | 6.3 | 6.1 | 6.7 | 4.7 | 0.5 | 2.5 | 5.1 | 7.8 | | 4.1 | 9.6 | 5.9 | 5.2 | 3.9 | 1.8 |
| p10 | 4.6 | 2.7 | 4.0 | 2.5 | 3.6 | 6.7 | 2.2 | 4.5 | 4.1 | | 6.5 | 3.4 | 2.7 | 7.6 | 5.9 |
| p11 | 3.8 | 3.8 | 2.8 | 8.7 | 9.2 | 11.7 | 8.1 | 2.1 | 9.6 | 6.5 | | 9.1 | 8.6 | 13.5 | 11.3 |
| p12 | 7.9 | 5.5 | 7.1 | 1.1 | 5.4 | 8.1 | 1.1 | 7.0 | 5.9 | 3.4 | 9.1 | | 0.7 | 8.1 | 7.1 |
| p13 | 7.3 | 5.0 | 6.5 | 0.5 | 4.7 | 7.6 | 0.5 | 6.6 | 5.2 | 2.7 | 8.6 | 0.7 | | 7.6 | 6.5 |
| p14 | 10.1 | 9.9 | 10.6 | 7.2 | 4.2 | 2.5 | 7.8 | 11.7 | 3.9 | 7.6 | 13.5 | 8.1 | 7.6 | | 2.2 |
| p15 | 7.9 | 7.9 | 8.5 | 6.0 | 2.2 | 1.1 | 6.5 | 9.6 | 1.8 | 5.9 | 11.3 | 7.1 | 6.5 | 2.2 | |
16 Columns
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0575}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0690}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0575}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0690}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0575}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0575}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0690}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0575}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0690}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0575}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0575}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0690}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0575}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0575}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0690}}
>{\raggedright\arraybackslash}p{(\linewidth - 30\tabcolsep) * \real{0.0690}}@{}}
\toprule\noalign{}
16/15/14/13/12
l.282 ...idth - 30\tabcolsep) * \real{0.0690}}@{}}
l.281 ...idth - 28\tabcolsep) * \real{0.0741}}@{}}
l.280 ...idth - 26\tabcolsep) * \real{0.0667}}@{}}
l.279 ...idth - 24\tabcolsep) * \real{0.0714}}@{}}
l.278 ...idth - 22\tabcolsep) * \real{0.0923}}@{}}
12 Columns
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0769}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0923}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0769}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0923}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0769}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0769}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0923}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0769}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0923}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0769}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0769}}
>{\raggedright\arraybackslash}p{(\linewidth - 22\tabcolsep) * \real{0.0923}}@{}}
\toprule\noalign{}
11 Columns
\begin{longtable}[]{@{}lllllllllll@{}}
\toprule\noalign{}
Is there a best practice (and good way to communicate that to the user) how to handle tables of any width?
Markdown Tables above a certain width seem to break the "tex -> pdf" step with any engine.
Some error message like "that markdown table is gonna end up wider than the page (so eisvogel is just gonna go up in flames)" would be helpful.
Tested with pdflatex and xelatex, pandoc 3.8.3, eisvogel 3.3.0;
Examples
4 vs. 5 Columns (max width 54 characters)
trying
pandoc .\debug_5cols.md -o .\debug_5cols.pdf --template eisvogeldirectly just breaks:Relates to #434
If I simply leave out the last column (left side of the image below) it just works with any engine, however with the last column (right side below) vastly different .tex is generated.
11 vs. 12 (vs. 16) Columns (max width 54/79/105 characters)
Breaks at 16 Columns, breaks with at least 12 columns, works with at most 11 columns.
pandoc .\debug_long.md -o debug_long.pdf --template eisvogel16 Columns
16/15/14/13/12
12 Columns
11 Columns
Is there a best practice (and good way to communicate that to the user) how to handle tables of any width?