groff
[Top][All Lists]
Advanced

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

Re: [Groff] gropdf and pdfroff


From: Mike Bianchi
Subject: Re: [Groff] gropdf and pdfroff
Date: Fri, 29 Jul 2011 11:10:08 -0400
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Fair warning.  This started as a short "I agree" note, but ...


On Fri, Jul 29, 2011 at 04:12:40PM +0200, Werner LEMBERG wrote:
> >> My user opinion is that letting a postprocessor change the
> >> structure of a document is confusing.  I don't like pdfroff for
> >> this reason.  In my humble opinion, writing the table of content in
> >> the begining of a document is a job for a troff macro.
> > 
> > But this would require the somewhat non-standard way of using troff
> > in two passes.
> 
> Well, I think that multi-pass is the right way to go.  TeX is doing
> this since ages, cf. the `texi2dvi' script which handles this
> automatically.
> 
> Assuming the right macros have been written, it should be fairly
> trivial to adapt this script to groff.

I'm too busy to really get involved here, but something like texi2dvi is a
step in the right direction.  We have to remember that groff is just a tool in
a large set of text processing tools of the nroff/troff model.

Let me agree that two passes to generate Tables of Contents, etc. is the
correct answer, _especially_ if there is a tool to hide details, including the
extra pass(es).


And this got me thinking ...

As a *roff user since the mid-1970s I am all too aware that to be good at this
you have to know and _understand_ a lot of details about the document models
(as represented by the different macro collections: man, mm, mom, ms ...)
and the fundamental commands, registers, etc.  To do even the simplest document
requires much-too-much expertise for the rank beginner.

What is missing is a Front Door that leads you gently into the Castle, teaches
you the way through the rooms, closets and pantries, so you can live
comfortably there with what is present.  Then (and only then) should you be led
down into the basement and shown how the electric, water, heat and sewage
utilities work.  Finally you should go into the workshop and start building
your own mechanisms.

I worry that *roff is an old technology loved only by old people.
It won't survive much longer if it isn't loved by people much younger than me.


What could I do about that?


The other day I was thinking of creating, as a first step, a set of overlay
macros for things like groff_mm (my macro package of choice) to ease the burden
of learning and understanding it:

        .mm_AbstractStart  .AS
        .mm_AbstractEnd    .AE
        .mm_Approval       .AV
        .mm_AuthorsTitle   .AT
        .mm_Author         .AU
                :           :
        .mm_PageHeader     .PH
        .mm_PageHeaderExit .PX
        .mm_Paragraph      .P
        .mm_PictureStart   .PS
        .mm_PictureEnd     .PE
                :           :

That way one would not have to memorize quite as much trivial detail to
understand the document source you were reading, especially if you are a novice
(as we all were at one time).  Heck, I could use such a thing if I ever wanted
to transition to groff_mom.

The same could be done for raw *roff commands.  Registers would also be
handled.

Done right, the translation from the overlay macros to the originals, and back,
would be the simple matter of yet another tool.

Building such a thing might be a way to walk the path from groff novice to some
degree of expertise.


Comments?

--
 Mike Bianchi
 Foveal Systems

 address@hidden
 http://www.AutoAuditorium.com
 http://www.FovealMounts.com



reply via email to

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