Post by HoomanThere isn't anything that bothers per se. The question was just out of
curiosity. The problem that gets me thinking recently is the ability
of LaTeX to generate outputs suitable for different mediums. TeX and
friends are designed to be paper friendly; the output is beautiful
printed document even if the user does not know much about TeX and its
internal structure (I am one of them).
It gets more important everyday to have the ability to generate more
than one form of output. Generation of HTML is not straightforward
from LaTeX or TeX source and even after generating the HTML, the
output is not nearly as beautiful as PDF output. These questions got
me thinking about the problems that impede TeX from generating
different types of output natively, and with relative ease.
The big problem with HTML is that it is not really designed for the
sorts of documents that LaTeX is meant to produce. The print medium and
the 'screen' medium are really very different. TeX is a typesetting
engine and LaTeX is the typographical design layer added on top of TeX.
Typesetting *implies* a concrete printed result. HTML is meant to be a
far 'looser' markup system, that allows for widely varying output
screens -- it is *designed* to ajdust the output for *any* screen size,
resolution, color space, etc. and to work with a limited set of fonts
(often ones chosen by the *viewer* and NOT the author or typographical
designer. The author / typographical designer is not in a real position
to impose any sort of concrete design for a webpage (HTML). Instead,
what a web designer does (if he/she is doing things properly) is
creating a rather fluid design/markup that will adapt itself to the web
browser's / client system setup (in terms of the screen size,
resolution, color space, font selection, etc. available).
With reguard to using \begin{section}...\end{section}, the question
becomes, what happens to text between section groups? The implication
is that this text is not part of a section, which does not really make
sense. 'sections' are not really a markup entity. section *headings*
are. So what really would make sense would be:
\begin{sectionheading}This is a section heading \end{sectionheading}
(Think of 'sectionheading' as really being like a flavor of the HTML H tags:
<H2>This is a section heading</H2>
And
\section{heading}
really maps to somerthing on the order of:
<H2>heading</H2>
In the LaTeX world, creating an environment for a short chunk of text is
not usually done.
Post by HoomanAre there provisions in LaTeX3 regarding generation of XML, HTML, or
other formats?
Post by David KastrupPost by Joseph WrightPost by Philipp StephaniPost by HoomanThis might be a silly question, but I was wondering when LaTeX was
originally written, why the sectioning commands are not defined as
usual environments. Thinking in the line of XHTML, it would have bee=
n
Post by David KastrupPost by Joseph WrightPost by Philipp StephaniPost by Hoomaneasier to parse LaTeX markup to other markup languages, had it been
written in a more consistent way. Is there a technical reason on doi=
ng
Post by David KastrupPost by Joseph WrightPost by Philipp StephaniPost by Hoomanthis, or it was just saving on the amount of typing one has to do.
LaTeX doesn't really distinguish between commands and environments, so
\documentclass{article}
\begin{document}
\begin{section}{section heading}
=A0 =A0contents of the section
\end{section}
\end{document}
The main difference between this and the "usual" way is that
environments form groups, so assignments would be restored at the end =
of
Post by David KastrupPost by Joseph WrightPost by Philipp Stephanithe environment. Thus the global values have to be placed on the save
stack, which takes away a certain amount of memory. Furthermore, LaTeX
generally seems to avoid large and deeply nested environments as a
design principle.
Don't forget that environments are also TeX groups, which can be
important. (I'd point out that this type of thing is bound to come up
as the LaTeX3 project move forward.)
Not to mention that they form groups.
--
David Kastrup
UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
***@deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/