}" almost directly.
\end{ol}
\p
Another optional way, available for some \html elements (depending
on the formal definition of the \html language) is that used for the
paragraphs (the \q{p} elements) of this document. This method relies on
the language definition for the automatic determination of the end of
the element's content. In \html, for example, a paragraph is
automatically terminated by the appearance of any number of elements
including a (new) paragraph, a list, a table, and a header.
\h3{Elements Defined as Empty}
\p
Some \html elements are defined as empty elements in the formal
definition of \html. The element \q{hr} for a \em{horizontal rule}
is an example. In the \gellmu markup interface for \html, one writes
"\kbd{\\hr;}".
\p
The usage above is not correct for SGML elements that are not
defined as empty, but, when consistent with the formal language
definition, happen to be empty in a particular instance. Depending on
whether \kbd{OMITTAG} is available in the SGML language (but never in
XML) and further whether its use is appropriate for the particular
container, one might be able to use the brief markup "\kbd{\\foo}" but
always may use "\kbd{\\foo\{\}}" or "\kbd{\\foo\\foo:}". In \html,
for example, an empty paragraph may be indicated with "\kbd{\\p}" if it
is followed without content by something that forces a paragraph to
end, but an empty title must be written as "\kbd{\\title\{\}}" or as
"\kbd{\\title\\title:}".
\p
\em{A Minor Point:} By default the markup "\kbd{\\foo;}" is
translated to "\kbd{}" since this is both correct and required
for a element that is defined empty in any XML language and is correct
and \q{preferred} in the default \gellmu language for LaTeX
emulation. It is not correct for use with classical SGML languages
such as \html (as opposed to \acronym{XHTML}); the \elisp variable
\kbd{gellmu-sgml-emptytag-close} is a string variable that has the
default value "\kbd{/>}", but may easily be reset to "\kbd{>}", and
must be reset to "\kbd{>}" for use with classical \html. This may be
done either interactively within Emacs using
\pre{
M-: (setq gellmu-sgml-emptytag-close ">")
}
\p
or otherwise placed in a batch file that is used to launch the
\gellmu syntactic translator.
\h3{Certain Characters}
\begin{table}[align="center"]
\tr\th{Name} \thc{Appearance } \thc{ Markup}
\tr\td{Backslash} \tdc{\kbd{\\}} \tdc{\kbd{\\\\}}
\tr\td{Left brace} \tdc{\kbd{\{}} \tdc{\kbd{\\\{}}
\tr\td{Right brace} \tdc{\kbd{\}}} \tdc{\kbd{\\\}}}
\tr\td{Percent} \tdc{\kbd{\%}} \tdc{\kbd{\\\%}}
\tr\td{Ampersand} \tdc{\kbd{\&}} \tdc{\kbd{\\&}} \td{(\kbd{&} is often OK)}
\tr\td{Less than} \tdc{\kbd{}} \tdc{\kbd{>}}
\tr\td{Left bracket} \tdc{\kbd{[}} \tdc{\kbd{[}}
\tr\td{Right bracket}\tdc{\kbd{]}} \tdc{\kbd{]}}
\end{table}
\p
Note that in LaTeX itself the markup "\kbd{\\\\}" signifies a forced
linebreak. In \html, however, the empty tag "\kbd{}" is used to
make a linebreak. With this method of making \html one uses
"\kbd{\\br;}" to signify the \html tag "\kbd{}" and one doubles
the LaTeX-like command sequence introducer, i.e., the character
"\kbd{\\}", to \q{escape} the command sequence introducer.
\p
Usage of markup for the characters \em{backslash}, the
LaTeX-like command sequence introducer, and \em{ampersand},
the \html entity introducer, is illustrated by using the markup
"\kbd{\\\\foo}" to create for \html a reference to the TeX command
"\kbd{\\foo}" and the markup "\kbd{R\\\&R}" to create the abbreviated
phrase \q{R\&R} when the special character is not immediately followed
by a word boundary.
\h3{Attributes}
\p
Any \html element may have a list of one or more attributes. For
example, the \q{h1} element at the beginning of this document has the
attribute \q{align}, which is given the value \q{center}.
\p
An attribute list is introduced by the character "\kbd{[}" immediately
following the element name and terminated by the character "\kbd{]}".
There may be any number of attributes in an attribute list in
accordance with the specification for the particular element in the
formal definition of \html.
\h3{\html Anchors}
\p
Anyone familiar with \html knows that the element \q{a} signifies
an \html anchor. Here is an anchor to the \href{#top}{top of this
document}. And here is an (external) anchor to the
\display{\href{http://www.albany.edu/~hammond/gellmu/}{\gellmu
web site}.}
\h3{SGML Languages other than \html}
\p
SGML languages other than \html may be treated the same way once the
author is familiar with the tag names and the rules for their
deployment.
\p
One may use standard SGML entity notation directly. For example,
"\kbd{\>}" is an alternative way to write the character \q{>} in
\html.
\h3{XML Languages} \p
XML languages are special instances of SGML
languages.
\p
There are several important restrictions with XML.
\begin{ol}
\li All element names are case-sensitive.
\li Only the three \em{basic} methods of writing a element, other than
an element that is defined as empty in the language definition, may be
used. That is, the precise opening and closing points for every
container is required.
\li Every defined-empty element must be written in the form
"\kbd{\\foo;}".
\li Every attribute value must be quoted.
\end{ol}
\h3{LaTeX Emulation}
\p
LaTeX emulation in an SGML (or XML) language is a very different
thing than the use of LaTeX-like syntax to write in SGML.
\p
The original idea in the \gellmu project of using LaTeX-like syntax
for writing in an SGML language envisioned its use primarily with an
SGML language that includes reasonably full markup for research-level
mathematical and scientific articles, rich enough, as \html is not, to
admit useful and fully reliable automatic creation of LaTeX
source and source for other standard formats including \html (necessarily
with crude representation of mathematics in \html).
In that context it makes
sense to ask for additional services from the syntactic translator
in the way of LaTeX emulation, still, however, with the goal of
obtaining a valid document in the SGML language.
\p
By default the \gellmu syntactic translator runs in LaTeX emulation
mode. This incorporates a number of LaTeX-like features that do
not apply in the case of its basic mode.
\p
It is easy either interactively within Emacs or in a batch file to
effect the emacs command \pre{
M-: (setq gellmu-straight-sgml t)
}
for using LaTeX-like syntax to write in regular SGML (or XML)
vocabularies such as \em{\html}, \em{TEI}, or \em{DocBook}. Other
variable settings permit the use of blank lines for
new paragraphs under certain circumstances.
\p
Because SGML attributes are not part of LaTeX, in LaTeX emulation
(with \kbd{gellmu-regular-sgml} set to \kbd{nil}) the \gellmu syntactic
translator reserves the characters "\kbd{[}" and "\kbd{]}" for
LaTeX-like command options and an attribute list is introduced as an
option immediately after the command name inside which the first
character is the character "\kbd{:}".
\p
\href{http://www.albany.edu/~hammond/gellmu/}{UP} |
\href{http://math.albany.edu/~hammond/}{Author}
\p
Last change: 10-Jan-2006
\end{body}