groff
[Top][All Lists]
Advanced

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

Re: [Groff] troff syntax and useability


From: David Given
Subject: Re: [Groff] troff syntax and useability
Date: 27 Aug 2002 18:59:12 +0100

On Tue, 2002-08-27 at 13:36, Rob Scovell wrote:
> I am going to ask a radical question here. This is not because I want to 
> stir a fight between purists and pragmatists. It is a genuine question. I 
> also do not want to denigrate what you guys are doing.
> 
> troff syntax is horribly terse. The macros are better, but not that much 
> better, IMHO. I am not a regular troff user but I like what it does and 
> would like to use it more than I do for the almost total control it gives 
> you over layout.

I agree.

The troff command set uses two character commands for, I believe, three
main reasons: the first version of troff had so few commands that two
characters were all that were needed; each command could be processed in
a sixteen-bit word, thus avoiding the need to do string comparisons; and
troff grew organically, and wasn't designed as a whole, so that a lot of
the commands were shoe-horned into the gaps between other commands. Oh,
yes, and all the initial users were Unix users who were used to really
steep learning curves.

I wrote my meta macro package because I couldn't cope with the troff
command set, and none of the other macro packages out there were at all
useable. The richest macro set is mom, and even that seems to be rooted
in the 80s (no offense meant! mom is still loads better than meta).

meta was designed to completely wrap the details of troff markup. The
goal was to be able to give it a document in plain ASCII, newlines
between paragraphs, and it would Just Work. I wanted it to be able to do
_underlining_ and *italics* automatically, too, but I don't think those
are on the cards without a preprocessor.

(The reason why I've stuck with troff is that it's got an incredibly
sexy set of input filters. tbl! eqn! pic! tbl! grap! [Although the names
*do* seem to have been inspired by Pinky...] When dealing with *real
world text*, troff plus these input filters plus some basic scripting
can do some of the most amazing things. The output quality is excellent,
too, beating most word processing programs into a cocked hat.)

[...]
> If my aim is to produce postscript, why should I have to start with 
> something that is more difficult than postscript?

Hey, at least troff does text reflow for you...

[...]
> But the worst problem is this -- it's not much *fun*.

I must admit that while the macro stuff was easy enough to cope with, I
did have big problems when doing _meta_ with the expression and variable
syntax. \n[...] is just *so ugly*. String variables and macros sharing
the same namespace is *so ugly*. Variables carrying around their types
as implicit multipliers which get factored in at non-obvious moments is
*so ugly*. Not being able to control when expressions get evaluated is
*so ugly*. A lot of the time when something weird happened I would have
to resort to randomly frobbing stuff until it went away, and that is *so
ugly*. I still haven't made sense of diversions (what do they store?
Unmarked-up text --- but if so, how do you know how big a diversion is
going to be? Marked up text --- but then how is it flowed in with
existing text when the diversion is instantiated?).

In fact, if it wasn't so much work, I'd be strongly tempted just to
throw it all away and start again with a typesetting language that makes
sense, and then do a troff input filter for backwards compatibility...

-- 
+- David Given --McQ-+ "Est brilgum: toui slimici
|  address@hidden    | In uabo tererotitant
| (address@hidden) | Brogoui sunt macresculi
+- www.cowlark.com --+ Momi rasti strugitant." --- Anonymous

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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