home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Internet / WWW / Perl_WWW_Utilities / perlMIF_beta2 / mif / mif_doc.pl < prev    next >
Encoding:
Perl Script  |  1994-05-18  |  28.5 KB  |  756 lines

  1. ##---------------------------------------------------------------------------##
  2. ##  File:
  3. ##      mif_doc.pl
  4. ##  Author:
  5. ##      Earl Hood       ehood@convex.com
  6. ##  Description:
  7. ##    This file is defines the "mif_doc" perl package.  It defines
  8. ##    routines to handle the Document via MIFread_mif() defined in
  9. ##    the "mif" package.
  10. ##---------------------------------------------------------------------------##
  11. ##  Copyright (C) 1994  Earl Hood, ehood@convex.com
  12. ##
  13. ##  This program is free software; you can redistribute it and/or modify
  14. ##  it under the terms of the GNU General Public License as published by
  15. ##  the Free Software Foundation; either version 2 of the License, or
  16. ##  (at your option) any later version.
  17. ## 
  18. ##  This program is distributed in the hope that it will be useful,
  19. ##  but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21. ##  GNU General Public License for more details.
  22. ##  
  23. ##  You should have received a copy of the GNU General Public License
  24. ##  along with this program; if not, write to the Free Software
  25. ##  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26. ##---------------------------------------------------------------------------##
  27. ##---------------------------------------------------------------------------##
  28. ##  Status:
  29. ##    o DMathCatalog is ignored.
  30. ##---------------------------------------------------------------------------##
  31.  
  32. require 'mif/mif.pl' || die "Unable to require mif.pl\n";
  33.  
  34. package mif_doc;
  35.  
  36. ##------------------------------------------##
  37. ## Add Document function to %MIFToken array ##
  38. ##------------------------------------------##
  39. $mif'MIFToken{'Document'} = 'Document';
  40. $mif'MIFToken{'DNextUnique'} = "mif_doc'data_token";
  41. $mif'MIFToken{'DViewRect'} = "mif_doc'data_token";
  42. $mif'MIFToken{'DWindowRect'} = "mif_doc'data_token";
  43. $mif'MIFToken{'DViewScale'} = "mif_doc'data_token";
  44. $mif'MIFToken{'DMargins'} = "mif_doc'data_token";
  45. $mif'MIFToken{'DColumns'} = "mif_doc'data_token";
  46. $mif'MIFToken{'DColumnGap'} = "mif_doc'data_token";
  47. $mif'MIFToken{'DPageSize'} = "mif_doc'data_token";
  48. $mif'MIFToken{'DStartPage'} = "mif_doc'data_token";
  49. $mif'MIFToken{'DPageNumStyle'} = "mif_doc'data_token";
  50. $mif'MIFToken{'DPagePointStyle'} = "mif_doc'data_token";
  51. $mif'MIFToken{'DTwoSides'} = "mif_doc'data_token";
  52. $mif'MIFToken{'DParity'} = "mif_doc'data_token";
  53. $mif'MIFToken{'DFrozenPages'} = "mif_doc'data_token";
  54. $mif'MIFToken{'DPageRounding'} = "mif_doc'data_token";
  55. $mif'MIFToken{'DMaxInterLine'} = "mif_doc'data_token";
  56. $mif'MIFToken{'DMaxInterPgf'} = "mif_doc'data_token";
  57. $mif'MIFToken{'DFNoteMaxH'} = "mif_doc'data_token";
  58. $mif'MIFToken{'FNoteStartNum'} = "mif_doc'data_token";
  59. $mif'MIFToken{'DFNoteRestart'} = "mif_doc'data_token";
  60. $mif'MIFToken{'DFNoteTag'} = "mif_doc'string_token";
  61. $mif'MIFToken{'DFNoteLabels'} = "mif_doc'string_token";
  62. $mif'MIFToken{'DFNoteNumStyle'} = "mif_doc'data_token";
  63. $mif'MIFToken{'DFNoteAnchorPos'} = "mif_doc'data_token";
  64. $mif'MIFToken{'DFNoteNumberPos'} = "mif_doc'data_token";
  65. $mif'MIFToken{'DFNoteAnchorPrefix'} = "mif_doc'string_token";
  66. $mif'MIFToken{'DFNoteAnchorSuffix'} = "mif_doc'string_token";
  67. $mif'MIFToken{'DFNoteNumberPrefix'} = "mif_doc'string_token";
  68. $mif'MIFToken{'DFNoteNumberSuffix'} = "mif_doc'string_token";
  69. $mif'MIFToken{'DTblFNoteTag'} = "mif_doc'string_token";
  70. $mif'MIFToken{'DTblFNoteLabels'} = "mif_doc'string_token";
  71. $mif'MIFToken{'DTblFNoteNumStyle'} = "mif_doc'data_token";
  72. $mif'MIFToken{'DTblFNoteAnchorPos'} = "mif_doc'data_token";
  73. $mif'MIFToken{'DTblFNoteNumberPos'} = "mif_doc'data_token";
  74. $mif'MIFToken{'DTblFNoteAnchorPrefix'} = "mif_doc'string_token";
  75. $mif'MIFToken{'DTblFNoteAnchorSuffix'} = "mif_doc'string_token";
  76. $mif'MIFToken{'DTblFNoteNumberPrefix'} = "mif_doc'string_token";
  77. $mif'MIFToken{'DTblFNoteNumberSuffix'} = "mif_doc'string_token";
  78. $mif'MIFToken{'DLinebreakChars'} = "mif_doc'string_token";
  79. $mif'MIFToken{'DPunctuationChars'} = "mif_doc'string_token";
  80. $mif'MIFToken{'DChBarGap'} = "mif_doc'data_token";
  81. $mif'MIFToken{'DChBarWidth'} = "mif_doc'data_token";
  82. $mif'MIFToken{'DChBarPosition'} = "mif_doc'data_token";
  83. $mif'MIFToken{'DChBarColor'} = "mif_doc'string_token";
  84. $mif'MIFToken{'DAutoChBars'} = "mif_doc'data_token";
  85. $mif'MIFToken{'DShowAllConditions'} = "mif_doc'data_token";
  86. $mif'MIFToken{'DDisplayOverrides'} = "mif_doc'data_token";
  87. $mif'MIFToken{'DViewOnly'} = "mif_doc'data_token";
  88. $mif'MIFToken{'DViewOnlyXRef'} = "mif_doc'data_token";
  89. $mif'MIFToken{'DViewOnlySelect'} = "mif_doc'data_token";
  90. $mif'MIFToken{'DViewOnlyNoOp'} = "mif_doc'data_token";
  91. $mif'MIFToken{'DViewOnlyWinBorders'} = "mif_doc'data_token";
  92. $mif'MIFToken{'DViewOnlyWinMenubar'} = "mif_doc'data_token";
  93. $mif'MIFToken{'DViewOnlyWinPopup'} = "mif_doc'data_token";
  94. $mif'MIFToken{'DViewOnlyWinPalette'} = "mif_doc'data_token";
  95. $mif'MIFToken{'DGridOn'} = "mif_doc'data_token";
  96. $mif'MIFToken{'DPageGrid'} = "mif_doc'data_token";
  97. $mif'MIFToken{'DSnapGrid'} = "mif_doc'data_token";
  98. $mif'MIFToken{'DSnapRotation'} = "mif_doc'data_token";
  99. $mif'MIFToken{'DRulersOn'} = "mif_doc'data_token";
  100. $mif'MIFToken{'DFullRulers'} = "mif_doc'data_token";
  101. $mif'MIFToken{'DGraphicsOff'} = "mif_doc'data_token";
  102. $mif'MIFToken{'DCurrentView'} = "mif_doc'data_token";
  103. $mif'MIFToken{'DBordersOn'} = "mif_doc'data_token";
  104. $mif'MIFToken{'DSymbolsOn'} = "mif_doc'data_token";
  105. $mif'MIFToken{'DSmartQuotesOn'} = "mif_doc'data_token";
  106. $mif'MIFToken{'DSmartSpacesOn'} = "mif_doc'data_token";
  107. $mif'MIFToken{'DLanguage'} = "mif_doc'data_token";
  108. $mif'MIFToken{'DSuperscriptSize'} = "mif_doc'data_token";
  109. $mif'MIFToken{'DSubscriptSize'} = "mif_doc'data_token";
  110. $mif'MIFToken{'DSmallCapsSize'} = "mif_doc'data_token";
  111. $mif'MIFToken{'DSuperscriptShift'} = "mif_doc'data_token";
  112. $mif'MIFToken{'DSubscriptShift'} = "mif_doc'data_token";
  113. $mif'MIFToken{'DMathAlphaCharFontFamily'} = "mif_doc'string_token";
  114. $mif'MIFToken{'DMathSmallIntegral'} = "mif_doc'data_token";
  115. $mif'MIFToken{'DMathMediumIntegral'} = "mif_doc'data_token";
  116. $mif'MIFToken{'DMathLargeIntegral'} = "mif_doc'data_token";
  117. $mif'MIFToken{'DMathSmallSigma'} = "mif_doc'data_token";
  118. $mif'MIFToken{'DMathMediumSigma'} = "mif_doc'data_token";
  119. $mif'MIFToken{'DMathLargeSigma'} = "mif_doc'data_token";
  120. $mif'MIFToken{'DMathSmallLevel1'} = "mif_doc'data_token";
  121. $mif'MIFToken{'DMathMediumLevel1'} = "mif_doc'data_token";
  122. $mif'MIFToken{'DMathLargeLevel1'} = "mif_doc'data_token";
  123. $mif'MIFToken{'DMathSmallLevel2'} = "mif_doc'data_token";
  124. $mif'MIFToken{'DMathMediumLevel2'} = "mif_doc'data_token";
  125. $mif'MIFToken{'DMathLargeLevel2'} = "mif_doc'data_token";
  126. $mif'MIFToken{'DMathSmallLevel3'} = "mif_doc'data_token";
  127. $mif'MIFToken{'DMathMediumLevel3'} = "mif_doc'data_token";
  128. $mif'MIFToken{'DMathLargeLevel3'} = "mif_doc'data_token";
  129. $mif'MIFToken{'DMathSmallHoriz'} = "mif_doc'data_token";
  130. $mif'MIFToken{'DMathMediumHoriz'} = "mif_doc'data_token";
  131. $mif'MIFToken{'DMathLargeHoriz'} = "mif_doc'data_token";
  132. $mif'MIFToken{'DMathSmallVert'} = "mif_doc'data_token";
  133. $mif'MIFToken{'DMathMediumVert'} = "mif_doc'data_token";
  134. $mif'MIFToken{'DMathLargeVert'} = "mif_doc'data_token";
  135. $mif'MIFToken{'DMathShowCustom'} = "mif_doc'data_token";
  136. $mif'MIFToken{'DMathFunctions'} = "mif_doc'string_token";
  137. $mif'MIFToken{'DMathNumbers'} = "mif_doc'string_token";
  138. $mif'MIFToken{'DMathVariables'} = "mif_doc'string_token";
  139. $mif'MIFToken{'DMathStrings'} = "mif_doc'string_token";
  140. $mif'MIFToken{'DMathGreek'} = "mif_doc'string_token";
  141. $mif'MIFToken{'DMathCatalog'} = "mif_doc'data_token";
  142. $mif'MIFToken{'DElementCatalogScope'} = "mif_doc'data_token";
  143. $mif'MIFToken{'DElementBordersOn'} = "mif_doc'data_token";
  144. $mif'MIFToken{'DExclusions'} = "mif_doc'data_token";
  145. $mif'MIFToken{'DInclusions'} = "mif_doc'data_token";
  146. $mif'MIFToken{'DApplyFormatRules'} = "mif_doc'data_token";
  147. $mif'MIFToken{'DNoPrintSepColor'} = "mif_doc'string_token";
  148. $mif'MIFToken{'DPrintProcessColor'} = "mif_doc'string_token";
  149. $mif'MIFToken{'DPrintSkipBlankPages'} = "mif_doc'data_token";
  150. $mif'MIFToken{'DPrintSeparations'} = "mif_doc'data_token";
  151.  
  152. ##--------------------##
  153. ## Document variables ##
  154. ##--------------------##
  155. $DNextUnique        = "";
  156. $DViewRect        = "";
  157. $DWindowRect        = "";
  158. $DViewScale         = "";
  159. $DMargins        = "";    # Used by filters
  160. $DColumns        = "";    # Used by filters
  161. $DColumnGap        = "";    # Used by filters
  162. $DPageSize        = "";
  163. $DStartPage        = "";
  164. $DPageNumStyle        = "";
  165. $DPagePointStyle    = "";
  166. $DTwoSides        = "";
  167. $DParity        = "";
  168. $DFrozenPages        = "";
  169. $DPageRounding        = "";
  170. $DMaxInterLine        = "";
  171. $DMaxInterPgf        = "";
  172. $DFNoteMaxH        = "";
  173. $FNoteStartNum        = "";
  174. $DFNoteRestart        = "";
  175. $DFNoteTag        = "";
  176. $DFNoteLabels        = "";
  177. $DFNoteNumStyle        = "";
  178. $DFNoteAnchorPos    = "";
  179. $DFNoteNumberPos    = "";
  180. $DFNoteAnchorPrefix    = "";
  181. $DFNoteAnchorSuffix    = "";
  182. $DFNoteNumberPrefix    = "";
  183. $DFNoteNumberSuffix    = "";
  184. $DTblFNoteTag        = "";
  185. $DTblFNoteLabels    = "";
  186. $DTblFNoteNumStyle    = "";
  187. $DTblFNoteAnchorPos    = "";
  188. $DTblFNoteNumberPos    = "";
  189. $DTblFNoteAnchorPrefix    = "";
  190. $DTblFNoteAnchorSuffix    = "";
  191. $DTblFNoteNumberPrefix    = "";
  192. $DTblFNoteNumberSuffix    = "";
  193. $DLinebreakChars    = "";
  194. $DPunctuationChars    = "";
  195. $DChBarGap        = "";
  196. $DChBarWidth        = "";
  197. $DChBarPosition        = "";
  198. $DChBarColor        = "";
  199. $DAutoChBars        = "";
  200. $DShowAllConditions    = "";
  201. $DDisplayOverrides    = "";
  202. $DViewOnly        = "";
  203. $DViewOnlyXRef        = "";
  204. $DViewOnlySelect    = "";
  205. $DViewOnlyNoOp        = "";
  206. $DViewOnlyWinBorders    = "";
  207. $DViewOnlyWinMenubar    = "";
  208. $DViewOnlyWinPopup    = "";
  209. $DViewOnlyWinPalette    = "";
  210. $DGridOn        = "";
  211. $DPageGrid        = "";
  212. $DSnapGrid         = "";
  213. $DSnapRotation         = "";
  214. $DRulersOn        = "";
  215. $DFullRulers        = "";
  216. $DGraphicsOff        = "";
  217. $DCurrentView        = "";
  218. $DBordersOn        = "";
  219. $DSymbolsOn        = "";
  220. $DSmartQuotesOn        = "";
  221. $DSmartSpacesOn        = "";
  222. $DLanguage        = "";
  223. $DSuperscriptSize     = "";
  224. $DSubscriptSize     = "";
  225. $DSmallCapsSize     = "";
  226. $DSuperscriptShift     = "";
  227. $DSubscriptShift     = "";
  228. $DMathAlphaCharFontFamily = "";
  229. $DMathSmallIntegral    = "";
  230. $DMathMediumIntegral    = "";
  231. $DMathLargeIntegral    = "";
  232. $DMathSmallSigma    = "";
  233. $DMathMediumSigma    = "";
  234. $DMathLargeSigma    = "";
  235. $DMathSmallLevel1    = "";
  236. $DMathMediumLevel1    = "";
  237. $DMathLargeLevel1    = "";
  238. $DMathSmallLevel2    = "";
  239. $DMathMediumLevel2    = "";
  240. $DMathLargeLevel2    = "";
  241. $DMathSmallLevel3    = "";
  242. $DMathMediumLevel3    = "";
  243. $DMathLargeLevel3    = "";
  244. $DMathSmallHoriz    = "";
  245. $DMathMediumHoriz    = "";
  246. $DMathLargeHoriz    = "";
  247. $DMathSmallVert        = "";
  248. $DMathMediumVert    = "";
  249. $DMathLargeVert        = "";
  250. $DMathShowCustom    = "";
  251. $DMathFunctions        = "";
  252. $DMathNumbers        = "";
  253. $DMathVariables        = "";
  254. $DMathStrings        = "";
  255. $DMathGreek        = "";
  256. $DMathCatalog        = "";
  257. $DElementCatalogScope    = "";
  258. $DElementBordersOn    = "";
  259. $DExclusions        = "";
  260. $DInclusions        = "";
  261. $DApplyFormatRules    = "";
  262. $DNoPrintSepColor    = "";
  263. $DPrintProcessColor    = "";
  264. $DPrintSkipBlankPages    = "";
  265. $DPrintSeparations    = "";
  266.  
  267. ##------------------------##
  268. ## Import 'mif' variables ##
  269. ##------------------------##
  270. $MStore        = $mif'MStore;
  271. $MOpen        = $mif'MOpen;
  272. $MClose        = $mif'MClose;
  273. $MLine        = $mif'MLine;
  274. $mso        = $mif'mso;
  275. $msc        = $mif'msc;
  276. $stb        = $mif'stb;
  277. $ste        = $mif'ste;
  278. $como        = $mif'como;
  279.  
  280.                 ##---------------##
  281.                 ## Main Routines ##
  282.                 ##---------------##
  283. ##---------------------------------------------------------------------------
  284. ##    MIFwrite_doc() outputs Document as defined by the variables
  285. ##
  286. ##    Usage:
  287. ##        &'MIFwrite_doc(FILEHANDLE);
  288. ##
  289. sub main'MIFwrite_doc {
  290.     local($handle, $l) = @_;
  291.     local($i0, $i1, $i2) = (' ' x $l, ' ' x (1+$l), ' ' x (2+$l));
  292.  
  293.     print $handle $i0, $mso, 'Document', "\n";
  294.     print $handle $i1, $mso, 'DViewRect ', $DViewRect, $msc, "\n"
  295.     if $DViewRect ne "";
  296.     print $handle $i1, $mso, 'DWindowRect ', $DWindowRect, $msc, "\n"
  297.     if $DWindowRect ne "";
  298.     print $handle $i1, $mso, 'DViewScale ', $DViewScale, $msc, "\n"
  299.     if $DViewScale ne "";
  300.     print $handle $i1, $mso, 'DMargins ', $DMargins, $msc, "\n"
  301.     if $DMargins ne "";
  302.     print $handle $i1, $mso, 'DColumns ', $DColumns, $msc, "\n"
  303.     if $DColumns ne "";
  304.     print $handle $i1, $mso, 'DColumnGap ', $DColumnGap, $msc, "\n"
  305.     if $DColumnGap ne "";
  306.     print $handle $i1, $mso, 'DPageSize ', $DPageSize, $msc, "\n"
  307.     if $DPageSize ne "";
  308.     print $handle $i1, $mso, 'DStartPage ', $DStartPage, $msc, "\n"
  309.     if $DStartPage ne "";
  310.     print $handle $i1, $mso, 'DPageNumStyle ', $DPageNumStyle, $msc, "\n"
  311.     if $DPageNumStyle ne "";
  312.     print $handle $i1, $mso, 'DPagePointStyle ', $DPagePointStyle, $msc, "\n"
  313.     if $DPagePointStyle ne "";
  314.     print $handle $i1, $mso, 'DTwoSides ', $DTwoSides, $msc, "\n"
  315.     if $DTwoSides ne "";
  316.     print $handle $i1, $mso, 'DParity ', $DParity, $msc, "\n"
  317.     if $DParity ne "";
  318.     print $handle $i1, $mso, 'DFrozenPages ', $DFrozenPages, $msc, "\n"
  319.     if $DFrozenPages ne "";
  320.     print $handle $i1, $mso, 'DPageRounding ', $DPageRounding, $msc, "\n"
  321.     if $DPageRounding ne "";
  322.     print $handle $i1, $mso, 'DMaxInterLine ', $DMaxInterLine, $msc, "\n"
  323.     if $DMaxInterLine ne "";
  324.     print $handle $i1, $mso, 'DMaxInterPgf ', $DMaxInterPgf, $msc, "\n"
  325.     if $DMaxInterPgf ne "";
  326.     print $handle $i1, $mso, 'DFNoteMaxH ', $DFNoteMaxH, $msc, "\n"
  327.     if $DFNoteMaxH ne "";
  328.     print $handle $i1, $mso, 'FNoteStartNum ', $FNoteStartNum, $msc, "\n"
  329.     if $FNoteStartNum ne "";
  330.     print $handle $i1, $mso, 'DFNoteRestart ', $DFNoteRestart, $msc, "\n"
  331.     if $DFNoteRestart ne "";
  332.     print $handle $i1, $mso, 'DFNoteTag ', $stb, $DFNoteTag, $ste, $msc, "\n"
  333.     ;
  334.     print $handle $i1, $mso, 'DFNoteLabels ', $stb, $DFNoteLabels, $ste,
  335.                $msc, "\n"
  336.     ;
  337.     print $handle $i1, $mso, 'DFNoteNumStyle ', $DFNoteNumStyle, $msc, "\n"
  338.     if $DFNoteNumStyle ne "";
  339.     print $handle $i1, $mso, 'DFNoteAnchorPos ', $DFNoteAnchorPos, $msc, "\n"
  340.     if $DFNoteAnchorPos ne "";
  341.     print $handle $i1, $mso, 'DFNoteNumberPos ', $DFNoteNumberPos, $msc, "\n"
  342.     if $DFNoteNumberPos ne "";
  343.     print $handle $i1, $mso, 'DFNoteAnchorPrefix ', $stb, $DFNoteAnchorPrefix, 
  344.                $ste, $msc, "\n"
  345.     ;
  346.     print $handle $i1, $mso, 'DFNoteAnchorSuffix ', $stb, $DFNoteAnchorSuffix, 
  347.                $ste, $msc, "\n"
  348.     ;
  349.     print $handle $i1, $mso, 'DFNoteNumberPrefix ', $stb, $DFNoteNumberPrefix, 
  350.                $ste, $msc, "\n"
  351.     ;
  352.     print $handle $i1, $mso, 'DFNoteNumberSuffix ', $stb, $DFNoteNumberSuffix, 
  353.                $ste, $msc, "\n"
  354.     ;
  355.     print $handle $i1, $mso, 'DTblFNoteTag ', $stb, $DTblFNoteTag, $ste, 
  356.                $msc, "\n"
  357.     ;
  358.     print $handle $i1, $mso, 'DTblFNoteLabels ', $stb, $DTblFNoteLabels, $ste, 
  359.                $msc, "\n"
  360.     ;
  361.     print $handle $i1, $mso, 'DTblFNoteNumStyle ', $DTblFNoteNumStyle, 
  362.                $msc, "\n"
  363.     if $DTblFNoteNumStyle ne "";
  364.     print $handle $i1, $mso, 'DTblFNoteAnchorPos ', $DTblFNoteAnchorPos, 
  365.                $msc, "\n"
  366.     if $DTblFNoteAnchorPos ne "";
  367.     print $handle $i1, $mso, 'DTblFNoteNumberPos ', $DTblFNoteNumberPos, 
  368.                $msc, "\n"
  369.     if $DTblFNoteNumberPos ne "";
  370.     print $handle $i1, $mso, 'DTblFNoteAnchorPrefix ', $stb, 
  371.                $DTblFNoteAnchorPrefix, $ste, $msc, "\n"
  372.     ;
  373.     print $handle $i1, $mso, 'DTblFNoteAnchorSuffix ', $stb, 
  374.                $DTblFNoteAnchorSuffix, $ste, $msc, "\n"
  375.     ;
  376.     print $handle $i1, $mso, 'DTblFNoteNumberPrefix ', $stb, 
  377.                $DTblFNoteNumberPrefix, $ste, $msc, "\n"
  378.     ;
  379.     print $handle $i1, $mso, 'DTblFNoteNumberSuffix ', $stb, 
  380.                $DTblFNoteNumberSuffix, $ste, $msc, "\n"
  381.     ;
  382.     print $handle $i1, $mso, 'DLinebreakChars ', $stb, $DLinebreakChars, 
  383.                $ste, $msc, "\n"
  384.     ;
  385.     print $handle $i1, $mso, 'DPunctuationChars ', $stb, $DPunctuationChars, 
  386.                $ste, $msc, "\n"
  387.     ;
  388.     print $handle $i1, $mso, 'DChBarGap ', $DChBarGap, $msc, "\n"
  389.     if $DChBarGap ne "";
  390.     print $handle $i1, $mso, 'DChBarWidth ', $DChBarWidth, $msc, "\n"
  391.     if $DChBarWidth ne "";
  392.     print $handle $i1, $mso, 'DChBarPosition ', $DChBarPosition, $msc, "\n"
  393.     if $DChBarPosition ne "";
  394.     print $handle $i1, $mso, 'DChBarColor ', $stb, $DChBarColor, $ste, 
  395.                $msc, "\n"
  396.     if $DChBarColor ne "";
  397.     print $handle $i1, $mso, 'DAutoChBars ', $DAutoChBars, $msc, "\n"
  398.     if $DAutoChBars ne "";
  399.     print $handle $i1, $mso, 'DShowAllConditions ', $DShowAllConditions, 
  400.                $msc, "\n"
  401.     if $DShowAllConditions ne "";
  402.     print $handle $i1, $mso, 'DDisplayOverrides ', $DDisplayOverrides, 
  403.                $msc, "\n"
  404.     if $DDisplayOverrides ne "";
  405.     print $handle $i1, $mso, 'DViewOnly ', $DViewOnly, $msc, "\n"
  406.     if $DViewOnly ne "";
  407.     print $handle $i1, $mso, 'DViewOnlyXRef ', $DViewOnlyXRef, $msc, "\n"
  408.     if $DViewOnlyXRef ne "";
  409.     print $handle $i1, $mso, 'DViewOnlySelect ', $DViewOnlySelect, $msc, "\n"
  410.     if $DViewOnlySelect ne "";
  411.     print $handle $i1, $mso, 'DViewOnlyNoOp ', $DViewOnlyNoOp, $msc, "\n"
  412.     if $DViewOnlyNoOp ne "";
  413.     print $handle $i1, $mso, 'DViewOnlyWinBorders ', $DViewOnlyWinBorders, 
  414.                $msc, "\n"
  415.     if $DViewOnlyWinBorders ne "";
  416.     print $handle $i1, $mso, 'DViewOnlyWinMenubar ', $DViewOnlyWinMenubar, 
  417.                $msc, "\n"
  418.     if $DViewOnlyWinMenubar ne "";
  419.     print $handle $i1, $mso, 'DViewOnlyWinPopup ', $DViewOnlyWinPopup, 
  420.                $msc, "\n"
  421.     if $DViewOnlyWinPopup ne "";
  422.     print $handle $i1, $mso, 'DViewOnlyWinPalette ', $DViewOnlyWinPalette, 
  423.                $msc, "\n"
  424.     if $DViewOnlyWinPalette ne "";
  425.     print $handle $i1, $mso, 'DGridOn ', $DGridOn, $msc, "\n"
  426.     if $DGridOn ne "";
  427.     print $handle $i1, $mso, 'DPageGrid ', $DPageGrid, $msc, "\n"
  428.     if $DPageGrid ne "";
  429.     print $handle $i1, $mso, 'DSnapGrid ', $DSnapGrid, $msc, "\n"
  430.     if $DSnapGrid ne "";
  431.     print $handle $i1, $mso, 'DSnapRotation ', $DSnapRotation, $msc, "\n"
  432.     if $DSnapRotation ne "";
  433.     print $handle $i1, $mso, 'DRulersOn ', $DRulersOn, $msc, "\n"
  434.     if $DRulersOn ne "";
  435.     print $handle $i1, $mso, 'DFullRulers ', $DFullRulers, $msc, "\n"
  436.     if $DFullRulers ne "";
  437.     print $handle $i1, $mso, 'DGraphicsOff ', $DGraphicsOff, $msc, "\n"
  438.     if $DGraphicsOff ne "";
  439.     print $handle $i1, $mso, 'DCurrentView ', $DCurrentView, $msc, "\n"
  440.     if $DCurrentView ne "";
  441.     print $handle $i1, $mso, 'DBordersOn ', $DBordersOn, $msc, "\n"
  442.     if $DBordersOn ne "";
  443.     print $handle $i1, $mso, 'DSymbolsOn ', $DSymbolsOn, $msc, "\n"
  444.     if $DSymbolsOn ne "";
  445.     print $handle $i1, $mso, 'DSmartQuotesOn ', $DSmartQuotesOn, $msc, "\n"
  446.     if $DSmartQuotesOn ne "";
  447.     print $handle $i1, $mso, 'DSmartSpacesOn ', $DSmartSpacesOn, $msc, "\n"
  448.     if $DSmartSpacesOn ne "";
  449.     print $handle $i1, $mso, 'DLanguage ', $DLanguage, $msc, "\n"
  450.     if $DLanguage ne "";
  451.     print $handle $i1, $mso, 'DSuperscriptSize ', $DSuperscriptSize, $msc, "\n"
  452.     if $DSuperscriptSize ne "";
  453.     print $handle $i1, $mso, 'DSubscriptSize ', $DSubscriptSize, $msc, "\n"
  454.     if $DSubscriptSize ne "";
  455.     print $handle $i1, $mso, 'DSmallCapsSize ', $DSmallCapsSize, $msc, "\n"
  456.     if $DSmallCapsSize ne "";
  457.     print $handle $i1, $mso, 'DSuperscriptShift ', $DSuperscriptShift, 
  458.                $msc, "\n"
  459.     if $DSuperscriptShift ne "";
  460.     print $handle $i1, $mso, 'DSubscriptShift ', $DSubscriptShift, $msc, "\n"
  461.     if $DSubscriptShift ne "";
  462.     print $handle $i1, $mso, 'DMathAlphaCharFontFamily ', $stb,
  463.                $DMathAlphaCharFontFamily, $ste, $msc, "\n"
  464.     ;
  465.     print $handle $i1, $mso, 'DMathSmallIntegral ', $DMathSmallIntegral, 
  466.                $msc, "\n"
  467.     if $DMathSmallIntegral ne "";
  468.     print $handle $i1, $mso, 'DMathMediumIntegral ', $DMathMediumIntegral, 
  469.                $msc, "\n"
  470.     if $DMathMediumIntegral ne "";
  471.     print $handle $i1, $mso, 'DMathLargeIntegral ', $DMathLargeIntegral, 
  472.                $msc, "\n"
  473.     if $DMathLargeIntegral ne "";
  474.     print $handle $i1, $mso, 'DMathSmallSigma ', $DMathSmallSigma, $msc, "\n"
  475.     if $DMathSmallSigma ne "";
  476.     print $handle $i1, $mso, 'DMathMediumSigma ', $DMathMediumSigma, $msc, "\n"
  477.     if $DMathMediumSigma ne "";
  478.     print $handle $i1, $mso, 'DMathLargeSigma ', $DMathLargeSigma, $msc, "\n"
  479.     if $DMathLargeSigma ne "";
  480.     print $handle $i1, $mso, 'DMathSmallLevel1 ', $DMathSmallLevel1, $msc, "\n"
  481.     if $DMathSmallLevel1 ne "";
  482.     print $handle $i1, $mso, 'DMathMediumLevel1 ', $DMathMediumLevel1, 
  483.                $msc, "\n"
  484.     if $DMathMediumLevel1 ne "";
  485.     print $handle $i1, $mso, 'DMathLargeLevel1 ', $DMathLargeLevel1, $msc, "\n"
  486.     if $DMathLargeLevel1 ne "";
  487.     print $handle $i1, $mso, 'DMathSmallLevel2 ', $DMathSmallLevel2, $msc, "\n"
  488.     if $DMathSmallLevel2 ne "";
  489.     print $handle $i1, $mso, 'DMathMediumLevel2 ', $DMathMediumLevel2, 
  490.                $msc, "\n"
  491.     if $DMathMediumLevel2 ne "";
  492.     print $handle $i1, $mso, 'DMathLargeLevel2 ', $DMathLargeLevel2, $msc, "\n"
  493.     if $DMathLargeLevel2 ne "";
  494.     print $handle $i1, $mso, 'DMathSmallLevel3 ', $DMathSmallLevel3, $msc, "\n"
  495.     if $DMathSmallLevel3 ne "";
  496.     print $handle $i1, $mso, 'DMathMediumLevel3 ', $DMathMediumLevel3, 
  497.                $msc, "\n"
  498.     if $DMathMediumLevel3 ne "";
  499.     print $handle $i1, $mso, 'DMathLargeLevel3 ', $DMathLargeLevel3, $msc, "\n"
  500.     if $DMathLargeLevel3 ne "";
  501.     print $handle $i1, $mso, 'DMathSmallHoriz ', $DMathSmallHoriz, $msc, "\n"
  502.     if $DMathSmallHoriz ne "";
  503.     print $handle $i1, $mso, 'DMathMediumHoriz ', $DMathMediumHoriz, $msc, "\n"
  504.     if $DMathMediumHoriz ne "";
  505.     print $handle $i1, $mso, 'DMathLargeHoriz ', $DMathLargeHoriz, $msc, "\n"
  506.     if $DMathLargeHoriz ne "";
  507.     print $handle $i1, $mso, 'DMathSmallVert ', $DMathSmallVert, $msc, "\n"
  508.     if $DMathSmallVert ne "";
  509.     print $handle $i1, $mso, 'DMathMediumVert ', $DMathMediumVert, $msc, "\n"
  510.     if $DMathMediumVert ne "";
  511.     print $handle $i1, $mso, 'DMathLargeVert ', $DMathLargeVert, $msc, "\n"
  512.     if $DMathLargeVert ne "";
  513.     print $handle $i1, $mso, 'DMathShowCustom ', $DMathShowCustom, $msc, "\n"
  514.     if $DMathShowCustom ne "";
  515.     print $handle $i1, $mso, 'DMathFunctions ', $stb, $DMathFunctions, $ste, 
  516.                $msc, "\n"
  517.     ;
  518.     print $handle $i1, $mso, 'DMathNumbers ', $stb, $DMathNumbers, $ste, 
  519.                $msc, "\n"
  520.     ;
  521.     print $handle $i1, $mso, 'DMathVariables ', $stb, $DMathVariables, $ste, 
  522.                $msc, "\n"
  523.     ;
  524.     print $handle $i1, $mso, 'DMathStrings ', $stb, $DMathStrings, $ste, 
  525.                $msc, "\n"
  526.     ;
  527.     print $handle $i1, $mso, 'DMathGreek ', $stb, $DMathGreek, $ste, $msc, "\n"
  528.     ;
  529.     print $handle $i1, $mso, 'DMathCatalog ', $DMathCatalog, $msc, "\n"
  530.     if $DMathCatalog ne "";
  531.     print $handle $i1, $mso, 'DElementCatalogScope ', $DElementCatalogScope, 
  532.                $msc, "\n"
  533.     if $DElementCatalogScope ne "";
  534.     print $handle $i1, $mso, 'DElementBordersOn ', $DElementBordersOn, 
  535.                $msc, "\n"
  536.     if $DElementBordersOn ne "";
  537.     print $handle $i1, $mso, 'DExclusions ', $DExclusions, $msc, "\n"
  538.     if $DExclusions ne "";
  539.     print $handle $i1, $mso, 'DInclusions ', $DInclusions, $msc, "\n"
  540.     if $DInclusions ne "";
  541.     print $handle $i1, $mso, 'DApplyFormatRules ', $DApplyFormatRules, 
  542.                $msc, "\n"
  543.     if $DApplyFormatRules ne "";
  544.     print $handle $i1, $mso, 'DNoPrintSepColor ', $stb, $DNoPrintSepColor, 
  545.                $ste, $msc, "\n"
  546.     if $DNoPrintSepColor ne "";
  547.     print $handle $i1, $mso, 'DPrintProcessColor ', $stb, $DPrintProcessColor, 
  548.                $ste, $msc, "\n"
  549.     if $DPrintProcessColor ne "";
  550.     print $handle $i1, $mso, 'DPrintSkipBlankPages ', $DPrintSkipBlankPages, 
  551.                $msc, "\n"
  552.     if $DPrintSkipBlankPages ne "";
  553.     print $handle $i1, $mso, 'DPrintSeparations ', $DPrintSeparations, 
  554.                $msc, "\n"
  555.     if $DPrintSeparations ne "";
  556.     print $handle $i0, $msc, " $como end of Document\n";
  557. }
  558. ##---------------------------------------------------------------------------##
  559. ##    Usage:
  560. ##        ($view_rect, $window_rect, $scale) = &'MIFget_doc_win_prop();
  561. ##
  562. sub main'MIFget_doc_win_prop {
  563.     ($DViewRect, $DWindowRect, $DViewScale);
  564. }
  565. ##---------------------------------------------------------------------------##
  566. ##    Usage:
  567. ##        &'MIFset_doc_win_prop($view_rect, $window_rect, $scale);
  568. ##
  569. sub main'MIFset_doc_win_prop {
  570.     ($DViewRect, $DWindowRect, $DViewScale) = @_;
  571. }
  572. ##---------------------------------------------------------------------------##
  573. ##    Usage:
  574. ##        ($margins, $columns, $gap, $pgsize) = &'MIFget_doc_col_prop();
  575. ##
  576. sub main'MIFget_doc_col_prop {
  577.     ($DMargins, $DColumns, $DColumnGap, $PageSize);
  578. }
  579. ##---------------------------------------------------------------------------##
  580. ##    Usage:
  581. ##        &'MIFset_doc_col_prop($margins, $columns, $gap, $pgsize);
  582. ##
  583. sub main'MIFset_doc_col_prop {
  584.     ($DMargins, $DColumns, $DColumnGap, $PageSize) = @_;
  585. }
  586. ##---------------------------------------------------------------------------##
  587. ##    Usage:
  588. ##        ($start, $num_style, $pt_num_style, $twosides, $parity,
  589. ##         $rounding, $frozen) = &'MIFget_doc_pagination();
  590. ##
  591. sub main'MIFget_doc_pagination {
  592.     ($DStartPage, $DPageNumStyle, $DPagePointStyle, $DTwoSides, $DParity,
  593.      $DPageRounding, $DFrozenPages);
  594. }
  595. ##---------------------------------------------------------------------------##
  596. ##    Usage:
  597. ##        &'MIFset_doc_pagination($start, $num_style, $pt_num_style,
  598. ##                    $twosides, $parity, $rounding, $frozen);
  599. ##
  600. sub main'MIFset_doc_pagination {
  601.     ($DStartPage, $DPageNumStyle, $DPagePointStyle, $DTwoSides, $DParity,
  602.      $DPageRounding, $DFrozenPages) = @_;
  603. }
  604. ##---------------------------------------------------------------------------##
  605. ##    MIFreset_doc() resets the variables for Document.
  606. ##
  607. ##    Usage:
  608. ##        &'MIFreset_doc();
  609. ##
  610. sub main'MIFreset_doc {
  611.     $DNextUnique = "";
  612.     $DViewRect = "";
  613.     $DWindowRect = "";
  614.     $DViewScale = "";
  615.     $DMargins = "";
  616.     $DColumns = "";
  617.     $DColumnGap = "";
  618.     $DPageSize = "";
  619.     $DStartPage = "";
  620.     $DPageNumStyle = "";
  621.     $DPagePointStyle = "";
  622.     $DTwoSides = "";
  623.     $DParity = "";
  624.     $DFrozenPages = "";
  625.     $DPageRounding = "";
  626.     $DMaxInterLine = "";
  627.     $DMaxInterPgf = "";
  628.     $DFNoteMaxH = "";
  629.     $FNoteStartNum = "";
  630.     $DFNoteRestart = "";
  631.     $DFNoteTag = "";
  632.     $DFNoteLabels = "";
  633.     $DFNoteNumStyle = "";
  634.     $DFNoteAnchorPos = "";
  635.     $DFNoteNumberPos = "";
  636.     $DFNoteAnchorPrefix = "";
  637.     $DFNoteAnchorSuffix = "";
  638.     $DFNoteNumberPrefix = "";
  639.     $DFNoteNumberSuffix = "";
  640.     $DTblFNoteTag = "";
  641.     $DTblFNoteLabels = "";
  642.     $DTblFNoteNumStyle = "";
  643.     $DTblFNoteAnchorPos = "";
  644.     $DTblFNoteNumberPos = "";
  645.     $DTblFNoteAnchorPrefix = "";
  646.     $DTblFNoteAnchorSuffix = "";
  647.     $DTblFNoteNumberPrefix = "";
  648.     $DTblFNoteNumberSuffix = "";
  649.     $DLinebreakChars = "";
  650.     $DPunctuationChars = "";
  651.     $DChBarGap = "";
  652.     $DChBarWidth = "";
  653.     $DChBarPosition = "";
  654.     $DChBarColor = "";
  655.     $DAutoChBars = "";
  656.     $DShowAllConditions = "";
  657.     $DDisplayOverrides = "";
  658.     $DViewOnly = "";
  659.     $DViewOnlyXRef = "";
  660.     $DViewOnlySelect = "";
  661.     $DViewOnlyNoOp = "";
  662.     $DViewOnlyWinBorders = "";
  663.     $DViewOnlyWinMenubar = "";
  664.     $DViewOnlyWinPopup = "";
  665.     $DViewOnlyWinPalette = "";
  666.     $DGridOn = "";
  667.     $DPageGrid = "";
  668.     $DSnapGrid = "";
  669.     $DSnapRotation = "";
  670.     $DRulersOn = "";
  671.     $DFullRulers = "";
  672.     $DGraphicsOff = "";
  673.     $DCurrentView = "";
  674.     $DBordersOn = "";
  675.     $DSymbolsOn = "";
  676.     $DSmartQuotesOn = "";
  677.     $DSmartSpacesOn = "";
  678.     $DLanguage = "";
  679.     $DSuperscriptSize = "";
  680.     $DSubscriptSize = "";
  681.     $DSmallCapsSize = "";
  682.     $DSuperscriptShift = "";
  683.     $DSubscriptShift = "";
  684.     $DMathAlphaCharFontFamily = "";
  685.     $DMathSmallIntegral = "";
  686.     $DMathMediumIntegral = "";
  687.     $DMathLargeIntegral = "";
  688.     $DMathSmallSigma = "";
  689.     $DMathMediumSigma = "";
  690.     $DMathLargeSigma = "";
  691.     $DMathSmallLevel1 = "";
  692.     $DMathMediumLevel1 = "";
  693.     $DMathLargeLevel1 = "";
  694.     $DMathSmallLevel2 = "";
  695.     $DMathMediumLevel2 = "";
  696.     $DMathLargeLevel2 = "";
  697.     $DMathSmallLevel3 = "";
  698.     $DMathMediumLevel3 = "";
  699.     $DMathLargeLevel3 = "";
  700.     $DMathSmallHoriz = "";
  701.     $DMathMediumHoriz = "";
  702.     $DMathLargeHoriz = "";
  703.     $DMathSmallVert = "";
  704.     $DMathMediumVert = "";
  705.     $DMathLargeVert = "";
  706.     $DMathShowCustom = "";
  707.     $DMathFunctions = "";
  708.     $DMathNumbers = "";
  709.     $DMathVariables = "";
  710.     $DMathStrings = "";
  711.     $DMathGreek = "";
  712.     $DMathCatalog = "";
  713.     $DElementCatalogScope = "";
  714.     $DElementBordersOn = "";
  715.     $DExclusions = "";
  716.     $DInclusions = "";
  717.     $DApplyFormatRules = "";
  718.     $DNoPrintSepColor = "";
  719.     $DPrintProcessColor = "";
  720.     $DPrintSkipBlankPages = "";
  721.     $DPrintSeparations = "";
  722. }
  723. ##---------------------------------------------------------------------------##
  724.                 ##--------------##
  725.                 ## Mif Routines ##
  726.                 ##--------------##
  727. ##---------------------------------------------------------------------------##
  728. ##    The routines definded below are all registered in the %MIFToken         ##
  729. ##    array for use in the MIFread_mif() routine.  There purpose is to     ##
  730. ##    store the information contained in the Document statement.         ##
  731. ##---------------------------------------------------------------------------##
  732.  
  733. ##---------------------------------------------------------------------------
  734. sub mif'Document {
  735.     local($token, $mode, *data) = @_;
  736.  
  737.     if ($mode == $MOpen) {
  738.     ($_fast, $_noidata) = ($mif'fast, $mif'no_import_data);
  739.     ($mif'fast, $mif'no_import_data) = (1, 1);
  740.     } elsif ($mode == $MClose) {
  741.         ($mif'fast, $mif'no_import_data) = ($_fast, $_noidata);
  742.     }
  743. }
  744. ##---------------------------------------------------------------------------
  745. sub string_token {
  746.     local(*token, $mode, *data) = @_;
  747.     ($token) = $data =~ /^\s*$stb([^$ste]*)$ste.*$/o;
  748. }
  749. ##---------------------------------------------------------------------------
  750. sub data_token {
  751.     local(*token, $mode, *data) = @_;
  752.     ($token) = $data =~ /^\s*(.*)$/o;
  753. }
  754. ##---------------------------------------------------------------------------
  755. 1;
  756.