public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Markdown table output from docx files
@ 2016-12-23 15:44 Thijs Lemmens
       [not found] ` <9302a01c-5c36-4ea4-a4a0-01c9f6e2f73a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Thijs Lemmens @ 2016-12-23 15:44 UTC (permalink / raw)
  To: pandoc-discuss


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

Hello all

I'm trying to convert a docx file to markdown (as an input for hugo) with 
this command:
pandoc test.docx -f docx -t markdown -o out.md



But a simple table:

Input user

Presentation after pushing Enter

Search result

Tom Jerry

Tom AND Jerry

Tom AND Jerry

Tom OR Jerry

Tom OR Jerry

Tom OR Jerry

“Tom and Jerry”

“Tom and Jerry”

“Tom and Jerry”

Tom Jerry OR Goofy AND “Donald Duck”

Tom AND Jerry OR Goofy AND “Donald Duck”

((Tom AND Jerry) OR Goofy) AND “Donald Duck”

(Tom AND Jerry) AND “Donald Duck”

Goofy AND “Donald Duck”

Tom Jerry OR (Goofy AND “Donald Duck”)

Tom AND Jerry OR (Goofy AND “Donald Duck”)

(Tom AND Jerry) OR (Goofy AND “Donald Duck”)

Tom AND Jerry

Goofy AND “Donald Duck”
 comes out like this:

------------------------------------------------------------------------------------------------------------------------------------
Input user                               Presentation after pushing Enter             Search result
---------------------------------------- -------------------------------------------- ----------------------------------------------
Tom Jerry                                Tom AND Jerry                                Tom AND Jerry

Tom OR Jerry                             Tom OR Jerry                                 Tom OR Jerry

“Tom and Jerry”                          “Tom and Jerry”                              “Tom and Jerry”

Tom Jerry OR Goofy AND “Donald Duck”     Tom AND Jerry OR Goofy AND “Donald Duck”     ((Tom AND Jerry) OR Goofy) AND “Donald Duck”
                                                                                      
                                                                                      (Tom AND Jerry) AND “Donald Duck”
                                                                                      
                                                                                      Goofy AND “Donald Duck”

Tom Jerry OR (Goofy AND “Donald Duck”)   Tom AND Jerry OR (Goofy AND “Donald Duck”)   (Tom AND Jerry) OR (Goofy AND “Donald Duck”)
                                                                                      
                                                                                      Tom AND Jerry
                                                                                      
                                                                                      Goofy AND “Donald Duck”
------------------------------------------------------------------------------------------------------------------------------------


The problem is that this does not a correct markdown table, and Hugo 
(https://gohugo.io/) is not able to render this correctly to html. 

I searched the Pandoc manual, but I cannot find a way to control the 
Markdown table output. Can anybody help me, or is this not an option yet in 
Pandoc?

By the way, with html, the table is rendered correctly.

kind regards

Thijs



-- 
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/9302a01c-5c36-4ea4-a4a0-01c9f6e2f73a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Markdown table output from docx files
       [not found] ` <9302a01c-5c36-4ea4-a4a0-01c9f6e2f73a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-12-23 20:36   ` Kolen Cheung
       [not found]     ` <47ac6425-1870-4522-9a6d-615c0dc7c785-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Kolen Cheung @ 2016-12-23 20:36 UTC (permalink / raw)
  To: pandoc-discuss


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



this does not a correct markdown table


   1. whether a “markdown table” is correct or not depends on the markdown 
   variant in question 
   2. pandoc does not support the markdown variant you mentioned 

It looks like Hugo support pipe tables? Try

pandoc test.docx -f docx -t markdown-simple_tables-multiline_tables-grid_tables -o out.md

Also see the section of markdown extensions, in particular, the table 
extensions in the Manual <http://pandoc.org/README.html>.
​

-- 
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/47ac6425-1870-4522-9a6d-615c0dc7c785%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Markdown table output from docx files
       [not found]     ` <47ac6425-1870-4522-9a6d-615c0dc7c785-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-01-02 11:56       ` Thijs Lemmens
       [not found]         ` <7c6f394f-94f6-4ad0-ae8d-d58ed44fdba2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Thijs Lemmens @ 2017-01-02 11:56 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you.

This already helped a lot. I checked the manual before posting the 
question, but I did not really understand how to use it. Now I do.
I still have a problem with newlines in my tables, but I think I can fix it 
with some regexes. When I feel really courageous, I might try to check it 
out in the Haskell code.

kind regards

On Friday, December 23, 2016 at 9:36:37 PM UTC+1, Kolen Cheung wrote:
>
> this does not a correct markdown table
>
>
>    1. whether a “markdown table” is correct or not depends on the 
>    markdown variant in question 
>    2. pandoc does not support the markdown variant you mentioned 
>
> It looks like Hugo support pipe tables? Try
>
> pandoc test.docx -f docx -t markdown-simple_tables-multiline_tables-grid_tables -o out.md
>
> Also see the section of markdown extensions, in particular, the table 
> extensions in the Manual <http://pandoc.org/README.html>.
> ​
>

-- 
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/7c6f394f-94f6-4ad0-ae8d-d58ed44fdba2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Markdown table output from docx files
       [not found]         ` <7c6f394f-94f6-4ad0-ae8d-d58ed44fdba2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-01-03  3:54           ` Kolen Cheung
       [not found]             ` <44d87e31-27f9-4e03-875a-9d8dd02c17de-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Kolen Cheung @ 2017-01-03  3:54 UTC (permalink / raw)
  To: pandoc-discuss


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



You’re welcome. I agree the table extensions can be difficult to understand 
at the beginning (I personally had opened a repository, writing some tests 
and see the differences between the 4 table extensions.). pandoc’s Manual 
is quite good (there are really bad one, like kramdown’s), but the “genre” 
of manual has limitations. I started a wiki at Pandoc Tricks · jgm/pandoc 
Wiki 
<https://github.com/jgm/pandoc/wiki/Pandoc-Tricks#using-markdown-templates> 
(but I didn’t , and hope that in the future it can be expanded into some 
sort of guide or wikibook.

On Monday, January 2, 2017 at 3:56:23 AM UTC-8, Thijs Lemmens wrote:

Thank you.
>
> This already helped a lot. I checked the manual before posting the 
> question, but I did not really understand how to use it. Now I do.
> I still have a problem with newlines in my tables, but I think I can fix 
> it with some regexes. When I feel really courageous, I might try to check 
> it out in the Haskell code.
>
> kind regards
>
> On Friday, December 23, 2016 at 9:36:37 PM UTC+1, Kolen Cheung wrote:
>>
>> this does not a correct markdown table
>>
>>
>>    1. whether a “markdown table” is correct or not depends on the 
>>    markdown variant in question 
>>    2. pandoc does not support the markdown variant you mentioned 
>>
>> It looks like Hugo support pipe tables? Try
>>
>> pandoc test.docx -f docx -t markdown-simple_tables-multiline_tables-grid_tables -o out.md
>>
>> Also see the section of markdown extensions, in particular, the table 
>> extensions in the Manual <http://pandoc.org/README.html>.
>> ​
>>
> ​

-- 
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/44d87e31-27f9-4e03-875a-9d8dd02c17de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Markdown table output from docx files
       [not found]             ` <44d87e31-27f9-4e03-875a-9d8dd02c17de-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-01-03  3:57               ` Kolen Cheung
  0 siblings, 0 replies; 5+ messages in thread
From: Kolen Cheung @ 2017-01-03  3:57 UTC (permalink / raw)
  To: pandoc-discuss


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

Typo: delete the "(but I didn't" in the last sentence...

-- 
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/d6dcc24b-a4e3-4a88-8e4a-3fe77373124c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2017-01-03  3:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-23 15:44 Markdown table output from docx files Thijs Lemmens
     [not found] ` <9302a01c-5c36-4ea4-a4a0-01c9f6e2f73a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-12-23 20:36   ` Kolen Cheung
     [not found]     ` <47ac6425-1870-4522-9a6d-615c0dc7c785-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-01-02 11:56       ` Thijs Lemmens
     [not found]         ` <7c6f394f-94f6-4ad0-ae8d-d58ed44fdba2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-01-03  3:54           ` Kolen Cheung
     [not found]             ` <44d87e31-27f9-4e03-875a-9d8dd02c17de-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-01-03  3:57               ` Kolen Cheung

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