[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Eric Raymond on groff and TeX
From: |
Anton Shepelev |
Subject: |
[Groff] Eric Raymond on groff and TeX |
Date: |
Thu, 3 May 2012 19:21:06 +0400 |
I accidently came upon what seems to me an unfair
judgement about groff and TeX:
As an example: In a presentation-markup lan-
guage, if you want to emphasize a word, you
might instruct the formatter to set it in
boldface. In troff(1) this would look like
so:
All your base
.B are
belong to us!
In a structural-markup language, you would
tell the formatter to emphasize the word:
All your base <emphasis>are</emphasis> belong to us!
The "<emphasis>" and </emphasis>in the line
above are called markup tags, or just tags
for short. They are the instructions to your
formatter.
In a structural-markup language, the physi-
cal appearance of the final document would
be controlled by a stylesheet . It is the
stylesheet that would tell the formatter
"render emphasis as a font change to bold-
face". One advantage of structural-markup
languages is that by changing a stylesheet
you can globally change the presentation of
the document (to use different fonts, for
example) without having to hack all the the
individual instances of (say) .B in the doc-
ument itself.
Source:
http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/x69.html
Should we, maybe, ask the author to correct it, for
I think, groff and TeX macro packages do provide a
means for structural mark-up, and, considering the
example above, it is of course possible to redefine
the macro .B to achieve the desired result? For
clarity, it could also be renamed as "EMPH".
In my understanding, a package provides both con-
structs for structural mark-up and means to modify
their underlying "presentation", and the one is very
loosely coupled with the other, allowing to change
"presentation" without affecting the "structure" and
vice versa...
Anton