home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / unix / mwxlate.doc < prev    next >
Text File  |  1985-01-30  |  6KB  |  165 lines

  1.  
  2.  
  3.  
  4.               MACWRITE TO SCRIPT/TROFF TRANSLATOR
  5.  
  6.  
  7. As promised earlier,  here is a source distribution of the MacWrite to Script
  8. and MacWrite to Troff translator written at Brown. This has been fairly-well
  9. tested at Brown, and has proven to be crash-free over the last few months.
  10. It runs with Version 2.2 MacWrite documents only right now, and will be
  11. updated for the new version when a stable one arrives.
  12.  
  13. The SCRIPT version runs with University of Waterloo SCRIPT, and
  14. is customized for a Xerox 9700 laser printer with a file
  15. called "mwprof script". This will be included in the distribution as well.
  16.  
  17. The TROFF version is customized for an TROFF output device, but will work with
  18. NROFF as well. Users of the MacWrite to Troff translator are encouraged to
  19. look at the already archived translator done by Mike Caplinger at Rice
  20. University to determine if this software is more appropriate for their use.
  21.  
  22. USE
  23.  
  24. The translator accepts the data fork of a MacWrite file as standard input and
  25. generates a translated file as standard output. For example:
  26.  
  27.      mwscript <bazinga.data >bazinga.script
  28.      mwtroff <bazinga.data >bazinga.me
  29.  
  30. translates the MacWrite file bazinga.data to the script file bazinga.script,
  31. and
  32. the MacWrite file bazinga.data to the troff/me file bazinga.me.
  33.  
  34. Once a translated the Script file is processed normally on the VM side (running
  35. it through the appropriate Xerox 9700/SCRIPT execs if available at your site)
  36. with the CPI=32 option.
  37. The translated troff file is simply run through troff with the -me package.
  38.  
  39. The translator was written not to generate SCRIPT/TROFF files that an end
  40. user would want to edit, but to generate files that would be processed and
  41. sent directly to a laser printer. Thus, some of the SCRIPT/TROFF codings are
  42. concerned with getting accurate output, not providing an elegantly readable
  43. SCRIPT/TROFF file.
  44.  
  45. KNOWN BUGS/FEATURES
  46.  
  47. The software has several known bugs/features not implemented:
  48.  
  49. - Headers and footers are not implemented. Given the shortcomings of
  50.   SCRIPT and TROFF in processing these and MacWrite in storing valuable
  51.   semantic information about page numbers and the like, this was left
  52.   out in the hopes that the newer versions of MacWrite might correct
  53.   some of this.
  54.  
  55. - Tabs are not guaranteed to work after the first line of the paragraph
  56.   (TROFF only). Troff does character placement following tabs based
  57.   upon where the tab falls on the INPUT line, not on the OUTPUT line
  58.   that is being built up. Thus, it is extremely difficult to get tabs
  59.   correct for any but the first line, since the translator wraps lines
  60.   when it needs to.
  61.  
  62. - Tabs are not guaranteed to work on lines with font changes (TROFF only).
  63.   Again, because Troff determines tabs based upon the INPUT line, and
  64.   because changing leading in TROFF cannot be done inline, one runs into
  65.   the above problem.
  66.  
  67. - Decimal tabs are treated as right-aligned tabs in TROFF. (TROFF does
  68.   not implement decimal tabs.)
  69.  
  70. - Only plain, bold, and italic are implemented in TROFF.
  71.  
  72. - Only plain, bold, italic, and bold-italic are implemented in SCRIPT.
  73.  
  74. - Point size changes are not implemented in SCRIPT.
  75.  
  76. - Pictures are treated as a page advance at all times.
  77.  
  78. CAVEATS
  79.  
  80. Because this is not a WYSIWYG (what you see is what you get) system, the
  81. formatting (line breaks and page breaks) will not be exactly as seen on
  82. the screen, though attempts are made to use character fonts that most closely
  83. match the size of those in use on the Macintosh. Be warned that because of
  84. fluctuations in character sizes, tabs with very close tolerances may not work
  85. properly, as the characters in a previous tab field might spill over into the
  86. next tab field. When working with tabbed columns, leave a little extra room for
  87. safety.
  88.  
  89. As well, SCRIPT and TROFF commands do not pass through the translator as
  90. commands -- they are treated as if they are normal text. This allows one to
  91. have lines that begin with periods, for example:
  92.  
  93.    ...and seven years ago
  94.  
  95. without causing the SCRIPT or TROFF processors to interpret and as a command
  96. and subsequently choke.
  97.  
  98. INSTALLATION
  99.  
  100. Script
  101.  
  102. Currently the SCRIPT version runs on VAXes and SUNs running 4.2 UNIX; it
  103. has not been ported to the Waterloo C Compiler for VM, but it should port
  104. with little effort. To compile the script version for UNIX, simply do
  105.  
  106.    cc -o mwscript mwxlate.c -DWSCRIPT
  107.  
  108. As well, on the VM system where it will be appropriately accessible,
  109. install the file "mwprof script" so that it can be imbedded properly
  110. in each individual's script document (this file contains the appropriate
  111. input translations to get special characters).
  112.  
  113. Troff
  114.  
  115. The TROFF version runs on VAXes and SUNs running 4.2 UNIX and has produced
  116. output for 240, 300, and 480 dot/inch Imagens and a 240 dot/inch Varian
  117. plotter. To compile the troff version for UNIX, simply do
  118.  
  119.    cc -o mwtroff mwxlate.c -DTROFF
  120.  
  121. This is all that should be needed for this version.
  122.  
  123. SUPPORT
  124.  
  125. We expect to be keeping this version up-to-date with any bug fixes that
  126. may be reported, or an additions that people may desire to make. You are
  127. encouraged to mail any additions or problems to
  128.  
  129.    nkm%brown@csnet-relay   (CSNET) or
  130.    nkm@browncs             (BITNET)
  131.  
  132. so that we may include them in subsequent releases. If you do find bugs,
  133. that you believe are worthy of reporting, please send a written description of
  134. the problem, a machine down-loadable version of the original MacWrite document,
  135. and the translated version to the above address. Because of limited manpower,
  136. we won't be able to provide telephone consulting for individual problems,
  137. but will try to answer electronic mail that comes our way.
  138.  
  139. DISTRIBUTION FORMAT
  140.  
  141. Mailed to net.sources and archived on info-mac will be two files:
  142.  
  143.    mwxlate.c  -- the source code for both the troff and script translators
  144.    mwprof.script -- the script include file for the script translated
  145. documents.
  146.  
  147. COPYRIGHT
  148.  
  149. The translator is (c) 1984 Brown University. It is distributed at no cost,
  150. with no warantees expressed or implied, and may used and modified, but not
  151. sold without permission.
  152.  
  153. FINAL THOUGHTS
  154.  
  155. Good luck. We know that this is but a first crack at the problem, but hope
  156. it will be of some use to those of you out there, and encourage additions,
  157. criticisms, complaints, and anything else you might like to add. Bon Voyage!
  158.  
  159. Norman Meyrowitz <nkm%iris%brown.csnet@csnet-relay.arpa>
  160. Institute for Research in Information and Scholarship (IRIS)
  161. Brown University
  162. Box 1946
  163. Providence, RI  02912
  164.  
  165.