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