home *** CD-ROM | disk | FTP | other *** search
- TeX Macro Enhancements for EPM 5.51a and EPM 6.00c
-
- Version 2.0
-
- User's Manual
-
- Jon Hacker
- Rodney Korte
-
- August 1994
-
- Disclaimer:
- ~~~~~~~~~~~
-
- See the attached license.txt file that is more or less pilfered from IBM's
- license agreement.
-
-
- Introduction:
- ~~~~~~~~~~~~
- The E macro file tex.e, when compiled with the IBM enhanced Editor
- translator ETPM.EXE, will add a TeX pull down menu to the EPM menu bar.
-
- Menu items in the TeX pull down menu allow the user to TeX (with any format,
- e.g. LATeX), jump to errors in the TeX source, preview (portrait and
- landscape), and print (portrait and landscape) the TeX file currently active
- in EPM. Two custom 'user' modes may also be defined for special needs
- unique to the user.
-
- TeX can be forced to use one of 4 formats (all user-definable) when TeXing
- source code. However, a general 'automatic' mechanism is provided so that
- *any* format can be specified in the first line of the TeX file. This is
- the same method used in texit.cmd by Eberhard Mattes.
-
- For large projects, a "Master" file scheme is supported, using a method
- similar to the automatic format selection method. This allows the user to
- break a large document into many smaller, more manageable ones with fewer
- hassles.
-
- Paper orientation for viewing and printing also can be defined in the
- first line of the TeX file, or chosen through the TeX menu.
-
- TeX syntax assist and TeX accelerator keys can be enabled for files with
- extensions .tex, .sty, .aux, or .log, plus any other extensions defined by
- TEX_USER_FILE_TYPES in MYCNF.E.
-
- Sample TeX files are included in the EXAMPLES directory to demonstrate
- the EPMTeX package. See the file EXAMPLES\T-MAIN.TEX to get started.
-
-
- The Master File Concept
- ~~~~~~~~~~~~~~~~~~~~~~~
- It is useful to break a large document into smaller, more manageable parts.
- The idea is to create a small file, which contains initialization commands,
- special definitions, etc., and then includes other files which have the
- actual text of the document. This small file is the "Master" file. For
- example we might have the following Master file, NOISE.TEX:
-
- % Format: TeXsis % Use the TeXsis format
- \paper % Set page layout
- \TrueDoubleSpacing % Set doublespacing
- \draft % Put into draft mode
- \input NOISE-REFS % References
- \input NOISE-INTRO % Introduction
- \input NOISE-SEC1 % Section 1
- \input NOISE-SEC2 % Section 2
- \input NOISE-SEC3 % Section 3
- \input NOISE-CONC % Conclusion
- \ListReferences % List all References
- \end
-
- The first line will tell EPMTeX (and Eberhard Mattes' texit.cmd) that
- the TeXsis format should be used when TeXing this file. Lines 2-4 are
- TeXsis commands that set the page layout and other things that apply to
- the entire document. The references, as well as each of the 5 sections
- of the paper, are in a separate files which are read in one after another.
- The second-to-last line then prints out the references and finally the
- document ends.
-
- This scheme is useful since not only is the document well organized, now
- sections of the paper can be worked on individually by simply commenting
- out those sections which need not be compiled. When everything is working,
- just uncomment all the sections and recompile.
-
-
- Installation:
- ~~~~~~~~~~~~
- For installation instructions see the file install.doc included with
- this package. If you are upgrading from v1.3, you can probably get up
- to speed faster by reading section 2 of the install manual. This is a
- concise description of what you need to do to get running and assumes
- you already understand the basics of compiling epm E files, and the
- EPMTeX package.
-
-
- Using the EPM Pull Down Menu for TeX:
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- This is a description of the menu items that appear on the TeX sub-menu
- after installing EPMTeX v2.0beta. The TeX menu will be greyed out for
- non-Tex files. (TeX files are defined as having extensions .tex, .log,
- .aux and .sty. You can also specify extensions of your own choice by
- defining the variable TEX_USER_FILE_TYPES in your MYCNF.E file.)
-
- **A double asterisk following the menu choice below signifies that
- determination of the "Master" file is the first thing that is done after
- this choice is made. If a "Master" file specification is found, EPM
- changes the default directory to that directory (so that log files, etc.,
- end up in that directory) and executes the command associated with that
- menu item on the Master file, not the current file. The Master file can
- be specified in any of the following ways (the master file is MYMAIN.TEX):
- % Master: mymain
- % master: mymain
- % Master mymain
- % master mymain
- Any number of spaces can be used between any of the elements in the line.
- All Master and "Slave" (those input from the master) files are assumed to
- be in the same directory. However, they can be placed in different
- directories *if* they are always referenced with a fully qualified
- pathname (no relative path specifications). Forward or back slashes can be
- used in the Master specification above, but remember to use forward slashes
- in \input lines since TeX will interpret backslashes as command sequences.
-
- If a master file is specified but does not actually exist, EPMTeX will
- ask if you want to stop processing or continue as if the Master
- directive was not issued. This has the (nifty) side-effect that you
- can do something like
- % Format: lplain Master : mymain Orientation:Landscape
- for the first line of a file. If you want to TeX only the current file,
- simply modify 'mymain' to something like 'mymain1' and then TeX the
- current file. Note that you would then have a .log and .dvi (and maybe
- other) files lying around that you won't want later! Note that this
- question will pop up for any of the operations below that check for
- a master file name.
-
- Two other "First line directives" are described below: "Format" and
- "Orientation." Note that they can appear in any order on the first
- line of the file. To reiterate, the "Master" directive is processed
- first. If a master file is defined and exists, the Format and
- Orientation directives in the *current* file are ignored. But if
- a master file is defined but does *not* exist, they *will* be used.
- (Hang on, it does make sense!)
-
-
- >TeX Document **
-
- Calls the version of TeX specified by the variable TEX_EXEC in TEXENV.E
- with the format to be used and the name of the current (or Master) file
- appended. Note that the appended filename is specified with UNIX type
- directory delimiters (ie. '/') so that TeX will not barf.
-
- The format to be used is given by the "Format" menu item. If "Automatic"
- is not chosen (one of the other ones is) the format defined in TEXENV.E
- for that menu entry or the format chosen in the Format menu will be used.
- If "Automatic" is chosen, an attempt is made to determine the format from
- the first line of the current (or Master) file. The format can be
- specified in any of the following ways (lplain is the format used here):
-
- % Format: lplain
- % format: lplain
- % Format lplain
- % format lplain
- %Format:lplain
- %format : lplain
- % format :lplain
- ... etc ...
-
- Any number of spaces can be used between any of the elements in the line.
- If the format is not specified but "Automatic" is chosen, EPMTeX will
- issue a warning and continue with the format defined by TEX_FORMAT_PLAIN.
- Note that the format specification only need be placed in the Master
- file, not the slave files.
-
- Note that the format you specify does have to correspond to any format
- defined in the Formats menu (described below). If you specify a format
- that doesn't exist, EPMTeX won't care, but TeX will- you'll get a
- 'Sorry, I can't find that format; will try PLAIN' error.
-
- If the AutoSave option is checked in the TeX pulldown menu, the current
- file will first be saved to disk if the version in EPM memory has been
- modified. If a Master file is defined, EPM loads the Master file and
- scans it for "\input file_name" commands, and checks to see if file_name
- is in the ring. If it is, and has been modified, EPM will save the file.
- If AutoSave is not checked, EPM will ask you if you wish to save the file
- before TeXing.
-
- This action also resets the Error Locating routine to the beginning of
- the LOG file.
-
- >Locate Next Error **
-
- If the LOG file for the current (or Master) file exists, this action will
- load the log file, determine the TeX source file in which the first error
- resides, load that file, position the cursor at the error, and print the
- error message on the message line.
-
- Subsequent selection of this action will cause a search for the next
- error until all errors have been located.
-
- Selecting either the "View LOG File" or "TeX Document" menu options
- resets the search to the beginning of the LOG file.
-
- Note that if you are using a Master file and include a 'slave' file that
- does not have the Master specification in the first line, and EPMTeX
- locates an error in this file, you will have to switch to a file in the
- ring that does have the master file defined to locate subsequent errors.
- This is due to the fact that the error routine will look for a LOG file
- associated with the slave file, not the master, to locate the next error.
- In most cases, it will not exist, so the menu item will be greyed out.
- BE AWARE: if it *does* exist, you may have some trouble since the error
- routine will be looking in the wrong LOG file for the next error!
-
- > View LOG File **
-
- If the LOG file exists, this command will load the associated LOG file for
- the current (or Master) TeX file into the EPM file ring. If there is a
- LOG file currently in the ring, it is removed before the new LOG file is
- loaded.
-
- This action also resets the Error Locating routine to the beginning of
- the LOG file.
-
- >Preview Document **
-
- Calls the TeX previewer specified by the variable TEX_VIEW_EXEC (or
- TEX_VIEWLA_EXEC if landscape orientations is selected) with the name of
- the associated DVI file for the current (or Master) file loaded in EPM
- appended.
-
- The TeX previewer specified by the variable TEX_VIEW_EXEC should be the
- previewer used for portrait orientation. The TeX previewer specified by
- the variable TEX_VIEWLA_EXEC should be the previewer used for landscape
- orientation.
-
- If the Auto LOG Delete option is checked in the TeX pulldown menu, the
- associated LOG file for the current (or Master) file will be
- automatically deleted if it exists.
-
- >Print Document **
-
- Calls the TeX dvi printer driver specified by the variable TEX_PRINT_EXEC
- (or TEX_PRINTLA_EXEC if landscape orientation is selected) with the name
- of the associated DVI file for the current (or Master) file loaded in EPM
- appended.
-
- The TeX printer driver specified by the variable TEX_PRINT_EXEC should be
- the printer driver used for portrait orientation. The TeX printer driver
- specified by the variable TEX_PRINTLA_EXEC should be the printer driver
- used for landscape orientation.
-
- If the Auto LOG Delete option is checked in the TeX pulldown menu, the
- associated LOG file for the current (or Master) file will be automatically
- deleted if it exists.
-
- > User Defined Command #1 **
-
- The command defined as TEX_USER1_EXEC (or TEX_USER1LA_EXEC if landscape
- orientation is chosen) in TEXENV.E will be executed.
-
- > User Defined Command #2 **
-
- The command defined as TEX_USER2_EXEC (or TEX_USER2LA_EXEC if landscape
- orientation is chosen) in TEXENV.E will be executed.
-
- > Delete LOG File **
-
- If file exists, this command will delete the associated LOG file for the
- current (or Master) file loaded in EPM. It also removes this LOG file
- from the ring if it exists.
-
- > Delete DVI File **
-
- If file exists, this command will delete the associated DVI file for the
- current (or Master) file loaded in EPM.
-
- > Format
-
- The chosen format will have a checkmark beside it. If "Automatic" is
- chosen, EPMTeX will attempt to determine the format to be used from the
- first line of the current (or Master) file. If no format is specified
- on the first line, the format defined by TEX_FORMAT_PLAIN will be used.
- If one of the other formats is selected, EPMTeX will explicitly specify
- the format associated with this selection in TEXENV.E on the tex command
- line.
-
- There is no specific "German" mode in this release. Rather, German TeX
- support is included as part of this more general format selection
- method. The German versions of the plain and LATeX formats can be
- defined in TEXENV.E, and can be chosen from this menu.
-
- If the constant TEX_FORMAT_TO_USE is defined (in MYCNF.E) to be
- something other than one of the four formats defined in TEXENV.E,
- none of the formats shown in the Format menu will be checked.
-
- > Orientation
-
- The chosen paper orientation will have a checkmark beside it. If
- "Automatic" is chosen, EPMTeX will attempt to determine the orientation
- to be used from the first line of the current (or Master) file. If no
- orientation is specified on the first line, Portrait will be used. If
- "Portrait" or "Landscape" is chosen, the orientation specified on the
- first line of the file will be overridden.
-
- If the orientation is determined to be landscape, the landscape versions
- of the TeX previewer and printer driver (and the two user-defined
- commands) are used (specified by TEX_VIEWLA_EXEC and TEX_PRINTLA_EXEC
- respectively). Otherwise, the portrait versions (specified by
- TEX_VIEW_EXEC and TEX_PRINT_EXEC respectively) are used. The same
- holds true for the two user-defined commands.
-
- The orientation is specified in a manner similar to that of the
- Format specification above, but there are only two possible orientations:
- "Landscape" and "Portrait". Example specifications:
-
- % Format: lplain Orientation:Landscape
- % Format: TeXsis Orientation:Portrait
- % Orientation:Landscape Format:MyFormat
-
-
- > Auto LOG Delete
-
- If enabled (checkmark beside menu entry) the associated LOG file for the
- current (or Master) file will be automatically deleted if it exists when
- a preview or print command is executed.
-
- > Auto Save
-
- If enabled (checkmark beside menu entry) the current file will first be
- saved to disk if the version in EPM memory has been modified before the
- document is TeX'd. Otherwise, the user will be prompted to save the file.
-
- > Syntax Expansion
-
- NOTE: This option is not available if TeX syntax assist was not included
- at compile time (default is to include it. Set TEX_SYNTAX_ASSIST = 0 to
- not include it.).
-
- If enabled (checkmark beside menu entry) then the built-in TeX syntax
- expansions will be enabled. This is equivalent to typing 'expand on' at
- the EPM command line. The start-up mode is defined by the configuration
- constant MY_EXPAND_ON described in the EPM documentation.
-
- > Debug mode
-
- If enabled (checkmark beside menu entry) the contents of the command
- line sent to the OS/2 'start' command will be displayed on the EPM message
- line. This can be useful when debugging the various TeX commands during the
- installation of the EPMTeX enhancements. It is normally turned off. Note
- that a list of recent messages can be retrieved in EPM under
- options->messages.
-
- > About
-
- Self-explanatory?
-
-
- Using the TeX Syntax Assist for EPM:
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- The TeX syntax assist provided with EPMTeX was developed by Jo Koenen.
- If you have suggestions, or better yet source code, that will expand
- the functionality of this section we would love to hear from you.
-
- This is a brief description of the syntax assist and accelerator keys
- added if TEX_SYNTAX_ASSIST is included at compile time.
-
-
- > Syntax Expansion:
-
- If TEX_SYNTAX_ASSIST = 1 is specified in your MYCNF.E file, then the
- following syntax expansions will be defined.
-
- Loading a file with the extension .tex, .sty, .aux, or .log into EPM enables the
- following enhancements: (the vertical bar | denotes the cursor position)
-
-
- 1. \be (including the blank after \be !!) will be expanded to
- \begin{|}
-
- now you can enter a TeX-word like itemize
-
- \begin{itemize}
-
- press enter and you get
-
- \begin{itemize}
- |
- \end{itemize}
-
- 2. \it (including the blank) will be expanded to
- \item |
-
- 3. \ci (including the blank) will be expanded to
- \cite{|}
-
- That's all I (Jo) have done so far, but it is all source code, therefore
- it's expandable. Every suggestion is welcome.
-
- >Accelerator Keys:
-
- If TEX_WANT_ACCELERATOR_KEYS = 1 is specified in your MYCNF.E file and syntax
- expansion is enabled, then the following TeX accelerator keys will be defined.
-
- Key assignments (the vertical bar | marks the cursor position):
-
- alt-a:=eqnarray|
- alt-b:=\begin{|}
- alt-c:=\cite{|}
- alt-d:=description|
- alt-e:=equation|
- alt-f:=\frac{|}{}
- alt-h:=\hspace*{|}
- alt-i:=\item|
- alt-j:=itemize|
- alt-k:=tabular|
- alt-l:=\label{|}
- alt-m:=\mbox{|}
- alt-n:=enumerate|
- alt-q:=equation|
- alt-r:=\ref{|}
- alt-s:=\sqrt{|}
- alt-v:=\vspace*{|}
- alt-w:=verbatim|
- { :={|}
- $ :=$|$
-
-
- Configuration Constants:
- ~~~~~~~~~~~~~~~~~~~~~~~
-
- The following configuration constants may be included in your MYCNF.E file to
- control syntax expansion support and define the start-up behaviour of the
- 'Format', 'Landscape mode', 'Auto LOG delete', 'Auto Save', and 'Debug mode'
- options.
-
- TEX_SYNTAX_ASSIST
- Set to 1 to include TeX Syntax assist in EPM. Set to 0 to not include
- this option. Default is (1), option on.
-
- TEX_MENU_ALWAYS_ON
- Set to 1 to always have access to the TeX submenu, even if a non-TeX file is
- loaded. Set to 0 to grey out the TeX menu when non-TeX files are loaded.
- Default is (0), greyed menus enabled.
-
- TEX_WANT_ACCELERATOR_KEYS
- Set to 1 to include TeX keyboard accelerator key definitions in EPM. Set to
- 0 to leave the keyboard alone. Default is (0), option off. Requires
- TEX_SYNTAX_ASSIST = 1 to be set to have an effect.
-
- TEX_MARGINS
- Set margins to be effective for TeX files. Default is ('1 70 1'). Requires
- TEX_SYNTAX_ASSIST = 1 to be set to have an effect.
-
- TEX_TABS
- Set tabs to be effective for TeX files. Default is (8). Requires
- TEX_SYNTAX_ASSIST = 1 to be set to have an effect.
-
- TEX_ORIENTATION
- Sets the paper orientation to use at start-up. There are only three
- possible values:
- TEX_ORIENTATION = 'Auto'
- TEX_ORIENTATION = 'Portrait'
- TEX_ORIENTATION = 'Landscape'
-
- TEX_AUTO_DELETE_LOG
- Set to 0 to turn EPMTeX log file auto-delete option off at start-up. Set to 1
- to turn option on at start-up. Default is (1), option on.
-
- TEX_AUTO_SAVE_DOC
- Set to 0 to turn EPMTeX smart save before TeX option off at start-up. Set to
- 1 to turn option on at start-up. Default is (1), option on.
-
- TEX_DEBUG_MODE
- Set to 0 to turn EPMTeX debug mode off at start-up. Set to 1 to turn option
- on at start-up. Default is (0), option off.
-
- TEX_QUICK_KEYS
- Set to 1 to define Sh+F11 to execute the 'TeX Document' menu item and
- Sh+F12 to execute the 'Locate Next Error' menu item. Set to 0 to disable
- this feature. Default is (1), keys defined.
-
- TEX_FORMAT_TO_USE
- Sets the format to use at start-up. This would generally be one of the
- formats defined in TEXENV.E ('plain', 'lplain', or one of the two
- user-defined formats), plus the 'auto' format for automatic selection.
- Default is ('auto').
-
- Examples: TEX_FORMAT_TO_USE = 'auto'
- TEX_FORMAT_TO_USE = 'lplain'
-
- Note that the format you specify does have to correspond to any of the
- defined formats. If you specify a format that isn't defined in TEXENV.E,
- no problem. If you specify a format that just doesn't exist, EPMTeX
- won't care, but TeX will- you'll get a
- 'Sorry, I can't find that format; will try PLAIN' error.
-
- TEX_USER_FILE_TYPES
- Sets file types other than .tex, .sty, .aux, and .log to trigger TeX support.
- The file types do not need to be separated with spaces, although this can be
- done for ease of reading. Default is ('').
- Examples: TEX_USER_FILE_TYPES = 'FGL TBL REF CNT TOC'
- TEX_USER_FILE_TYPES = 'FGLtbLREFcnttoc'
-
-