🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.iso
Article #320

Re: ODA applications

#320
From: Guy Streeter
Date: Wed, 18 Oct 1989 16:03
88 lines
3894 bytes
brian@ditmela.oz (Brian May) writes:
>(on TeX -> ODA -> TeX translation)
>>guy@guy.uucp (Guy Streeter) writes:
>> I don't quite see the point.  ODA is not a markup language.  There isn't
>> necessarily enough information even in the TeX input to make useful ODA
>> input.  LaTeX source might be translated a little easier.
> 
>Does TeX not define Title, headers, footers, paras, etc?  Of course it does. 
>I am a newcomer to ODA, and gave TeX as an example.  If there are reasons why 
>ODA is over the top for this purpose, please explain them properly. 
> 

TeX source input can use macros to define headers, footers, etc., but it
isn't required.  Vanilla LaTeX source input is much closer to this idea.
In either case the device-independent output of TeX has nothing even
closely resembling document architecture information.

Here is an example. First, an excerpt of the famous "sample.tex" file,
a LaTeX source input file:
================================================================
% This is a sample LaTeX input file.  (Version of 9 April 1986)
%
% A '%' character causes TeX to ignore all remaining text on the line,
% and is used for comments like this one.

\documentstyle{article}    % Specifies the document style.

                           % The preamble begins here.
\title{A Sample Document}  % Declares the document's title.
\author{Leslie Lamport}    % Declares the author's name.
\date{December 12, 1984}   % Deleting this command produces today's date.

\begin{document}           % End of preamble and beginning of text.

\maketitle                 % Produces the title.

This is a sample input file.  Comparing it with the output it
generates can show you how to produce a simple document of
your own.

\section{Ordinary Text}  % Produces section heading.  Lower-level
                                    % sections are begun with similar 
                                    % \subsection and \subsubsection commands.

The ends  of words and sentences are marked 
  by   spaces. It  doesn't matter how many 
spaces    you type; one is as good as 100.  The
end of   a line counts as a space.

One   or more   blank lines denote the  end 
of  a paragraph.  

(... the rest deleted ...)
================================================================
As you can see, plain LaTeX input specifies the architecture of a document.
The only problems you have here is when the writer escapes to TeX and/or
defines his own macros to affect his output in ways that are transparent
to LaTeX.  This is perfectly reasonable, and in fact quite common.

Now for an example of TeX source input.  This is the text of the first
exersize in Knuth's "The TeXbook":
================================================================
\hrule
\vskip 1in
\centerline{\bf A SHORT STORY}
\vskip 6pt
\centerline{\sl by A. U. Thor}
\vskip .5cm
Once upon a time, in a distant
  galaxy called \"O\"o\c c,
there lived a computer
named R. ~J. Drofnats.

Mr.~Drofnats---or ``R.~J.,'' as
he preferred to be called---%
was happiest when he was at work
typsetting beautiful documents.
\vskip 1in
\hrule
\vfill\eject
================================================================
The only way to find the architecture of the document from this source is
to guess, based on what the output will look like, what the author intended.
I don't think you can write a program to do that.

Guy Streeter
b11!guy!guy@ingr.com
...uunet!ingr!b11!guy!guy
Technical Details
Message-ID: <6232@b11.ingr.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ginosko!uunet!ingr!b11!guy!guy
References: <7610@ditmela.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ginosko!uunet!ingr!b11!guy!guy
From: guy@guy.uucp (Guy Streeter)
Newsgroups: comp.protocols.iso
Subject: Re: ODA applications
Keywords: ODA, ODIF 8613
Message-ID: <6232@b11.ingr.com>
Date: 18 Oct 89 16:03:20 GMT
References: <7610@ditmela.oz>
Sender: usenet@b11.ingr.com
Lines: 88