brian@ditmela.oz (Brian May) (10/11/89)
Hi all, anyone out there developing/ developed applications for ODA (ie conversion from TEX -> ODA -> TEX), or any other WPs or text formatters? Any info and/or dialogue would be useful. Brian May. (brian@ditmela.oz)
guy@guy.uucp (Guy Streeter) (10/16/89)
brian@ditmela.oz (Brian May) writes: >anyone out there developing/ developed applications for ODA (ie conversion from >TEX -> ODA -> TEX), or any other WPs or text formatters? 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. The type of information in ODA is "here is a title, here is a chapter header, here is a paragraph." The information in TeX and most other WPs is more like "here put a character in this font, there put a character in that font." I don't see how you could translate between the two. Guy Streeter b11!guy!guy@ingr.com ...uunet!ingr!b11!guy!guy
brian@ditmela.oz (Brian May) (10/17/89)
(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. The type of > information in ODA is "here is a title, here is a chapter header, here > is a paragraph." The information in TeX and most other WPs is more like > "here put a character in this font, there put a character in that font." > I don't see how you could translate between the two. > 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. Regards, Brian May
guy@guy.uucp (Guy Streeter) (10/18/89)
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