home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / e / epmtex12.zip / TEX.E < prev    next >
Text File  |  1993-02-19  |  21KB  |  563 lines

  1. /*
  2. ╔════════════════════════════════════════════════════════════════════════════╗
  3. ║ What's it called: EPMTeX V1.2c                                             ║
  4. ║                                                                            ║
  5. ║ What does it do:  The E source code for the EPMTeX enhancements V1.2c      ║
  6. ║                   for EPM.                                                 ║                                                                            ║
  7. ║                                                                            ║
  8. ║ Who and When:     Jon Hacker 2/93                                          ║
  9. ║                   Joachim Koenen 2/93     (syntax assist)                  ║
  10. ║                   Thorsten Domsalla 2/93  (menus, batch files)             ║
  11. ║                                                                            ║
  12. ╚════════════════════════════════════════════════════════════════════════════╝
  13. */
  14.  
  15. /*
  16. ------------------------------------------------------------------------------------
  17. NOTE:  For reasons of speed, I do not load the command processor in spawned
  18.        shells by specifying the /n option in the start command.  This means that
  19.        batch files will not run ( ie. TEX_EXEC=d:\mytex\texit.cmd ) since there
  20.        is no interpreter!  
  21.  
  22.        If you want to specify a batch file as the executable in a *.EXEC 
  23.        variable, then change the corresponding *_IS_CMD variable to 1.
  24.  
  25.        ie.  TEX_EXEC = 'd:\texit.cmd'
  26.             TEX_IS_CMD = 1
  27.  
  28.        Do not use the ^&plain or ^&lplain argument in the start command when
  29.        using batch files as the arguments will not make it through to the 
  30.        command.  
  31.  
  32.        ie.  if you specify TEX_EXEC = 'd:\texit.cmd ^&lplain' then texit.cmd 
  33.        will not receive any arguments.  But, TEX_EXEC = 'd:\texit.cmd' works
  34.        fine!
  35.  
  36.        I have no explanation for this weirdness!  Ask someone smarter.
  37.  
  38.        If you want to run a previewer that is not a PM application, add the
  39.        switch /win or /fs as appropriate in the start commands in the command
  40.        procedure 'texvw'.
  41.  
  42. ------------------------------------------------------------------------------------
  43. */
  44.  
  45. const
  46.  
  47. /* put your TeX executable path, filename and args here */
  48. TEX_EXEC = 'd:\emtex\bin\tex386.exe ^&plain'
  49. TEX_IS_CMD = 0
  50.  
  51. /* put your LaTeX executable path, filename and args here */
  52. LATEX_EXEC = 'd:\emtex\bin\tex386.exe ^&lplain'
  53. LATEX_IS_CMD = 0
  54.  
  55. /* put your Previewer (portrait mode) executable path, filename and args here */
  56. TEX_VIEW_EXEC = 'd:\emtex\dviscr\dvipm7.exe @d:\emtex\dviscr\dvipm.cnf'
  57. TEX_VIEW_IS_CMD = 0
  58.  
  59. /* put your Previewer (landscape mode) executable path, filename and args here */
  60. TEX_VIEWLA_EXEC = 'd:\emtex\dviscr\dvipm7.exe @d:\emtex\dviscr\dvipm.cnf /tr1'
  61. TEX_VIEWLA_IS_CMD = 0
  62.  
  63. /* put your DVI Printer Driver (portrait mode) executable path, filename and args here */
  64. TEX_PRINT_EXEC = 'd:\emtex\dvidrv\dvihplj7.exe @d:\emtex\dvidrv\lj.cnf'
  65. TEX_PRINT_IS_CMD = 0
  66.  
  67. /* put your DVI Printer Driver (landscape mode) executable path, filename and args here */
  68. TEX_PRINTLA_EXEC = 'd:\emtex\dvidrv\dvihplj7.exe @d:\emtex\dvidrv\lj.cnf /tr1'
  69. TEX_PRINTLA_IS_CMD = 0
  70.  
  71. /* OPTIONAL:
  72.    You can define a special mode (German, AMS, Bibtex, ?)  that will appear on 
  73.    the TeX menu.  To do this, replace TEX_USER_MENU_TEXT with the label text
  74.    you want to have appear on the menu and edit the *_USER_EXEC variables
  75.    accordingly.  
  76.  
  77.    Defining TEX_USER_MENU_TEXT = '' disables this feature.
  78. */ 
  79.  
  80. TEX_USER_MENU_TEXT = ''
  81.  
  82. -- Tex mode 'user' executables
  83. TEX_USER_EXEC = 'd:\emtex\user.cmd'
  84. TEX_USER_IS_CMD = 1
  85.  
  86. -- Latex mode 'user' executables
  87. LATEX_USER_EXEC = 'd:\emtex\user.exe'
  88. LATEX_USER_IS_CMD = 0
  89.  
  90. --------------------------------------------------------------------------------------
  91. -- startup default conditions
  92.  
  93. compile if not defined(TEX_SYNTAX_ASSIST)
  94. const   TEX_SYNTAX_ASSIST = 1                --  default is to not include TeX syntax expansion 
  95. compile endif
  96.  
  97. compile if not defined(TEX_MARGINS)
  98. const   TEX_MARGINS = '1 80 1'               --  default margins for TeX syntax assist
  99. compile endif
  100.  
  101. compile if not defined(TEX_TABS)
  102. const   TEX_TABS = 8                         --  default tabs for TeX syntax assist
  103. compile endif
  104.  
  105. compile if not defined(TEX_WANT_ACCELERATOR_KEYS)
  106. const   TEX_WANT_ACCELERATOR_KEYS  = 0        -- default is not to add TeX keyboard accelerators
  107. compile endif                                 -- if TeX syntax assist is enabled.
  108.  
  109. compile if not defined(TEX_LATEX_MODE)
  110. const   TEX_LATEX_MODE = 0                    -- default is to turn off latex mode at startup
  111. compile endif                                  
  112.  
  113. compile if not defined(TEX_USER_MODE)
  114. const   TEX_USER_MODE = 0                    -- default is to turn off user mode at startup
  115. compile endif                                  
  116.  
  117. compile if not defined(TEX_LANDSCAPE_MODE)
  118. const   TEX_LANDSCAPE_MODE = 0                -- default is portrait mode at startup
  119. compile endif
  120.  
  121. compile if not defined(TEX_AUTO_DELETE_LOG)
  122. const   TEX_AUTO_DELETE_LOG = 1               -- default is to turn on log file auto-delete
  123. compile endif                                 -- at startup
  124.  
  125. compile if not defined(TEX_AUTO_SAVE_DOC)
  126. const   TEX_AUTO_SAVE_DOC = 1                 -- default is to turn on smart save before TeX
  127. compile endif                                 -- at startup
  128.  
  129. compile if not defined(TEX_DEBUG_MODE)
  130. const   TEX_DEBUG_MODE = 0                  -- default is to turn off verbose mode for debugging TeX
  131. compile endif                               -- at startup
  132. --------------------------------------------------------------------------------------
  133. definit
  134.     universal tex_submenu_on
  135.     universal tex_latex
  136.     universal tex_user
  137.     universal tex_landscape
  138.     universal tex_auto_log
  139.     universal tex_auto_save
  140.     universal tex_syntax
  141.     universal tex_debug
  142.  
  143.     tex_submenu_on=0
  144.     tex_latex=TEX_LATEX_MODE
  145.     tex_user=TEX_USER_MODE
  146.     tex_landscape=TEX_LANDSCAPE_MODE
  147.     tex_auto_log=TEX_AUTO_DELETE_LOG
  148.     tex_auto_save=TEX_AUTO_SAVE_DOC
  149.     tex_syntax=TEX_SYNTAX_ASSIST
  150.     tex_debug=TEX_DEBUG_MODE
  151.  
  152.  
  153. --------------------------------------------------------------------------------------
  154. -- TeX syntax assist 
  155. --    Only include syntax assist if ALTERNATE_KEYSETS flag is on
  156.  
  157. compile if ALTERNATE_KEYSETS
  158.     compile if TEX_SYNTAX_ASSIST
  159.         include 'texkeys.e'
  160.     compile endif
  161. compile endif
  162.  
  163.  
  164. --------------------------------------------------------------------------------
  165. ------
  166. -- English language support for TeX menu help
  167.  
  168. const
  169. TEX_BARP__MSG = \1'Menus related to TeX support'
  170. TEX_TEXP__MSG = \1'TeX the current file'
  171. TEX_VIEWP__MSG = \1'Preview the current associated DVI file'
  172. TEX_PRP__MSG = \1'Print the current associated DVI output file'
  173. TEX_DLOGP__MSG = \1'Delete the current associated LOG file'
  174. TEX_DDVIP__MSG = \1'Delete the current associated DVI file'
  175. TEX_LATEXP__MSG = \1'LaTeX mode'
  176. TEX_USERP__MSG = \1'User defined mode'
  177. TEX_LANDSCAPEP__MSG = \1'Preview and print in landscape orientation'
  178. TEX_ADLOGP__MSG = \1'Automatic delete of the associated LOG file after View or Print'
  179. TEX_ASAVEP__MSG = \1'Automatic smart save of TeX file before TeXing document.'
  180. TEX_SYNTAXP__MSG = \1'Global syntax expansion mode (expand_on)'
  181. TEX_DEBUGP__MSG = \1'Verbose mode for troubleshooting TeX commands.'
  182.  
  183. /*
  184. ┌───────────────────────────────────────────────────────────────────────────────┐
  185. │  Define TeX menu system                                                       │
  186. └───────────────────────────────────────────────────────────────────────────────┘
  187. */
  188. defselect
  189.    universal defaultmenu, tex_submenu_on, tex_auto_log
  190.    ext = filetype()
  191.    compile if defined(MY_TEX_FILE_TYPE)
  192.       if substr(ext,1,3)='TEX' or ext='STY' or ext='BBL' or ext=MY_TEX_FILE_TYPE then
  193.    compile else
  194.       if substr(ext,1,3)='TEX' or ext='STY' or ext='BBL' then
  195.    compile endif
  196.       if not tex_submenu_on then
  197.          buildsubmenu defaultmenu, 9, '~TeX', TEX_BARP__MSG, 0,0
  198.          buildmenuitem defaultmenu, 9, 901, '~TeX Document',   'tex'TEX_TEXP__MSG, 0,0
  199.          buildmenuitem defaultmenu, 9, 902, \0, '', 4, 0
  200.          buildmenuitem defaultmenu, 9, 903, 'Pre~View Document','texvw'TEX_VIEWP__MSG,  0,0
  201.          buildmenuitem defaultmenu, 9, 904, '~Print Document', 'texpr'TEX_PRP__MSG,  0,0
  202.          buildmenuitem defaultmenu, 9, 905, \0, '', 4, 0
  203.          buildmenuitem defaultmenu, 9, 906, 'Delete LO~G File','tex_del_log'TEX_DLOGP__MSG, 0,0
  204.          buildmenuitem defaultmenu, 9, 907, 'Delete ~DVI File','tex_del_dvi'TEX_DDVIP__MSG, 0,0
  205.          buildmenuitem defaultmenu, 9, 908, \0, '', 4, 0
  206.          buildmenuitem defaultmenu, 9, 909, '~LaTeX Mode','toggle_latex'TEX_LATEXP__MSG, 0,0
  207.          compile if TEX_USER_MENU_TEXT <> ''
  208.             buildmenuitem defaultmenu, 9, 910, TEX_USER_MENU_TEXT,'toggle_user'TEX_USERP__MSG, 0,0
  209.          compile endif
  210.          buildmenuitem defaultmenu, 9, 911, 'La~ndscape Mode','toggle_landscape'TEX_LANDSCAPEP__MSG, 0,0
  211.          buildmenuitem defaultmenu, 9, 912, '~Auto LOG Delete','toggle_auto_log'TEX_ADLOGP__MSG, 0,0
  212.          buildmenuitem defaultmenu, 9, 913, 'Auto ~Save','toggle_auto_save'TEX_ASAVEP__MSG, 0,0
  213.          compile if TEX_SYNTAX_ASSIST
  214.             buildmenuitem defaultmenu, 9, 914, 'Synta~x Expansion','toggle_tex_expand'TEX_SYNTAXP__MSG, 0,0
  215.          compile endif
  216.          buildmenuitem defaultmenu, 9, 915, 'De~bug mode','toggle_debug'TEX_DEBUGP__MSG, 0,0
  217.          tex_submenu_on = 1
  218.       endif
  219.    else
  220.       if tex_submenu_on then
  221.          deletemenu defaultmenu, 9, 0, 0    -- remove TeX submenu if not a TeX file
  222.          tex_submenu_on = 0
  223.       endif
  224.    endif
  225.    showmenu defaultmenu
  226.  
  227. /*
  228. ┌───────────────────────────────────────────────────────────────────────────────┐
  229. │  Command definitions                                                          │
  230. └───────────────────────────────────────────────────────────────────────────────┘
  231. */
  232. -- Create a OS/2 window & execute TeX in it.
  233. defc tex =
  234.     universal tex_latex, tex_user, tex_auto_save, tex_debug
  235.     if .modify then               -- Modified since last Save?
  236.        if tex_auto_save then      --  Want auto smart save feature?
  237.            'Save'                 --   Yes - save it before TeXing document
  238.             sayerror 'Saving modified document before calling TeX!'
  239.        else                       --   No - warn user!
  240.             sayerror 'TeXing stale document file... auto_save disabled!'
  241.        endif
  242.     endif
  243.     n=lastpos('\',.filename)+1
  244.     pathname=delstr(.filename,n-1)
  245.     unixfilename = translate(.filename, '/', '\')
  246.     call directory(pathname)
  247.     
  248.     compile if TEX_USER_MENU_TEXT = ''
  249.         if not tex_latex then
  250.             command=TEX_EXEC ' ' unixfilename
  251.             isCMD = TEX_IS_CMD
  252.         else 
  253.             command=LATEX_EXEC ' ' unixfilename
  254.             isCMD = LATEX_IS_CMD
  255.         endif
  256.     compile else
  257.         if not tex_latex and not tex_user then
  258.             command=TEX_EXEC ' ' unixfilename
  259.             isCMD = TEX_IS_CMD
  260.         else if tex_latex and not tex_user then
  261.             command=LATEX_EXEC ' ' unixfilename
  262.             isCMD = LATEX_IS_CMD
  263.              else if not tex_latex and tex_user then
  264.                     command=TEX_USER_EXEC ' ' unixfilename
  265.                     isCMD = TEX_USER_IS_CMD
  266.                   else if tex_latex and tex_user then
  267.                       command=LATEX_USER_EXEC ' ' unixfilename
  268.                       isCMD = LATEX_USER_IS_CMD
  269.                        endif
  270.                   endif
  271.              endif
  272.         endif
  273.     compile endif
  274.  
  275.     if tex_debug then
  276.         sayerror command
  277.     endif
  278.  
  279.     if isCMD then                -- command is a batch file, use command processor
  280.         'start /c /win 'command
  281.     else
  282.         'start /n /win 'command
  283.     endif
  284.     if rc <> 0 then
  285.         sayerror"Caution! Could not start TeX. Exited with return code = "rc
  286.     endif
  287. -------------------------------------------------------------------------------
  288. -- View current TeX file in previewer. 
  289. defc texvw =
  290.     universal tex_landscape, tex_auto_log, tex_debug
  291.     if  tex_auto_log then
  292.         call tex_delete_log_file()
  293.     endif
  294.     n=lastpos('\',.filename)+1;
  295.     filename=substr(.filename,n);
  296.     pathname=delstr(.filename,n-1);
  297.     n=lastpos('.',filename)+1;
  298.     stem=delstr(filename,n-1);
  299.  
  300.     if tex_landscape then
  301.         command= TEX_VIEWLA_EXEC' 'pathname'\'stem'.dvi'
  302.         isCMD = TEX_VIEWLA_IS_CMD
  303.     else
  304.         command= TEX_VIEW_EXEC' 'pathname'\'stem'.dvi'
  305.         isCMD = TEX_VIEW_IS_CMD
  306.     endif
  307.  
  308.     if tex_debug then
  309.         sayerror command
  310.     endif
  311. ----------
  312. -- NOTE: add /fs or /win if previewer is not a PM app
  313.  
  314.     if isCMD then                -- command is a batch file, use command processor
  315.         'start /c 'command
  316.     else
  317.         'start /n 'command
  318.     endif
  319. ----------
  320.     if rc <> 0 then
  321.         sayerror"Caution! Could not start Previewer. Exited with return code = "rc
  322.     endif
  323.  
  324.  
  325. -------------------------------------------------------------------------------
  326. -- Create a OS/2 window & execute TeX printer driver.
  327. defc texpr =
  328.     universal tex_landscape, tex_auto_log, tex_debug
  329.  
  330.     if  tex_auto_log then
  331.         call tex_delete_log_file()
  332.     endif
  333.  
  334.     n=lastpos('\',.filename)+1;
  335.     filename=substr(.filename,n);
  336.     pathname=delstr(.filename,n-1);
  337.     n=lastpos('.',filename)+1;
  338.     stem=delstr(filename,n-1);
  339.  
  340.     if tex_landscape then
  341.         command= TEX_PRINTLA_EXEC' 'pathname'\'stem'.dvi'
  342.         isCMD = TEX_PRINTLA_IS_CMD
  343.     else
  344.         command= TEX_PRINT_EXEC' 'pathname'\'stem'.dvi'
  345.         isCMD = TEX_PRINT_IS_CMD
  346.     endif
  347.  
  348.     if tex_debug then
  349.         sayerror command
  350.     endif
  351.  
  352.     if isCMD then                -- command is a batch file, use command processor
  353.         'start /c /win 'command
  354.     else
  355.         'start /n /win 'command
  356.     endif
  357.     if rc <> 0 then
  358.         sayerror"Caution! Could not start Printer driver. Exited with return code = "rc
  359.     endif
  360.  
  361.  
  362. -------------------------------------------------------------------------------
  363. -- Delete current TeX LOG file.
  364. defc tex_del_log = call tex_delete_log_file()
  365.  
  366. -------------------------------------------------------------------------------
  367. -- Delete current TeX DVI file.
  368. defc tex_del_dvi = call tex_delete_dvi_file()
  369.  
  370. -------------------------------------------------------------------------------
  371. -- Toggle LaTeX mode flag.
  372. defc toggle_latex =
  373.     universal tex_latex
  374.     universal tex_debug
  375.     tex_latex = not tex_latex
  376.     if tex_debug then
  377.         sayerror 'tex_latex = 'tex_latex
  378.     endif
  379.  
  380. -------------------------------------------------------------------------------
  381. -- Toggle user mode flag.
  382. compile if TEX_USER_MENU_TEXT <> ''
  383.     defc toggle_user =
  384.     universal tex_user, tex_debug
  385.     tex_user = not tex_user
  386.     if tex_debug then
  387.         sayerror 'tex_user = 'tex_user
  388.     endif
  389. compile endif
  390.  
  391. -------------------------------------------------------------------------------
  392. -- Toggle Landscape mode flag.
  393. defc toggle_landscape =
  394.     universal tex_landscape
  395.     universal tex_debug
  396.     tex_landscape = not tex_landscape
  397.     if tex_debug then
  398.         sayerror 'tex_landscape = 'tex_landscape
  399.     endif
  400.  
  401.  
  402. -------------------------------------------------------------------------------
  403. -- Toggle Auto-Delete current TeX LOG file after View or Print flag.
  404. defc toggle_auto_log =
  405.     universal tex_auto_log
  406.     universal tex_debug
  407.     tex_auto_log = not tex_auto_log
  408.     if tex_debug then
  409.         sayerror 'tex_auto_log = 'tex_auto_log
  410.     endif
  411.  
  412.  
  413. -------------------------------------------------------------------------------
  414. -- Toggle Auto smart-save current TeX file before TeXing document .
  415. defc toggle_auto_save =
  416.     universal tex_auto_save
  417.     universal tex_debug
  418.     tex_auto_save = not tex_auto_save
  419.     if tex_debug then
  420.         sayerror 'tex_auto_save = 'tex_auto_save
  421.     endif
  422.  
  423. -------------------------------------------------------------------------------
  424. -- Toggle EPM syntax expansion flag.
  425. compile if TEX_SYNTAX_ASSIST 
  426.     defc toggle_tex_expand =
  427.     universal expand_on, tex_debug
  428.     if expand_on then    
  429.         'expand 'OFF__MSG
  430.     else
  431.         'expand 'ON__MSG
  432.     endif
  433.     if tex_debug then
  434.         sayerror 'expand_on = 'expand_on
  435.     endif
  436. compile endif
  437.  
  438. -------------------------------------------------------------------------------
  439. -- Toggle debug mode for troubleshooting TeX commands.
  440. defc toggle_debug =
  441.     universal tex_debug
  442.     tex_debug = not tex_debug
  443.     if tex_debug then
  444.         sayerror 'tex_debug = 'tex_debug
  445.     endif
  446.  
  447. /*
  448. ┌───────────────────────────────────────────────────────────────────────────────┐
  449. │  Procedure definitions                                                        │
  450. └───────────────────────────────────────────────────────────────────────────────┘
  451. */
  452.  
  453. -- Delete current TeX LOG file.
  454. defproc tex_delete_log_file
  455.     n=lastpos('\',.filename)+1;
  456.     filename=substr(.filename,n);
  457.     pathname=delstr(.filename,n-1);
  458.     n=lastpos('.',filename)+1;
  459.     stem=delstr(filename,n-1);
  460.     rc = erasetemp(pathname'\'stem'.log')
  461.     if rc = 0 then
  462.        sayerror 'File 'stem'.LOG deleted'
  463.     elseif rc = 2 then
  464.         sayerror 'Delete LOG: file 'stem'.LOG could not be found'
  465.     else
  466.         sayerror 'Delete LOG: file 'stem'.LOG could not be deleted'
  467.         beep(1000, 100)
  468.     endif
  469.  
  470.  
  471. -------------------------------------------------------------------------------
  472. -- Delete current TeX DVI file.
  473. defproc tex_delete_dvi_file
  474.     n=lastpos('\',.filename)+1;
  475.     filename=substr(.filename,n);
  476.     pathname=delstr(.filename,n-1);
  477.     n=lastpos('.',filename)+1;
  478.     stem=delstr(filename,n-1);
  479.     rc = erasetemp(pathname'\'stem'.dvi')
  480.     if rc = 0 then
  481.        sayerror 'File 'stem'.DVI deleted'
  482.     elseif rc = 2 then
  483.         sayerror 'Delete DVI: file 'stem'.DVI could not be found'
  484.     else
  485.         sayerror 'Delete DVI: file 'stem'.DVI could not be deleted'
  486.         beep(1000, 100)
  487.     endif
  488.  
  489. -------------------------------------------------------------------------------
  490. -- called in mymnuini.e to get state of global TeX variable tex_latex
  491.  
  492. defproc get_tex_latex =
  493.     universal tex_latex
  494.     return tex_latex
  495.  
  496. -------------------------------------------------------------------------------
  497. -- called in mymnuini.e to get info on user menu options
  498. --  arg = 0 -> query tex_user_defined flag
  499. --        1 -> query tex_user flag
  500.  
  501. defproc get_tex_user =
  502.     compile if TEX_USER_MENU_TEXT = ''
  503.         return 0             -- respond with user menu option undefined
  504.     compile else
  505.         universal tex_user
  506.         if arg(1) = 0 then   -- respond with user menu option defined
  507.             return 1
  508.         else
  509.             return tex_user  -- query tex_user flag
  510.         endif
  511.     compile endif
  512.  
  513. -------------------------------------------------------------------------------
  514. -- called in mymnuini.e to get state of global TeX variable tex_landscape
  515.  
  516. defproc get_tex_landscape =
  517.     universal tex_landscape
  518.     return tex_landscape
  519.  
  520. -------------------------------------------------------------------------------
  521. -- called in mymnuini.e to get state of global TeX variable tex_auto_log
  522.  
  523. defproc get_tex_auto_log =
  524.     universal tex_auto_log
  525.     return tex_auto_log
  526.  
  527. -------------------------------------------------------------------------------
  528. -- called in mymnuini.e to get state of global TeX variable tex_auto_save
  529.  
  530. defproc get_tex_auto_save =
  531.     universal tex_auto_save
  532.     return tex_auto_save
  533.  
  534. -------------------------------------------------------------------------------
  535. -- called in mymnuini.e to get info on syntax menu options
  536. --  arg = 0 -> query tex_syntax flag
  537. --        1 -> query  expand_on flag
  538.  
  539. defproc get_tex_syntax =
  540.     universal tex_syntax, expand_on
  541.     if arg(1) = 0 then           -- query tex_syntax
  542.         return tex_syntax
  543.     else
  544.         return expand_on         -- query expand_on
  545.     endif
  546.  
  547. -------------------------------------------------------------------------------
  548. -- called in mymnuini.e to get state of global EPM variable expand_on
  549.  
  550. defproc get_tex_expand_on =
  551.     universal expand_on
  552.     return expand_on
  553.  
  554. -------------------------------------------------------------------------------
  555. -- called in mymnuini.e to get state of global TeX variable tex_debug
  556.  
  557. defproc get_tex_debug =
  558.     universal tex_debug
  559.     return tex_debug
  560.  
  561. -------------------------------------------------------------------------------
  562.  
  563.