Article View: news.software.readers
Article #250164Re: HTML (XHTML) in netnews
From: Anton Shepelev
Date: Thu, 03 May 2012 14:28
Date: Thu, 03 May 2012 14:28
116 lines
5939 bytes
5939 bytes
Ivan Shmakov,
I have too little time to give a fuller answer, so for now I
have commented on what's most interesting to me:
> For the second argument, I'd refer to Eric Raymond's
> "DocBook Demystification HOWTO":
>
> --cut: http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/intro.html --
> [Е] The advocates of XML-based "structural markup" (as opposed to
> the older style of "presentation markup" exemplified by troff, Tex,
> and Texinfo) seem to have won the theoretical battle. [Е]
> --cut: http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/intro.html --
I have looked into what that FAQ calls structural and
presentational markup, and I must say its author is plain
wrong about groff and (La)TeX, although he seems to be
correct about DocBook, probably because he knows it better:
As an example: In a presentation-markup language, 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 physical
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
boldface". 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 document itself.
Both LaTeX, a macro package for TeX, and a majority of groff
macro packages are structured markup languages, in which a
document is defined in terms of its structure (title, TOC,
abstract, headers and subheaders, lists, references and
indexes...), while the "presentation" (i.e. the formatting)
of these structural elements depends upon the underlying
macro package, so one can reformat the same document just by
switching changing the implementation of a macro or swithing
to another macro package with a compatible interface.
Many packages for both *roff and TeX provide provide means
for deep customization of the "presentation", which can be
effected without changing the "structure" (i.e the
document's source). This is called separation of concerns.
Both TeX and roff are low-level typesetting languages that
are presentation-oriented, but they are used as basis for
high-level structured mark-up languages implemented in what
is called macro packages. Just open up any LaTeX tutorial
and you'll see structured mark-up at work:
http://tinyurl.com/7obyloe
(a PDF document)
(see section 2.1)
As for groff, see, for example, the documentation to the mom
macro package:
http://www.schaffter.ca/mom/mom-01.html
and especially this little section describing just what Eric
Raymond says groff and TeX can't do:
http://www.schaffter.ca/mom/mom-02.html#global
It is actually a feature that both LaTeX and groff are proud
of. I don't know whether it is due to ignorance or bad
intent that Eric Raynolds has published such disinformation.
The groff example I will explain in more detail.
All your base
.B are
belong to us!
The roff language has no .B request, but many of its macro
packages do have such a macro. The package implementor or
user may (re)define this macro however he wants, and even
may have several alternative definitions at the same time,
so that the active one will depend on the environment,
context, e.t.c. or explicitly specified in a macro call.
Similarly, you could define an .EMPH macro and use it just
as the author describes.
In other words, roughly:
-- roff and TeX correspond to the rendering engine and
interpreter
-- the interface of a macro package corresponds to a
structured markup language
-- the settings of a macro package correspond to a style
sheet.
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Technical Details
Message-ID:
<20120503182848.b522c931809e08a984cc1962@g{oogle}mail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mailReferences:
<jncak8$cla$2@dont-email.me> <86pqatbycz.fsf@gray.siamics.net> <20120428114426.6b653c88434e8c4d2afa8761@g{oogle}mail.com> <864ns2abjk.fsf@gray.siamics.net> <jnk989$hki$1@dont-email.me> <86pqap93c8.fsf_-_@gray.siamics.net> <jnn2ni$8tm$1@dont-email.me> <86bom568bc.fsf@gray.siamics.net>Show Full Headers
Complete Article Headers
Message-ID: <20120503182848.b522c931809e08a984cc1962@g{oogle}mail.com>
Subject: Re: HTML (XHTML) in netnews
Date: Thu, 3 May 2012 18:28:48 +0400
From: Anton Shepelev <anton.txt@g{oogle}mail.com>
References: <jncak8$cla$2@dont-email.me> <86pqatbycz.fsf@gray.siamics.net> <20120428114426.6b653c88434e8c4d2afa8761@g{oogle}mail.com> <864ns2abjk.fsf@gray.siamics.net> <jnk989$hki$1@dont-email.me> <86pqap93c8.fsf_-_@gray.siamics.net> <jnn2ni$8tm$1@dont-email.me> <86bom568bc.fsf@gray.siamics.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
Newsgroups: news.misc,news.software.readers
Organization: A noiseless patient Spider
Lines: 116
Mime-Version: 1.0
Content-Type: text/plain; charset=Windows-1251
Content-Transfer-Encoding: 8bit
Injection-Info: mx04.eternal-september.org;
posting-host="Wy7Sn2l30zIz2NkfeZPjBQ";
logging-data="22989"; mail-complaints-to="abuse@eternal-september.org";
posting-account="U2FsdGVkX1/dtiUGXAp0UXDlpAnkX4b5L+EXFj0GXwM="
X-Newsreader: Sylpheed 3.2.0beta5 (GTK+ 2.10.14; i686-pc-mingw32)
Cancel-Lock: sha1:oBP3Zipel19/vfKWYyhqEky0qt0=