[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference vaxuum::document_ft

Title:DOCUMENT T1.0
Notice:**New notesfile (DOCUMENT.NOTE) now available (see note 897)**
Moderator:CLOSET::ADLER
Created:Mon Feb 09 1987
Last Modified:Thu Oct 31 1991
Last Successful Update:Fri Jun 06 1997
Number of topics:897
Total number of notes:4397

764.0. "Runoff RNO-->SDML document converter hack" by IJSAPL::KLERK (Theo de Klerk) Wed Aug 05 1987 19:28

 I've been hacking my own runoff --> document converter and most of it
 seems to work fine (at least for the  standard Runoff files I've
 got - it doesn't know about DSR+ simply because I don't).

 Anyone interested can copy it from ijsapl::psq:[public]rno2sdml.exe

 To keep in line with the general Document/TeX product, this converter
 likes to talk. Mainly to say that it did not support -whatever-

 Due to Scan limitations (or my mis-use of it) it makes 4 passes over
 the RNO file (deleting intermediates) to ensure a DSR command is
 truely a DSR command, to expand them to unique names and finally
 to translate them and <COMMENT> out all those not supported.

 It's not perfect, but any comments are appreciated. (it makes V1 sdml's)

Theo
 
T.RTitleUserPersonal
Name
DateLines
764.1To be used as foreign commandIJSAPL::KLERKTheo de KlerkWed Aug 05 1987 19:3111
 The program can be used as foreign command. You need to specify at
 least the filename and its type to work correctly.

 Format:

       rno2sdml   filename.type

       -w- unsupported: bla blah blah
       -i- Created filename.SDML

Theo
764.2VNASWS::GEROLDYou&#039;re my favourite waste of time !Wed Aug 19 1987 07:5712
Fine , fine Theo. Nice work.

I encountered a small problem with an extended runoff ( I know it' s not
supposed to work, but could cause other problems ).

One of the documents I tried it with contained a .ENABLE SUBSTITUTION
command. It seems your parser sees the .EN and makes it a <ENDNOTE>
( of course without a <NOTE> ). You could look for a terminator there.

Just for your info,

	Gerold
764.3Thanks...CHGV04::PROCTORJerry ProctorThu Aug 20 1987 16:396
    From those who have been asking for a converter, thanks for
    being bold and making yours available. I'll try it out and let you
    know how well it does. If it does more than half of the conversion
    I'll be happy.
    
    	Jerry 
764.4Suggestion on LiteralsASD::MINTZErik @ Spit Brook (Nashua, NH)Thu Aug 20 1987 17:529
So far your converter is working nicely; thanks for making it available.

One suggestion:  If I understand correctly, .LITERAL-.END LITERAL pairs
are translated to <LITERAL>-<ENDLITERAL> pairs.  The latter does not
prevent formating.  Perhaps <FIGURE> <LINE_ART> - <ENDLINE_ART> <ENDFIGURE>
would work better.

-- Erik

764.5New release availableIJSAPL::KLERKTheo de KlerkTue Aug 25 1987 13:1759
 I think some older versions are floating around of RNO2SDML.
 The latest (greatest?) should announce itself as 
     
      RNO2SDML V1.0-12 

 As for the remarks made:

    - .LITERAL/.END LITERAL should translate into pairs
      <CODE_EXAMPLE><LITERAL>  ...  <ENDLITERAL><ENDCODE_EXAMPLE>
      which must prevent any interpretation. 
      In contrast to DSR, TAB's are left as TABs and Document will
      interpret it as a single space because TeX does. A long note
      elsewhere goes on and on about this topic (and it comes back
      in every notesfile on text processing).
      You can DETAB (or reversely, ENTAB) your sources first if you
      extract a tool I donated to METOO::TOOLSHED called DETAB.
      (why should I not make some publicity for myself?)

   - <LINE_ART> was not used, as this tag is only valid within <FIGURE>
     environment. I'm told it also worked on its own and I was tempted
     to use this instead of CODE_EXAMPLE, but didnot because this tolerance
     of Document could be gone tomorrow.

   - The problem with .EN as END NOTE should have been fixed.

   - .TITLE and .SUBTITLE have been <comment>ed. Someone suggested to
     use <RUNNING_TITLE> for them. But since these are only valid in
     REPORT and ARTICLE, I think I should not. Opinions?

   - I forgot to mention in the original note that the one thing my converter
     doesn't understand are DSR files with redefined flags. Since Scan does
     not allow for dynamic run-time tokens, I always scan for the default
     Runoff flags (like _ for accept, * for bold). I'm afraid you must undo
     all re-definitions with e.g.  .FLAG ACCEPT $ to get my program to run
     or to modify the sources to your liking. 

  I'm interested to hear any other problems. Most DSR files on this site
  have been converted, so I'm not using the tool that much anymore, but
  am willing to listen in.

  Aren't those 3 weeks, (then 3 months) of the official converter delivery
  not yet gone? 

  Are we ever going to see one? Will Zaphod Beeblebrox remain unharmed?
  Tune in next week for the next exciting instalment of... the Hitch Hiker's
  Guide to Document...

Theo


P.S.
To the guy at the Ferney office: I deleted your mail after reading + noting
your comments, so I cannot reply in person anymore as I forgot your username...
I appologize...

P.P.S.
A similar converter for LaTeX to Document is not going as smoothly. I'm
getting all confused by the pairs of braces, nested arguments and user defined
\def's. Anyone made something useful yet?
764.6Location IJSAPL::PSQ:[PUBLIC.SOURCES.RNO2SDML]*.*IJSAPL::KLERKTheo de KlerkWed Aug 26 1987 04:0819
 It always happens if you are rushing off into a holiday (and then are
 a slow starter on return):

 the sources of RNO2SDML.EXE can be copied from 

             IJSAPL::PSQ:[PUBLIC.SOURCES.RNO2SDML]*.*

 It also contains the V1-12 EXE file (now also in [PUBLIC], which I had
 forgotten to do) and an MMS file to build the whole lot. You need Scan V1.1
 to run it.

 As for -.2:  there is no .ENABLE SUBSTITUTE command, hence the .EN is taken
 as being .END NOTE.  Since several commands can follow each other with/without
 spaces I did not go into the trouble to force either a space or dot to
 follow a command (in order to leave .ENABLE SUBSTITUTE as text).
 As the schoolbooks say, if it is getting difficult, I'll leave this as a
 home exercise...

Theo
764.7V1-13 now available...IJSAPL::KLERKTheo de KlerkMon Aug 31 1987 19:2319
 Some "minor" mistakes have been found and corrected:

   - the final pass erroneously removed <CODE_EXAMPLE> tags, leaving
     bare <LITERAL>s, which are not quite what we wanted. This 
     mistake appeared twice - I thought I had solved it after fixing
     the first. Shows you that testing is vital...

   - The .LE; and .BR; sometimes left their semicolons. This has been
     corrected.

   - Normal text that looks like DSR commands on a .C;, .BR; and .LE;
     line (.e.g.   .LE; The file A.TXT) is now properly protected, as
     all dots following the semicolon are  no longer seen as potential
     DSR commands

RNO2SDML should now announce itself as V1-13 (yes, that one!) and is
available from the usual places in source and/or EXE.

Theo