public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Table conversion from LaTeX missing multirow strings?
@ 2021-11-18 17:04 CS
       [not found] ` <e5e04026-8801-4ed2-8f95-713a98286c08n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: CS @ 2021-11-18 17:04 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2153 bytes --]


Hello, I am attempting to convert a LaTeX document into HTML, but running 
into issues with tables that use `\multirow`. From recent issues / PRs on 
the repo (https://github.com/jgm/pandoc/issues/6603, among others), it 
seems like this is  supported and should work. However, when I run pandoc, 
the multirow values seem to get stripped out. I am using pandoc 2.9.2.1 on 
Ubuntu 20.04, with texlive 2020.20210202-3 installed.

My minimal example is pulled from the GH issue mentioned above:

\documentclass{article}

\usepackage{multirow}

\begin{document}
\begin{tabular}{|r|r|}
\multirow{2}{5em}{hello} & A \\
& B \\
\end{tabular}
\end{document}

Converting this to native Haskell (for debugging), with the following 
command, results in:

$ pandoc table_test.tex -f latex -t native -o table_test.hs


[Table [] [AlignRight,AlignRight] [0.0,0.0]
[[]
,[]]
[[[]
,[Plain [Str "A"]]]
,[[]
,[Plain [Str "B"]]]]]


However, I would expect to see some rowspan declarations and at least the 
string "hello" somewhere in the output. Instead, I'm getting empty cells 
([]). The HTML version of the above is thus also missing the rowspan cell:

<table>
<tbody>
<tr class="odd">
<td style="text-align: right;"></td>
<td style="text-align: right;">A</td>
</tr>
<tr class="even">
<td style="text-align: right;"></td>
<td style="text-align: right;">B</td>
</tr>
</tbody>
</table>


Am I missing some command-line argument or use of an extension, to get 
multirow table cells to work? I've tried going through this discussion 
board and the documentation, but have not been able to find what I am 
missing. I am new to both LaTeX and pandoc, so perhaps I am missing 
something in the original document as well?

I appreciate your time and help. Thanks!

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e5e04026-8801-4ed2-8f95-713a98286c08n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 6619 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Table conversion from LaTeX missing multirow strings?
       [not found] ` <e5e04026-8801-4ed2-8f95-713a98286c08n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-11-18 21:43   ` Albert Krewinkel
  0 siblings, 0 replies; 2+ messages in thread
From: Albert Krewinkel @ 2021-11-18 21:43 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Support for this was added in pandoc 2.10.1. The latest version is
available here: https://github.com/jgm/pandoc/releases/latest

You could also try a Docker image, see
https://github.com/pandoc/dockerfiles#readme


CS <cole.shaw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hello, I am attempting to convert a LaTeX document into HTML, but running
> into issues with tables that use `\multirow`. From recent issues / PRs on
> the repo (https://github.com/jgm/pandoc/issues/6603, among others), it
> seems like this is  supported and should work. However, when I run pandoc,
> the multirow values seem to get stripped out. I am using pandoc 2.9.2.1 on
> Ubuntu 20.04, with texlive 2020.20210202-3 installed.
>
> My minimal example is pulled from the GH issue mentioned above:
>
> \documentclass{article}
>
> \usepackage{multirow}
>
> \begin{document}
> \begin{tabular}{|r|r|}
> \multirow{2}{5em}{hello} & A \\
> & B \\
> \end{tabular}
> \end{document}
>
> Converting this to native Haskell (for debugging), with the following
> command, results in:
>
> $ pandoc table_test.tex -f latex -t native -o table_test.hs
>
>
> [Table [] [AlignRight,AlignRight] [0.0,0.0]
> [[]
> ,[]]
> [[[]
> ,[Plain [Str "A"]]]
> ,[[]
> ,[Plain [Str "B"]]]]]
>
>
> However, I would expect to see some rowspan declarations and at least the
> string "hello" somewhere in the output. Instead, I'm getting empty cells
> ([]). The HTML version of the above is thus also missing the rowspan cell:
>
> <table>
> <tbody>
> <tr class="odd">
> <td style="text-align: right;"></td>
> <td style="text-align: right;">A</td>
> </tr>
> <tr class="even">
> <td style="text-align: right;"></td>
> <td style="text-align: right;">B</td>
> </tr>
> </tbody>
> </table>
>
>
> Am I missing some command-line argument or use of an extension, to get
> multirow table cells to work? I've tried going through this discussion
> board and the documentation, but have not been able to find what I am
> missing. I am new to both LaTeX and pandoc, so perhaps I am missing
> something in the original document as well?
>
> I appreciate your time and help. Thanks!


--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-18 21:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 17:04 Table conversion from LaTeX missing multirow strings? CS
     [not found] ` <e5e04026-8801-4ed2-8f95-713a98286c08n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-11-18 21:43   ` Albert Krewinkel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).