public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Retain the table style when doing markdown to markdown conversion
@ 2018-07-19 17:08 Kaushal Modi
       [not found] ` <929955d1-5dd5-4c9b-b622-ac74a40d8f0e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Kaushal Modi @ 2018-07-19 17:08 UTC (permalink / raw)
  To: pandoc-discuss


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

Hello,

Is it possible to retain the table style when doing "-f markdown -t 
markdown"?

This is related to my previous post. I am exporting from Org format using 
an Org exporter to Hugo/Blackfriday flavor compatible Markdown.

That generates a table like this:

| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| a        | b        | c        |
| d        | e        | f        |

I then use Pandoc only to parse the citations in that file (which now works 
thanks to "-t markdown-citation").

The issue is that while most conversions are fine going from markdown to 
markdown, the table format gets changed.

Pandoc converts the above table to:

  Header 1   Header 2   Header 3
  ---------- ---------- ----------
  a          b          c
  d          e          f

That table format does not work with Hugo/Blackfriday.

Seeing that Pandoc does a successful conversion, it means that the table 
format in the input is at least recognizable by Pandoc. So can you please 
give me a suggestion on how to let the table elements be as-is in the input 
markdown?

Many thanks!

Once this is resolved I would have successfully got an Org document with 
Pandoc citations convert successfully to a Hugo post :)

Ref: 
https://github.com/kaushalmodi/ox-hugo/issues/175#issuecomment-405987796

Kaushal

-- 
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/929955d1-5dd5-4c9b-b622-ac74a40d8f0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Retain the table style when doing markdown to markdown conversion
       [not found] ` <929955d1-5dd5-4c9b-b622-ac74a40d8f0e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-07-19 18:01   ` Daniel Staal
       [not found]     ` <3541cc91-c83f-2d7c-8975-2642981b8f38-Jdbf3xiKgS8@public.gmane.org>
  2018-07-20  3:31   ` Kolen Cheung
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Staal @ 2018-07-19 18:01 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 7/19/18 1:08 PM, Kaushal Modi wrote:
> 
> Is it possible to retain the table style when doing "-f markdown -t 
> markdown"?

'Retain' - no.  'Specify' - yes.  I'm not sure what the heuristics are 
for which table format gets used in which case, but what you need to do 
is *disable* the table styles you don't want used.

I use this line to get pipe tables:

pandoc -f markdown -t 
markdown-simple_tables+pipe_tables-multiline_tables-grid_tables-raw_html

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


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

* Re: Retain the table style when doing markdown to markdown conversion
       [not found]     ` <3541cc91-c83f-2d7c-8975-2642981b8f38-Jdbf3xiKgS8@public.gmane.org>
@ 2018-07-19 18:12       ` Kaushal Modi
  0 siblings, 0 replies; 4+ messages in thread
From: Kaushal Modi @ 2018-07-19 18:12 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Hi Daniel,

Thanks for the response!

Looks like "markdown-simple_tables+pipe_tables" works great for my use case.

On Thu, Jul 19, 2018 at 2:01 PM Daniel Staal <DStaal-Jdbf3xiKgS8@public.gmane.org> wrote:

> On 7/19/18 1:08 PM, Kaushal Modi wrote:
> >
> > Is it possible to retain the table style when doing "-f markdown -t
> > markdown"?
>
> 'Retain' - no.  'Specify' - yes.  I'm not sure what the heuristics are
> for which table format gets used in which case, but what you need to do
> is *disable* the table styles you don't want used.
>
> I use this line to get pipe tables:
>
> pandoc -f markdown -t
> markdown-simple_tables+pipe_tables-multiline_tables-grid_tables-raw_html
>
-- 

Kaushal Modi

-- 
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/CAFyQvY1vEMsw1gj%3Daia_d41UXNw7zvmOWUxaWbPNxQ-LgVvDoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Retain the table style when doing markdown to markdown conversion
       [not found] ` <929955d1-5dd5-4c9b-b622-ac74a40d8f0e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2018-07-19 18:01   ` Daniel Staal
@ 2018-07-20  3:31   ` Kolen Cheung
  1 sibling, 0 replies; 4+ messages in thread
From: Kolen Cheung @ 2018-07-20  3:31 UTC (permalink / raw)
  To: pandoc-discuss

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

There's numerous posts/issues/pages on pandoc-discuss, GitHub issue tracker, and GitHub wiki on this topic. You could try pandoc-trick on the github wiki first.

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

end of thread, other threads:[~2018-07-20  3:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-19 17:08 Retain the table style when doing markdown to markdown conversion Kaushal Modi
     [not found] ` <929955d1-5dd5-4c9b-b622-ac74a40d8f0e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-19 18:01   ` Daniel Staal
     [not found]     ` <3541cc91-c83f-2d7c-8975-2642981b8f38-Jdbf3xiKgS8@public.gmane.org>
2018-07-19 18:12       ` Kaushal Modi
2018-07-20  3:31   ` 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).