public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Convert tables with colspans /rowspans from mediawiki to LaTeX
@ 2017-11-30 12:00 Carsten Gerlach
       [not found] ` <c7b735e6-d9ba-db60-4c43-cf6bbde1e7cf-Mmb7MZpHnFY@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Gerlach @ 2017-11-30 12:00 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi all,

I want to use pandoc to convert some mediawiki tables whicht contain
colspans and rowspans to LaTeX format.

I use this command: pandoc -f mediawiki -t latex -o output.tex input.txt

The used pandoc version is 1.19.2.1


Normal Tables are working good, e.g.

{|
| A1 || B1 || C1
|-
| A2 || B2 || C2
|-
| A3 || B3 || C3
|}

will result in

\begin{longtable}[]{@{}lll@{}}
\toprule
A1 & B1 & C1\tabularnewline
A2 & B2 & C2\tabularnewline
A3 & B3 & C3\tabularnewline
\bottomrule
\end{longtable}

But a table with colspan, e.g.

{|
| A1 || B1 || C1
|-
| colspan=2 | (A…B)2 || C2
|-
| A3 || B3 || C3
|}

will result in:

\begin{longtable}[]{@{}lll@{}}
\toprule
A1 & B1 & C1\tabularnewline
(A\ldots{}B)2 & C2\tabularnewline
A3 & B3 & C3\tabularnewline
\bottomrule
\end{longtable}

But I would expect this result:

\begin{longtable}[]{@{}lll@{}}
\toprule
A1 & B1 & C1\tabularnewline
\multicolumn{2}{l}{(A\ldots{}B)2} & C2\tabularnewline
A3 & B3 & C3\tabularnewline
\bottomrule
\end{longtable}

With rowspan it is a similar behaviour:

{|
| A1 || B1 || C1
|-
| A1 || rowspan=2 | B(2…3) || C2
|-
| A3 || C3
|}

will result in

\begin{longtable}[]{@{}lll@{}}
\toprule
A1 & B1 & C1\tabularnewline
A1 & B(2\ldots{}3) & C2\tabularnewline
A3 & C3\tabularnewline
\bottomrule
\end{longtable}

But I expect this:

\begin{longtable}[]{@{}lll@{}}
\toprule
A1 & B1 & C1\tabularnewline
A1 & \multirow{2}{*}{B(2\ldots{}3)} & C2\tabularnewline
A3 & & C3\tabularnewline
\bottomrule
\end{longtable}

Is there a special option which I have to give to the pandoc command? Or
is the expected result not possible in general?

Thanks for any hint!

Greetings, Carsten

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c7b735e6-d9ba-db60-4c43-cf6bbde1e7cf%40gmx.de.
For more options, visit https://groups.google.com/d/optout.


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

* Re: Convert tables with colspans /rowspans from mediawiki to LaTeX
       [not found] ` <c7b735e6-d9ba-db60-4c43-cf6bbde1e7cf-Mmb7MZpHnFY@public.gmane.org>
@ 2017-12-01 19:49   ` John MACFARLANE
  2017-12-03  9:55     ` Carsten Gerlach
  0 siblings, 1 reply; 4+ messages in thread
From: John MACFARLANE @ 2017-12-01 19:49 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Pandoc doesn't yet support col/row spans in tables.
See https://github.com/jgm/pandoc/issues/1024

+++ Carsten Gerlach [Nov 30 17 13:00 ]:
>Hi all,
>
>I want to use pandoc to convert some mediawiki tables whicht contain
>colspans and rowspans to LaTeX format.
>
>I use this command: pandoc -f mediawiki -t latex -o output.tex input.txt
>
>The used pandoc version is 1.19.2.1
>
>
>Normal Tables are working good, e.g.
>
>{|
>| A1 || B1 || C1
>|-
>| A2 || B2 || C2
>|-
>| A3 || B3 || C3
>|}
>
>will result in
>
>\begin{longtable}[]{@{}lll@{}}
>\toprule
>A1 & B1 & C1\tabularnewline
>A2 & B2 & C2\tabularnewline
>A3 & B3 & C3\tabularnewline
>\bottomrule
>\end{longtable}
>
>But a table with colspan, e.g.
>
>{|
>| A1 || B1 || C1
>|-
>| colspan=2 | (A…B)2 || C2
>|-
>| A3 || B3 || C3
>|}
>
>will result in:
>
>\begin{longtable}[]{@{}lll@{}}
>\toprule
>A1 & B1 & C1\tabularnewline
>(A\ldots{}B)2 & C2\tabularnewline
>A3 & B3 & C3\tabularnewline
>\bottomrule
>\end{longtable}
>
>But I would expect this result:
>
>\begin{longtable}[]{@{}lll@{}}
>\toprule
>A1 & B1 & C1\tabularnewline
>\multicolumn{2}{l}{(A\ldots{}B)2} & C2\tabularnewline
>A3 & B3 & C3\tabularnewline
>\bottomrule
>\end{longtable}
>
>With rowspan it is a similar behaviour:
>
>{|
>| A1 || B1 || C1
>|-
>| A1 || rowspan=2 | B(2…3) || C2
>|-
>| A3 || C3
>|}
>
>will result in
>
>\begin{longtable}[]{@{}lll@{}}
>\toprule
>A1 & B1 & C1\tabularnewline
>A1 & B(2\ldots{}3) & C2\tabularnewline
>A3 & C3\tabularnewline
>\bottomrule
>\end{longtable}
>
>But I expect this:
>
>\begin{longtable}[]{@{}lll@{}}
>\toprule
>A1 & B1 & C1\tabularnewline
>A1 & \multirow{2}{*}{B(2\ldots{}3)} & C2\tabularnewline
>A3 & & C3\tabularnewline
>\bottomrule
>\end{longtable}
>
>Is there a special option which I have to give to the pandoc command? Or
>is the expected result not possible in general?
>
>Thanks for any hint!
>
>Greetings, Carsten
>
>-- 
>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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c7b735e6-d9ba-db60-4c43-cf6bbde1e7cf%40gmx.de.
>For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20171201194924.GE2189%40protagoras.
For more options, visit https://groups.google.com/d/optout.


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

* Re: Convert tables with colspans /rowspans from mediawiki to LaTeX
  2017-12-01 19:49   ` John MACFARLANE
@ 2017-12-03  9:55     ` Carsten Gerlach
       [not found]       ` <af266785-9015-e14f-a8d8-13cc94d99988-Mmb7MZpHnFY@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Gerlach @ 2017-12-03  9:55 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 3526 bytes --]

Thanks for the hint.

So I'm looking for another solution in the meantime until issue 1024 is
implemented. :)

Greetings, Carsten
 

Am 01.12.2017 um 20:49 schrieb John MACFARLANE:
> Pandoc doesn't yet support col/row spans in tables.
> See https://github.com/jgm/pandoc/issues/1024
>
> +++ Carsten Gerlach [Nov 30 17 13:00 ]:
>> Hi all,
>>
>> I want to use pandoc to convert some mediawiki tables whicht contain
>> colspans and rowspans to LaTeX format.
>>
>> I use this command: pandoc -f mediawiki -t latex -o output.tex input.txt
>>
>> The used pandoc version is 1.19.2.1
>>
>>
>> Normal Tables are working good, e.g.
>>
>> {|
>> | A1 || B1 || C1
>> |-
>> | A2 || B2 || C2
>> |-
>> | A3 || B3 || C3
>> |}
>>
>> will result in
>>
>> \begin{longtable}[]{@{}lll@{}}
>> \toprule
>> A1 & B1 & C1\tabularnewline
>> A2 & B2 & C2\tabularnewline
>> A3 & B3 & C3\tabularnewline
>> \bottomrule
>> \end{longtable}
>>
>> But a table with colspan, e.g.
>>
>> {|
>> | A1 || B1 || C1
>> |-
>> | colspan=2 | (A…B)2 || C2
>> |-
>> | A3 || B3 || C3
>> |}
>>
>> will result in:
>>
>> \begin{longtable}[]{@{}lll@{}}
>> \toprule
>> A1 & B1 & C1\tabularnewline
>> (A\ldots{}B)2 & C2\tabularnewline
>> A3 & B3 & C3\tabularnewline
>> \bottomrule
>> \end{longtable}
>>
>> But I would expect this result:
>>
>> \begin{longtable}[]{@{}lll@{}}
>> \toprule
>> A1 & B1 & C1\tabularnewline
>> \multicolumn{2}{l}{(A\ldots{}B)2} & C2\tabularnewline
>> A3 & B3 & C3\tabularnewline
>> \bottomrule
>> \end{longtable}
>>
>> With rowspan it is a similar behaviour:
>>
>> {|
>> | A1 || B1 || C1
>> |-
>> | A1 || rowspan=2 | B(2…3) || C2
>> |-
>> | A3 || C3
>> |}
>>
>> will result in
>>
>> \begin{longtable}[]{@{}lll@{}}
>> \toprule
>> A1 & B1 & C1\tabularnewline
>> A1 & B(2\ldots{}3) & C2\tabularnewline
>> A3 & C3\tabularnewline
>> \bottomrule
>> \end{longtable}
>>
>> But I expect this:
>>
>> \begin{longtable}[]{@{}lll@{}}
>> \toprule
>> A1 & B1 & C1\tabularnewline
>> A1 & \multirow{2}{*}{B(2\ldots{}3)} & C2\tabularnewline
>> A3 & & C3\tabularnewline
>> \bottomrule
>> \end{longtable}
>>
>> Is there a special option which I have to give to the pandoc command? Or
>> is the expected result not possible in general?
>>
>> Thanks for any hint!
>>
>> Greetings, Carsten
>>
>> -- 
>> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/c7b735e6-d9ba-db60-4c43-cf6bbde1e7cf%40gmx.de.
>> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/af266785-9015-e14f-a8d8-13cc94d99988%40gmx.de.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 6742 bytes --]

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

* Re: Convert tables with colspans /rowspans from mediawiki to LaTeX
       [not found]       ` <af266785-9015-e14f-a8d8-13cc94d99988-Mmb7MZpHnFY@public.gmane.org>
@ 2018-01-01 18:42         ` 'Dirk Hünniger' via pandoc-discuss
  0 siblings, 0 replies; 4+ messages in thread
From: 'Dirk Hünniger' via pandoc-discuss @ 2018-01-01 18:42 UTC (permalink / raw)
  To: pandoc-discuss


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

mediawiki2latex can handle colspan as well as rowspan

Am Sonntag, 3. Dezember 2017 10:55:45 UTC+1 schrieb Carsten Gerlach:
>
> Thanks for the hint.
>
> So I'm looking for another solution in the meantime until issue 1024 is
> implemented. :)
>
> Greetings, Carsten
>  
>
> Am 01.12.2017 um 20:49 schrieb John MACFARLANE:
>
> Pandoc doesn't yet support col/row spans in tables. 
> See https://github.com/jgm/pandoc/issues/1024 
>
> +++ Carsten Gerlach [Nov 30 17 13:00 ]: 
>
> Hi all, 
>
> I want to use pandoc to convert some mediawiki tables whicht contain 
> colspans and rowspans to LaTeX format. 
>
> I use this command: pandoc -f mediawiki -t latex -o output.tex input.txt 
>
> The used pandoc version is 1.19.2.1 
>
>
> Normal Tables are working good, e.g. 
>
> {| 
> | A1 || B1 || C1 
> |- 
> | A2 || B2 || C2 
> |- 
> | A3 || B3 || C3 
> |} 
>
> will result in 
>
> \begin{longtable}[]{@{}lll@{}} 
> \toprule 
> A1 & B1 & C1\tabularnewline 
> A2 & B2 & C2\tabularnewline 
> A3 & B3 & C3\tabularnewline 
> \bottomrule 
> \end{longtable} 
>
> But a table with colspan, e.g. 
>
> {| 
> | A1 || B1 || C1 
> |- 
> | colspan=2 | (A…B)2 || C2 
> |- 
> | A3 || B3 || C3 
> |} 
>
> will result in: 
>
> \begin{longtable}[]{@{}lll@{}} 
> \toprule 
> A1 & B1 & C1\tabularnewline 
> (A\ldots{}B)2 & C2\tabularnewline 
> A3 & B3 & C3\tabularnewline 
> \bottomrule 
> \end{longtable} 
>
> But I would expect this result: 
>
> \begin{longtable}[]{@{}lll@{}} 
> \toprule 
> A1 & B1 & C1\tabularnewline 
> \multicolumn{2}{l}{(A\ldots{}B)2} & C2\tabularnewline 
> A3 & B3 & C3\tabularnewline 
> \bottomrule 
> \end{longtable} 
>
> With rowspan it is a similar behaviour: 
>
> {| 
> | A1 || B1 || C1 
> |- 
> | A1 || rowspan=2 | B(2…3) || C2 
> |- 
> | A3 || C3 
> |} 
>
> will result in 
>
> \begin{longtable}[]{@{}lll@{}} 
> \toprule 
> A1 & B1 & C1\tabularnewline 
> A1 & B(2\ldots{}3) & C2\tabularnewline 
> A3 & C3\tabularnewline 
> \bottomrule 
> \end{longtable} 
>
> But I expect this: 
>
> \begin{longtable}[]{@{}lll@{}} 
> \toprule 
> A1 & B1 & C1\tabularnewline 
> A1 & \multirow{2}{*}{B(2\ldots{}3)} & C2\tabularnewline 
> A3 & & C3\tabularnewline 
> \bottomrule 
> \end{longtable} 
>
> Is there a special option which I have to give to the pandoc command? Or 
> is the expected result not possible in general? 
>
> Thanks for any hint! 
>
> Greetings, Carsten 
>
> -- 
> 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:>. 
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/c7b735e6-d9ba-db60-4c43-cf6bbde1e7cf%40gmx.de
> .
> For more options, visit https://groups.google.com/d/optout. 
>
>
>
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c2c1f74b-9354-4527-a732-9ed8948824fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2018-01-01 18:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 12:00 Convert tables with colspans /rowspans from mediawiki to LaTeX Carsten Gerlach
     [not found] ` <c7b735e6-d9ba-db60-4c43-cf6bbde1e7cf-Mmb7MZpHnFY@public.gmane.org>
2017-12-01 19:49   ` John MACFARLANE
2017-12-03  9:55     ` Carsten Gerlach
     [not found]       ` <af266785-9015-e14f-a8d8-13cc94d99988-Mmb7MZpHnFY@public.gmane.org>
2018-01-01 18:42         ` 'Dirk Hünniger' via pandoc-discuss

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).