groff
[Top][All Lists]
Advanced

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

Re: [groff] Design and Implementation of *roff


From: John Gardner
Subject: Re: [groff] Design and Implementation of *roff
Date: Sat, 1 Dec 2018 22:59:47 +1100

> Well, Ali Golhami Rudi made it a few years ago... Reimplementing a Troff
> is a task people can do if they have reasons to do so.

Well, I assume his reasons were to have a Troff variant which supported
right-to-left languages (which, if you think about it, is a pretty glaring
oversight in a typesetting system...) Ali also has tonnes of other
non-trivial projects, so his patience is obviously in greater reserves than
most mortals.

But I've seen other attempts to reimplement *roff which never got very far.
They basically end up like this <https://github.com/roperzh/jroff>:
case-specific, with partial-support for low-level roff(1) requests and
focussing mainly on man-page generation.

I won't lie, I've been tempted to try a purely JavaScript-based Troff
implementation myself. But then I remember I'd need to contend with \c,
.ec, .cc, .c2 and .eo eventually, and my blood runs cold at trying to
manage all those cryptic features while handling recursive/nested macro
definitions, position-dependent traps and diversions, and those goddamn
environments...

I actually love these irregularities about Roff, don't get me wrong. Not
only are they abusable in all sorts of creative, twisted ways, they also
elevate my respect for the folks who had to implement them in raw assembly
in an era when computers had less processing power than my microwave...
*salutes Osanna*



On Sat, 1 Dec 2018 at 22:42, Pierre-Jean Fichet <
address@hidden> wrote:

> John Gardner <address@hidden> wrote:
> > Reimplementing Troff is a task best not attempted at all.
>
> Well, Ali Golhami Rudi made it a few years ago... Reimplementing a Troff
> is a task people can do if they have reasons to do so.
>
>
> > On Sat, 1 Dec 2018 at 02:37, Yves Cloutier <address@hidden>
> wrote:
> > > I'm in search of any documentation that provides insight into the
> design
> > > and implementation of a *roff.
> > >
> > > I know source code exists for a few implementations like Plan 9,
> Heirloom,
> > > Groff and Neatroff.
> > >
> > > However what I'm in search of is something a bit more high-level than
> > > source code. Rather some design/implementation documentation that
> explains
> > > an *approach* to implementing a *roff.
>
> Althought it's still source code, I'd advise looking at Neatroff
> sources: it is, as far as I can judge, clean, small, and easier to
> understand than the other troff sources I looked at.
>
> It also contains features that worth being considered today: paragraph at
> once adjustment and right to left scriptures.
>
> Here it is: https://github.com/aligrudi/neatroff
>
>
> Kind regards,
> Pierre-Jean.
>
>
>


reply via email to

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