public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* feature proposal: pretty printing of Native format
@ 2019-06-19 22:13 Laurent René de Cotret
       [not found] ` <6c1c4146-20b8-437a-878a-24c4ac915946-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Laurent René de Cotret @ 2019-06-19 22:13 UTC (permalink / raw)
  To: pandoc-discuss


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

Hello,

I often work on Pandoc filters, and I regularly look at Pandoc's native 
format.

Here is an example of the output in my terminal:
> pandoc -i myfile.md --to native
[Para [Image ("fig:myfigure",[],[]) [Str "Figure",Space,Str "1:",Space,Str 
"This",Space,Str "is",Space,Str "a",Space,Str "caption"] 
("generated/other\\8842295943125512100.jpg","fig:")]
,Para [Str "As",Space,Str "you",Space,Str "can",Space,Str "see",Space,Str 
"in",Space,Str "fig.\160\&1,",Space,Str "pandoc-crossref",Space,Str 
"is",Space,Str "compatible",Space,Str "with",Space,Str "the",Space,Str 
"ouput",Space,Str "of",Space,Str "pandoc-pyplot."]]

It would be very useful to get a pretty-printing version of the above, e.g.:

[
    Para [
        Image 
            ("fig:myfigure",[],[]) 
            [Str "Figure",Space,Str "1:",Space,Str "This",Space,Str 
"is",Space,Str "a",Space,Str "caption"] 
            ("generated/other\\8842295943125512100.jpg","fig:")
         ],
    Para [
        Str "As",Space,Str "you",Space,Str "can",Space,Str "see",Space,Str 
"in",Space,Str "fig.\160\&1,",Space,Str "pandoc-crossref",Space,
        Str "is",Space,Str "compatible",Space,Str "with",Space,Str 
"the",Space,Str "ouput",Space,Str "of",Space, Str "pandoc-pyplot."
         ]
]

After a cursory look at the source in Text.Pandoc.Writers.Native, it would 
be possible to make a nice, indented, pretty version of native Haskell, 
given that WriterOptions type has the writerColumns attribute.

Is this something that the Pandoc community might be interested in? Should 
it be a different format than "native", called "pretty-native" or something?

I'm happy to put together a pull request.

Laurent

-- 
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/6c1c4146-20b8-437a-878a-24c4ac915946%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2019-06-23 21:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-19 22:13 feature proposal: pretty printing of Native format Laurent René de Cotret
     [not found] ` <6c1c4146-20b8-437a-878a-24c4ac915946-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-06-20  0:39   ` Hans Kunkell
     [not found]     ` <c899bdb4-f441-43ef-a147-9109ee94a267-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-06-20 12:24       ` Laurent René de Cotret
2019-06-23 10:21   ` John MacFarlane
     [not found]     ` <m2tvcgr492.fsf-gd5emFPDCk19a1wB/4mvwEEMvNT87kid@public.gmane.org>
2019-06-23 21:10       ` Laurent René de Cotret

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