jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.12k stars 3.35k forks source link

LaTeX reader - support new table features #6311

Open jgm opened 4 years ago

jgm commented 4 years ago

Adjust LaTeX reader to support new table features introduced in https://github.com/jgm/pandoc-types/pull/66 including table attributes (including identifier), rowspan, colspan, table head and foot, multiple header lines, row headers, captions that allow block-level content and include an optional short caption.

LaurentRDC commented 4 years ago

I'm interested in creating a patch for this. I'll play around today and create a work-in-progress PR soon.

kysko commented 4 years ago

from an example in the code:

\begin{tabular}{ |l|l|l| }
\multicolumn{2}{c}{One} & Two \\
\end{tabular}

does give the desired effect. However, this one doesn't span and loses the text in the multicol:

\begin{tabular}{ |l|l|l| }
Two & \multicolumn{2}{c}{One} \\
\end{tabular}

Similarly,

\begin{tabular}{ |l|l| }
\multirow{2}{c}{One} & Two \\
a
\end{tabular}

gives the desired result, but not the following one (no row span, text lost):

\begin{tabular}{ |l|l| }
Two & \multirow{2}{c}{One} \\
a
\end{tabular}

(pandoc 2.10.1 on win10x64, but verifiable on the demo page)

I noticed this when I tried to successive multicols and failed, but it appears from the above there is a problem for a right-most multicolumn/multirow (at least that)

LaurentRDC commented 4 years ago

Hi @kysko,

Can you create a new issue for this? I'll take a look at what's going on.

kysko commented 4 years ago

ok, thought this was kept open for these reports, sorry

see #6596 for separate issue