groff
[Top][All Lists]
Advanced

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

RE: [Groff] Typesetting Software


From: Ted Harding
Subject: RE: [Groff] Typesetting Software
Date: Wed, 03 Jun 2009 10:04:18 +0100 (BST)

On 03-Jun-09 07:55:23, John¹ wrote:
> Many years ago, when type used to be set by hand, I was one of those
> who did the typesetting. I am now looking at the methodology of using
> either Groff or LaTex to produce print ready text. Can anyone briefly
> tell me if Groff does the same job as LaTex? 
> 
> Obviously there will be a bias in asking this group but does one have
> an advantage over the other?
> -- 
> John Seago
> GNU/Linux Registered User No. #219566 http://counter.li.org/
> ()  ascii ribbon campaign - against html mail
> /\                        - against microsoft attachments

Groff does a very similar job to LaTeX (or, more precisely, TeX: LaTeX
is built upon TeX -- I think the "La" refers to the "La" in Leslie
Lamport who first implemented it -- and especially concentrates on
typesetting for mathematical, scientific and technical documents).
LaTeX originated in the 1980s, and began to become widely used in
the 1990s. On the other hand, groff (more precisely troff, groff's
predecessor) dates back to the early 1970s.

Usage of both groff and LaTeX is based on the same principles: The user
prepares a plain-text "source" document, which contains both actual
text intended to be printed, and "markup tags" which define how it
is to be printed. Also, additional resources allow objects (such as
graphs and diagrams) to be defined by entering plain-text "descriptions"
of these).

As to comparison of usage, TeX was optimised from the start for the
typesetting of mathematical and computer-science material by its
original creator Donald Knuth. On the other hand, groff was originally
more general-purpose, but very quickly developed utilities allowing
the specification of equations, tables, diagrams, the inclusion of
external graphics, etc. LaTeX relies on a very extensive repertoire
of macros which are pulled in as required by the typesetter. Groff
makes extensive use of "pre-processors" which recognise plain-English
"descriptions" embedded in the source, translate these into raw troff
commands, and interpolate these into the text which is sent to the
typesetter (troff); this is done before troff sees the source.

Preferences as to which is "better" to use of course vary from user
to user. My personal preference is for groff: I find LaTeX markup
to be cumbersome and voluminous, while groff's is compact and terse.

As to which "does the better job", the answer probably is "both"!
I can speak more for groff than for LaTeX. In principle, with groff
any set of completely arbitrary marks can be placed in any positions
whatever on the page, entirely under the user's precise control
(positioning for PostScript output can be specified to fractions
of 1/72000 of an inch, i.e. fractions of a milli-point, a precision
which is irrelevant for printing on paper but can be relevant for
outputting the copy onto photographic film). Therefore, anything
which LaTeX can do, groff can do. And the converse is probably true
as well. Groff and LaTeX differ in what "arbitrary marks" are built-in;
which one has the advantage in  respect  on your needs.

The major difference between groff and TeX (therefore LaTeX) is in
how they organise the layout. Groff, in the first instance, creates
its output line-by-line: it reads in sufficient source to decide
how it is going to lay out a single printed line (possibly plus
a bit which will get carried over to the next line), processes that,
outputs one typeset line, and then moves on to processing the next.
TeX is designed to (in effect) typeset a whole page, by whole paragraphs,
and overall cosmetic features such as line-breaks, hyphenation,
"rivers", etc. are (more or less) optimised globally. This, along
with TeX's sophisticated layout-optimisation algorithm, probably
does amount to a specific aspect in which TeX is better than groff.

However, groff's mechanism of "diversions" can be used to emulate the
way TeX does things. But diversions can be somewhat "mind-bending",
and many users will prefer to keep an eye on quasi-WYSIWYG output,
amending the input in detail to adjust the appearance of the output.
This, of course, is much closer to traditional typesetting with blocks
of type, and leading to adjust spacings (together with readiness to
change e.g. the wording of what is written if that would help the layout).

I'm sure others on this list (who have much more experience of using
TeX/LaTeX than I have) can comment better than I am able to.

One thing I would say (though I could be wrong about it on the TeX
front) is that I think it it is much easier to change the details
of how groff handles a formatting task than it is with TeX/LaTeX:
the nuts and bolts of how groff works are closer to the surface
than they are with TeX.

In summary, as a user of troff since the early 1980s and later of groff,
I have been happily (and for the most part easily) producing many dozens
of documents a year with groff. The only thing I would say is that over
all these years I have been doing a lot of learning about how to use
groff (and developing a lot of my own macros and procedures), and am
able to call on that without having to start from scratch to find out
how to do some particular tricky job. For a beginner with groff, there
is a lot to learn (and some of it is not obvious) before one is
proficient.

On the other hand, my impression of LaTeX in my limited encounters
with it is that it has its own daunting learning-curve too. But I'm
not qualified to compare them in any detail, owing to lack of TeX
experience.

Hoping this helps,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 03-Jun-09                                       Time: 10:04:15
------------------------------ XFMail ------------------------------




reply via email to

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