groff
[Top][All Lists]
Advanced

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

Re: [Groff] troff syntax and useability


From: Werner LEMBERG
Subject: Re: [Groff] troff syntax and useability
Date: Wed, 04 Sep 2002 23:37:40 +0200 (CEST)

> 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 latter two aren't possible currently, but I will investigate
whether I can improve the situation; this is, making

  .nr emphasis 0
  .ds emphasis1 \f[B]
  .ds emphasis0 \f[]
  .char _ \R'emphasis (1 - \\n[emphasis])'\\*[emphasis\\n[emphasis]]
  This is _emphasized_ text.

work.

> \n[...] is just *so ugly*.

That's groff.

> String variables and macros sharing the same namespace is *so ugly*.

Strings, macros, and diversion are basically the same in groff (see
the section `groff internals' in groff.texinfo for more information),
so it makes sense to have a common namespace.  Use prefixes.

> Variables carrying around their types as implicit multipliers which
> get factored in at non-obvious moments is *so ugly*.

I fully agree.  *Always* use a scale indicator.

> Not being able to control when expressions get evaluated is *so
> ugly*.

They are always expanded immediately.  Preventing expansion is
sometimes difficult.

> 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*.

trace.tmac can help here.

> 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?).

Diversions (normally) store *formatted* text: The whitespace is no
longer stretchable, and input characters have already been converted
to glyph nodes, carrying size and font information.


    Werner

reply via email to

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