groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Markdown to MOM Using Pandoc


From: James K. Lowden
Subject: Re: [Groff] Markdown to MOM Using Pandoc
Date: Wed, 23 Jul 2014 19:51:36 -0400

On Wed, 23 Jul 2014 16:14:55 -0400
Yves Cloutier <address@hidden> wrote:

> <https://github.com/cloutiy/markdown-to-mom#the-plan>The Plan

As a groff fan, I find this idea attractive.  Not because I'd use it,
but because it could make make Markdown more functional and groff more
approachable.  

If I might offer a suggestion, take a page out of pic and grap: think
of your program as a preprocessor, and allow lines starting with a dot
to pass through transparently.  If you take pains to look for certain
pairs such as .TS/.TE, your user could embed troff requests and
intersperse other preprocessor code within a Markdown document.  

I'm sure you understand the advantages.  Among others, it would give
the Markdown access to eqn.  AIUI the Markdown alternative for
equations is embedded LaTeX.  I'd think the last thing anyone wants is
a document processed by two typesetters!  

> Right now I have hardcoded some default values into the script that
> generates the MOM code, but the idea will be that all those settings
> that relate to HOW you want your document to look (like page size,
> margins, heading styles) would be specified in a separate file, like
> a stylesheet, which you can specifiy to use when the document being
> compiled. This would allow for easily changing the look of your
> document simply by specifying a different "stylesheet".

Do you use stylesheets for documents?  I've been writing on a computer
since the days of Wordstar, and never felt the need.  I think most
people rely on the defaults and adjust them as needed, per-document.  

In any case, groff already has conditional processing and the .so
request.  A stylesheet, if that's what's wanted, can be contructed from
them.  In conjunction with the \V escape, the stylesheet could be
included based on the value of an environment variable.  

--jkl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]