-
Hey there, i am currently trying to use pantable to export tables into a couple of different formats. When I export this table
to latex, I get the following latex code: \begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.2000}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.5000}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.3000}}@{}}
\toprule
\begin{minipage}[b]{\linewidth}\raggedright
1
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
2
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
3
\end{minipage} \\
\midrule
\endhead
hello & my & name \\
\bottomrule
\end{longtable} When I try to use pandoc to convert this to a docx file, the table does not get parsed (and the header is cut off). This definitely has to do with the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I'm pretty sure it is not a bug of pantable. One of the problem in trying to reproduce your result is that your example above is not self-contained. i.e. you do not have the command you use to generate the docx. I also assume your In ```table
---
alignment: LLL
markdown: true
width: [0.2, 0.5, 0.3]
---
1,2,3
hello,my,name
``` pandoc -F pantable test.md -o test.docx is a normal looking table to me. Another reason to know that this is not a problem of pantable is that your LaTeX output is correct—pantable only convert the table code-block to pandoc AST, and is output format agnostic. Edit: also the versions (and sometimes platform, or even the software you use to open the docx) can be useful in reproducing. e.g. mine is pantable 0.14.2, pandoc 2.16.2, MS Word for Mac version 16.56 |
Beta Was this translation helpful? Give feedback.
-
Yes, you are right. I was overwhelmed yesterday was a bit quick in opening an issue on pantable. When I was testing pantable, I missed The full list of package dependencies in Latex, I came up with, then is: \usepackage{array}
\usepackage{booktabs}
\usepackage{calc}
\usepackage{longtable} The minimal self-contained example for my problem then is File
does not produce a table in docx when using: Command: But after spending a couple more hours with it yesterday, I understood that this is rather a problem with the Latex-Reader of pandoc than with pantable. So sorry for all the hectic and confusion. In my usecase, I want to convert Markdown to latex, then run additional filters and stuff on it to just finally convert it from Latex to pdf and docx respectively. So that is why I have this very unusual/strange command (if you are wondering). And thanks for the My Software versions: Kubuntu 21.10, with pandoc 2.16.1, opening the docx files with LibreOffice. |
Beta Was this translation helpful? Give feedback.
I'm pretty sure it is not a bug of pantable.
One of the problem in trying to reproduce your result is that your example above is not self-contained. i.e. you do not have the command you use to generate the docx.
I also assume your
\
in the beginning is not what you meant (you may be trying to escape that in showing it as code in markdown here, which you can do will either using another delimiter such as~~~
or even indent the whole block.)In
test.md
:is a normal looking table to me.
Another reason to know that this is not a problem of pantable is that your…