[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Markdown to MOM Using Pandoc
From: |
Peter Schaffter |
Subject: |
Re: [Groff] Markdown to MOM Using Pandoc |
Date: |
Fri, 25 Jul 2014 16:43:07 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Jul 25, 2014, Yves Cloutier wrote:
> Note that what I am generating are elements as defined by Peter's MOM
> Macros - not pure troff/groff.
>
> So in a sense, the "second pass", as you describe (and if I understood it
> correctly) is automated by the Markdown->MOM writer script.
>
> You write plain text, in Markdown, using very minimal tags, which then get
> replaced by the corresponding MOM macros in the resulting document that it
> produced.
I think Yves is going at this the right way. KISS: choose a
macroset (doesn't have to be mom), make markdown parsable into that
macroset, and steer clear of low-level groff requests and escapes.
Markdown is intended to make sense of a file semantically, not
typographically. If you start throwing a lot of bells and whistles
at it, you lose the point, which is to keep writing content simple.
Myself, I use sed scripts to accomplish exactly what Yves is
envisaging. No low-level groff stuff gets added other than
pre-pending \& to lines that start with a period or the ' character.
My workflow is "write, convert, tweak", and it's both efficient
and enjoyable.
--
Peter Schaffter
http://www.schaffter.ca