Article View: comp.text.sgml
Article #255Re: SGML translators to/from LaTeX
From: Chuck.Phillips
Date: Mon, 17 Sep 1990 01:01
Date: Mon, 17 Sep 1990 01:01
55 lines
2642 bytes
2642 bytes
>>>>> On 14 Sep 90 18:17:19 GMT, dns@sq.sq.com (David Slocombe) said:
David> The need for SGML is demonstrated by examining the problem of translating
David> a troff document (for example) into an SGML document:
David> If a computer program looks at a file containing a troff document, it
David> will see things like...
David> .sp .5v
David> .ti 2m
David> text text text ....
David> ...text text.
David> .sp .5v
David> Now we may decide, in context, that these formatting codes are
David> formatting a paragraph (we *visualize* the effect of the codes!), but
David> they *might* be formatting a "note" or a cell of a table or whatever.
Which is why I gave up on `roff! There are more abstract markup languages.
LaTeX and Scribe come to mind. (I'm sure there are others.)
In LaTeX, you have something more like:
\begin{document}
\abstract{text text text...}
\section
text text text...
\subsection
text text\footnote{text text text...} text...
\subsubsection
text text text...
...
\end{document}
Note that explicit formatting commands are ommitted (except by the
occaisional novice attempting to defeat the purpose of LaTeX.) The format
of a "\section", for example, is determined in a separate "style" file.
There are also "environments" for tables, lists, etc. that are similarly
abstract (compared to explicit amgiguous formatting commands like, "indent
an extra 1/2 inch, place a bullet, boldface first word, etc.")
Bearing all this in mind, would it be possible to construct "intelligent"
converters from/to LaTeX to/from SGML that preserve the document's overall
structure? ...if _explicit_ formatting commands were simply ignored?
Could this be done in a general way, or would a translator _necessarily_
have to target a _specific_ DTD? Suggested approaches are welcome.
(What I have in mind are yacc/lex based translators.)
Thanks in advance,
--
Chuck Phillips MS440
NCR Microelectronics Chuck.Phillips%FtCollins.NCR.com
2001 Danfield Ct.
Ft. Collins, CO. 80525 uunet!ncrlnk!ncr-mpd!bach!chuckp
Technical Details
Message-ID:
<CHUCK.PHILLIPS.90Sep17020140@halley.FtCollins.NCR.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncr-mpd!Chuck.PhillipsReferences:
<BLARSEN.90Sep11085038@spider.uio.no> <1990Sep14.181719.12244@sq.sq.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncr-mpd!Chuck.Phillips From: Chuck.Phillips@FtCollins.NCR.COM (Chuck.Phillips) Newsgroups: comp.text.sgml Subject: Re: SGML translators to/from LaTeX Message-ID: <CHUCK.PHILLIPS.90Sep17020140@halley.FtCollins.NCR.COM> Date: 17 Sep 90 01:01:40 GMT References: <BLARSEN.90Sep11085038@spider.uio.no> <1990Sep14.181719.12244@sq.sq.com> Sender: uucp@ncr-mpd.FtCollins Distribution: comp Organization: NCR Microelectronics, Ft. Collins, CO Lines: 55 In-reply-to: dns@sq.sq.com's message of 14 Sep 90 18:17:19 GMT