LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
"William F. Hammond" <[log in to unmask]>
Date:
Thu, 26 Nov 1998 13:14:18 -0500
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
text/plain (177 lines)
Sebastian writes:

: my apologies. you ARE right about this. though I could and would argue
: that people who spend 3 days tarting up the look of their grant
: proposal don't deserve the grant :-}

\ironic{Ummm... is Sebastian displeased with the current fad of PDF
as an exchange format for grants?  \quotestr{;-\} }

: . . .
:
:  > If someone now says why not SGML then: The advantage of LaTeX from the
:  > author's point of view is that it is a single platform for authoring,
:  > typesetting and document exchange (where, I believe, the problems can
: ah, but see  above. is it *so* much harder to type

Now we come to what is, but for trivial transliteration, a matter of
personal preference:

:  <documentclass name="article/>
:  <usepackage name="amsmath"/>

amsmath for this?  ;-{

:  <document>
:  <section>Introduction</section>
:   <math>a+<sqrt>3</sqrt></math> <!-- or <tex>a+\sqrt{3}</tex> -->
:  This is <emph>fun</emph>
:  </document>

This could as well be:

\documenttype{article}
\title{} % Isn't title formally required by "article" in sebastian.dtd?
\begin{document}
\section{Introduction}

$a + \sqrt{3}$ % or ...
This is \emph{fun}
\end{document}

If I run this markup through my elisp, I get the following sgml:

<!DOCTYPE article SYSTEM "gellmu.dtd"><article><preamble>
<title></title> <cs0/
</preamble><body>
<section>Introduction</section>
<parb>
<tmath>a + <sqrt>3</sqrt></tmath> <cs0/
This is <emph>fun</emph>
</body>
</article>

If I run this sgml through my sgml processor for the target "Lamport
LaTeX", I get the following, most of which is boiler plate based on
personal preferences, some of which is unused in this instance:

% LaTeX
\documentclass{article}
\setlength{\parindent}{6bp}
\setlength{\topmargin}{0bp}
\setlength{\headheight}{0bp}
\setlength{\headsep}{0bp}
\setlength{\oddsidemargin}{0bp}
\setlength{\evensidemargin}{0bp}
\setlength{\textwidth}{468bp}
\setlength{\textheight}{624bp}
\setlength{\parskip}{6bp}
\thispagestyle{empty}
\title{}
 %cs0
\newcommand{\hsf}{\hspace*{\fill}}
\newcommand{\tdbc}[1]{\hsf{\bf #1}\hsf}
\newenvironment{menulist}{
\begin{list}{}{
\setlength{\topsep}{0bp}
\setlength{\labelwidth}{0bp}
\setlength{\leftmargin}{2\parindent}
\setlength{\itemindent}{0bp}
\setlength{\itemsep}{0bp}
\setlength{\parsep}{0bp}}
}{\end{list}}
\newenvironment{citations}{
\begin{list}{}{
\setlength{\topsep}{0bp}
\setlength{\labelwidth}{0bp}
\setlength{\leftmargin}{24bp}
\setlength{\labelsep}{0bp}
\setlength{\itemindent}{-24bp}
\setlength{\itemsep}{3bp}
\setlength{\parsep}{0bp}}
}{\end{list}}
\begin{document}
\begin{center}\LARGE\bf

\end{center}

\medskip
\section{Introduction}
\par{\(a + \sqrt{3}\)  %cs0
This is \emph{fun}
}


\bigskip

[Processed from GELLMU to \LaTeX{} on Thu Nov 26 12:16:37 EST 1998]
\end{document}

(The empty "center" is for an article title.)

If I run the sgml through my sgml processor for the target "HTML",
I get, again with personal boiler plate:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<link rev=made href="mailto:[log in to unmask]">
<title>A GELLMU Demonstration</title>
</head>
<body bgcolor="#ffffff" text="#000000"
link="#0000ee" vlink="#0000bb" alink="#ff0000">
<h1 align=center></h1>

<h3 align=center>1.  Introduction</h3>

<p>
a + SQRT{3}
This is <em>fun</em></p>
<hr>
<a href="http://math.albany.edu:8000/math/pers/hammond/">AUTHOR</a>
&nbsp;|&nbsp;
<a href="mailto:[log in to unmask]">COMMENT</a>
<br>&nbsp;<br>
[Processed from <a href="http://math.albany.edu:8000/math/pers/hammond/igl.html">GELLMU</a> to HTML: Thu Nov 26 12:16:35 EST 1998]
</body>
</html>

(Under "gellmu.dtd" there is a "surtitle" that is translated here for
HTML as the HTML "title" with a default value in my sgml processor that
is shown above; a GELLMU "title" is translated by this processor for
HTML as the first "H1" header.)

(Yes, there is a control of front matter unless you don't want it.)

The main idea is that this type of markup is amenable to robust
processing toward *any* target once an sgml processor for that target
is created.  Creating such a processor can be as easy as writing a
Perl function for each tag; that might even be easier than writing a
"style".

Note that this approach is different from that of James Clark's "jade"
which "centralizes" style for all "backends" using a DSSSL stylesheet
for each document type.  In the example above there is only a single
document type "article" at hand.

(The issue between my approach and that of "jade" *may* be how fussy
an author or publisher wishes to be.  (What may be good enough for
"government work" *may* not be good enough for "elitist work".)  Note
that one of the possible outputs for jade is another sgml.  It might
make sense in my view to go part of the way with jade and then from
there split off for different targets.  Many options exist.)

It would be easy to write a processor to convert the sgml to xml.
(Some may be already out there, but I have no present need for that.)

(Would someone like to write a processor for (a) plain TeX?
(b) Texinfo?  (c) text/x-yahoo-catalog?)

For a processor to render sanely to MathML without much guessing (some
guessing may be more reasonable than other guessing) some clues about
notational meaning will need to be entered.  Has anybody read my
drafty draft on "mathexpr" (cf. "regexp") at the url
http://www.albany.edu/~hammond/gellmu/notation  ? ? ?

                                   -- Bill

ATOM RSS1 RSS2