cash@convex.com (Peter Cash) (04/12/91)
In article <DGD.91Apr11201903@bucsd.bu.edu> dgd@bucsd.bu.edu (David Durand) writes: >In article <101690001@hpcvlx.cv.hp.com> dex@hpcvlx.cv.hp.com (Dex Smith) writes: >> In a discussion about filters for converting FrameMaker, Ventura, and >> TROFF files to RTF, I wrote: >> > Also, how easy would it be to eventually convert RTF files to SGML? >> Here's an example of a gotcha': Suppose during your conversion to SGML you >> encounter a switch to italic font. Is this element a book title, a >> variable, >> or simply an emphasized word? Your SGML Document Type Definition (DTD) >> may distiguish between these different types of elements, yet they may >> have the same format. >> In short, converting from a formatting language to SGML is like converting >> an executable program into its C source code. > This is substantially correct, in that some information is almost >always lost in a conversion from content-markup to formatting. >However, RTF format has provisions for the use of paragraph level >styles -- and these can be decoded into markup elements. One of the >major annoyances with RTF is that the actual definition of the menaing >of the format is "what MS word will accept/and-or spit out". Such >conversion programs have been written -- but it requires care during >conversion and depends on someone with good habits and an >understanding of markup to create the files. Distinctions based only >on format are harder to extract. Good points. I plan to preserve structural information at least in paragraph tags. I.e., each header level will have a unique paragraph type. Are there any other issues I need to be careful about in writing a filter that converts documents to RTF if I want to preserve compatibility for a possible future conversion to SGML? -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Die Welt ist alles, was Zerfall ist. | Peter Cash | (apologies to Ludwig Wittgenstein) |cash@convex.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~