public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Converting nested tables [to latex ; from docx or odt]
@ 2021-08-15 17:20 Yann Barsamian
       [not found] ` <b1e18482-a9ec-4f53-8453-b765fb199cc4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Yann Barsamian @ 2021-08-15 17:20 UTC (permalink / raw)
  To: pandoc-discuss


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

Dear all,

I am new to pandoc, and searched this forum of discussion without finding 
any similar issue. Here is a bug I think I found. I reduced the input 
document to an almost minimal form, and it is attached to this message.

I am working under ubuntu 20.04, and downloaded the latest pandoc 2.14.1.

The issue is related to a document that contains an array, and inside one 
of the cells of this array, there is another array.


1. Bug from .docx to latex

Here is the conversion line I used :

pandoc --standalone --extract-media=. -t latex -f docx Nested_arrays.docx 
-o Nested_arrays.tex

When doing this conversion, pandoc sees that there is a table inside the 
table. Hence, pandoc produces a longtable nested inside another longtable. 
And this produces a latex error

! Forbidden control sequence found while scanning use of \LT@nofcols.

I'm not using longtables usually in my latex code, but after some search on 
the internet, maybe the problem comes from an impossibility to nest a 
longtable inside another longtable, hence the output should be changed ? 
Here is how I fixed this error, by modifying the .tex output by pandoc:

* changing the longtable inside the bigger one to a tabular
* and, of course, removing \endhead of this inner array because tabulars do 
not have \endhead


2. Bug from .odt (to latex, to markdown...)

I thought that maybe the bug was linked to the .docx document I received 
from my colleague, so I saved the document to a .odt document. And this is 
way worse ! This time, the line containing the nested array is simply not 
output at all, neither if I ask to produce latex, nor if I ask pandoc to 
produce markdown.

pandoc --standalone --extract-media=. -t latex -f odt Nested_arrays.odt -o 
Nested_arrays.tex


3. Finally, but this time I saw that this has already been discussed : as 
you can see, the inner table would be clearer for pupils with all lines 
drawn, because it is intended to be a clear array that pupils have to fill. 
If there was a way to specify that "I want to keep all those ugly lines 
inside the output latex code please, whatever you think of this design 
choice", this would be awesome :)


Thanks in advance for your replies, and have a nice day.

Yann

-- 
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/b1e18482-a9ec-4f53-8453-b765fb199cc4n%40googlegroups.com.

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

[-- Attachment #2: Nested_arrays.docx --]
[-- Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document, Size: 5961 bytes --]

[-- Attachment #3: Nested_arrays.odt --]
[-- Type: application/x-zip, Size: 11260 bytes --]

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

* Re: Converting nested tables [to latex ; from docx or odt]
       [not found] ` <b1e18482-a9ec-4f53-8453-b765fb199cc4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-08-16 16:54   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2021-08-16 16:54 UTC (permalink / raw)
  To: Yann Barsamian, pandoc-discuss


In general I don't think we have very good support for nested
tables.  I'm sorry, I don't have any particular suggestions that
can help.  But feel free to file a bug report or two if you like.

Yann Barsamian <yann.barsamian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Dear all,
>
> I am new to pandoc, and searched this forum of discussion without finding 
> any similar issue. Here is a bug I think I found. I reduced the input 
> document to an almost minimal form, and it is attached to this message.
>
> I am working under ubuntu 20.04, and downloaded the latest pandoc 2.14.1.
>
> The issue is related to a document that contains an array, and inside one 
> of the cells of this array, there is another array.
>
>
> 1. Bug from .docx to latex
>
> Here is the conversion line I used :
>
> pandoc --standalone --extract-media=. -t latex -f docx Nested_arrays.docx 
> -o Nested_arrays.tex
>
> When doing this conversion, pandoc sees that there is a table inside the 
> table. Hence, pandoc produces a longtable nested inside another longtable. 
> And this produces a latex error
>
> ! Forbidden control sequence found while scanning use of \LT@nofcols.
>
> I'm not using longtables usually in my latex code, but after some search on 
> the internet, maybe the problem comes from an impossibility to nest a 
> longtable inside another longtable, hence the output should be changed ? 
> Here is how I fixed this error, by modifying the .tex output by pandoc:
>
> * changing the longtable inside the bigger one to a tabular
> * and, of course, removing \endhead of this inner array because tabulars do 
> not have \endhead
>
>
> 2. Bug from .odt (to latex, to markdown...)
>
> I thought that maybe the bug was linked to the .docx document I received 
> from my colleague, so I saved the document to a .odt document. And this is 
> way worse ! This time, the line containing the nested array is simply not 
> output at all, neither if I ask to produce latex, nor if I ask pandoc to 
> produce markdown.
>
> pandoc --standalone --extract-media=. -t latex -f odt Nested_arrays.odt -o 
> Nested_arrays.tex
>
>
> 3. Finally, but this time I saw that this has already been discussed : as 
> you can see, the inner table would be clearer for pupils with all lines 
> drawn, because it is intended to be a clear array that pupils have to fill. 
> If there was a way to specify that "I want to keep all those ugly lines 
> inside the output latex code please, whatever you think of this design 
> choice", this would be awesome :)
>
>
> Thanks in advance for your replies, and have a nice day.
>
> Yann
>
> -- 
> 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/b1e18482-a9ec-4f53-8453-b765fb199cc4n%40googlegroups.com.


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

end of thread, other threads:[~2021-08-16 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-15 17:20 Converting nested tables [to latex ; from docx or odt] Yann Barsamian
     [not found] ` <b1e18482-a9ec-4f53-8453-b765fb199cc4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-16 16:54   ` John MacFarlane

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