pmCSTeX for EPM - documentation

This html documentation is the same as pmCSTeX.INF book included in the pmCSTeX distribution.

1 Introduction

Welcome to pmCSTeX for EPM, version 16. 4. 2000.

1.1 Abstract

pmCSTeX for EPM is a macro package for the OS/2 editor EPM.  It adds CSTeX menu into the EPM's menu, hotkeys as well as some buttons on the EPM toolbar, allowing many of (em)TeX-related actions (TeXing, dvi-previewing, dvipsing, BibTeXing...) to be easily accessed.

The aim of this work was the implementation of a pleasant emTeX menu system for OS/2.  Editor EPM has been chosen since it provides wonderful programming capabilities, and, what it is the most important for the Czech users, there is a programmable Czech keyboard implemented by Z. Wagner (you can get it anonymously from ftp.icpf.cas.cz).  (It should be noted that the keyboard that IBM includes in Warp is nearly unusable for programmers, who mostly prefer a reasonable combination of the US and Czech keyboard layouts, and not the standard Czech typing machine layout. It is really bad that IBM does not provide (nor in Merlin!) a configurable keyboard driver or the source code for pmmerge.dll and keyboard.dcp).

This package is called pmCSTeX since it is related to the CSTeX distribution of TeX and because it was worked out by me (pm).  CSTeX (Czech and Slovak TeX) is being released since 1993 and it is based on the TeX implementation by Eberhard Mattes (the famous emTeX).  In addition to the standard emTeX distribution, the CSTeX distribution contains styles and some programs that support TeX typesetting in the Czech and Slovak languages.  CSTeX includes an installation program (which is missing in emTeX) and a very pleasant menu system for DOS. Nowadays, CSTeX covers Czech specials for unixes as well.

The pmCSTeX package does not require CSTeX installation; you can use it with any (em)TeX distribution.

Note: The coincidence of the abbreviation of my name and the abbreviation of the Presentation Manager is just accidental. Unfortunately, IBM does not pay me any royalties.  Thus even this package is free, you are welcome to send me donations :-)

Joking...  postcards are welcome, but sending a short e-mail is easier and more rapid.

1.2 Motivation

Working on the pmCSTeX for EPM, the author was motivated by the following packages:

• CSTeX MNU for DOS: TeX menu system for DOS, included in the CSTeX distribution. Author: Petr Olsak
• TeXshell: Turbo Vision TeX developing system (for DOS and DOS window in OS/2). I liked it very much (I like Borland-like environments, on-line help etc.), it is programmable in a wonderful way. However, it's just DOS and it has many disadvantages coming from the Turbo Vision library: it has 64KB limit on file sizes, it crashes from time to time (in my OS/2 window), and there is no "Undo" function. Author: Juergen Schlegelmilch
• EPMTeX: TeX menu system for editor EPM. Good, but it does not fulfilled my high expectations I got accustomed to in TeXshell (late 1995), e.g. it always appended the Master file at the command line. I accepted its First line syntax (Master:, Format: etc.). Authors: Jon Hacker and Rodney Korte
• WETeX: actions and icons are defined for texing, previewing and more for a document. Based on WPS and EAs, not Master: notation. I did not use it because of not having enough RAM to work under WPS (I had 12 MB RAM and I preferred Program Commander/2 RUNWORKPLACE replacement). Author: Zdenek Wagner
• emacs: well, I never used this editor except for very simple editing (I prefer vi on unix). However, I was always amazed by its feature "(La)TeX current paragraph"---therefore I implemented it in the pmCSTeX for EPM too. Authors: GNU
• pmgraf: that's my integrated Turbo Vision environment for plotting the 2d and 3d graphs (see my WWW page for more details). The build-in editor (the same as that in the TeXshell) contains the hotkeys for pull-down menus for LaTeX environments and font sizes, and a Greek keyboard. Thus I implemented these features into EPM as well. Author: Petr Mikulik

Note:  in 1998, there appeared a package called epmtfe: EPM TeX Front End (distributed as epmtfe.zip) by Walter Schmidt. Unfortunately, the author reeinvets the functionality of pmCSTeX for EPM. Even though I immediately asked him not to duplicate the work and make a collaborate together, this has not happened so that nowadays you may find both our packages on the net.  In my humble opinion, I still believe that my pmCSTeX is superiour to epmtfe, profiting from its two-year advance and writing my thesis as well as many other documents with it.

Package pmCSTeX for EPM.
Copyright  1996  Petr Mikulik
___________________________

Package license: free-latex     distributed under the same terms as LaTeX

This program can be redistributed and/or modified under the terms of the LaTeX Project Public License Distributed from CTAN archives in directory macros/latex/base/lppl.txt; either version 1 of the License, or any later version.

License meaning in short:  use and distribution permitted, like any freeware. Package must be distributed together with the source code.  Reuse of the source code or any part of it is allowed.  Any changes or enhancement to this package must involve a change of name unless these changes are accepted by the author. You are welcome to submit your bugfixes, updates or new features.

Because the program is licensed free of charge, there is no warranty for any of its component.  You are responsible for any software, hardware, human or nature disaster resulting from installing and using of this package.  I am not responsible for any of your problem --- I am not EPM programmer, I'm physicist.

1.4 Author

Petr Mikulik

Department of Solid State Physics, and Laboratory of Thin Films and Nanostructures, Faculty of Science, Masaryk University, Kotlarska 2, 611 37 Brno, Czech Republic

Katedra fyziky pevne faze a Laborator tenkych vrstev a nanostruktur, Prirodovedecka fakulta, Masarykova univerzita, Kotlarska 2, 611 37 Brno

e-mail: mikulik@physics.muni.cz

URL: http://www.sci.muni.cz/~mikulik/

Homepage of pmCSTeX for EPM is

        http://www.sci.muni.cz/~mikulik/os2/pmCSTeX.html

pmCSTeX for EPM is available on hobbes.nmsu.edu (directory /pub/os2/apps/editors/epm), on ftp.leo.org (directory pub/comp/os/os2/emTeX/contrib) and on CTAN mirrors (directory CTAN/systems/os2/pmcstex).  Online documentation and the up-to-date bug fix list (if needed) is available on my WWW page.

Further, for Czech/Slovak users only: pmCSTeX for EPM is included in my os2.zip modul in the CSTeX distribution, see http://math.feld.cvut.cz/olsak/cstex/.

2 Installation

The installation instructions are described in the subsections.

This package was developed and tested on EPM 6.03 and EPM 6.03b.  Get the latest version of EPM if you have an older one, i.e.  EPM 5.51 shipped with OS/2 Warp 3.0. OS/2 Warp 4.0 (Merlin) ships with EPM 6.03b; however, for compiling the macros yourself you need the whole EPM distribution from the Net.

2.1 Information for Warp 3.0 users

Get the EPM 6.03b (or later) from the Net and install it into the directory \APPS\EPM (or choose another directory if you like, but then change all the following information accordingly).

2.2 Information for Merlin users

EPM 6.03b is a part of the OS/2 Warp 4.0 (Merlin). This operating system ships a localized version of EPM, which consists of the files \OS2\APPS\*epm*, \OS2\APPS\DLL\epm*, \OS2\APPS\DLL\etk* and \OS2\HELP\EPM* (at least in my Merlin CZ it is like that).

Consequently, you have these possibilities of installing and running EPM:

1. Use the shipped EPM.  Install pmCSTeX as explained further (into \APPS\EPM\CSTeX), but do not forget to keep EPMPATH pointing also to the \OS2\APPS directory (SET EPMPATH=...;E:\OS2\APPS).  Then look which files in the directory \APPS\EPM\CSTeX are found before those of the same name in the directory \OS2\APPS (actions.lst, for instance).

2. Use the shipped EPM, but move it into the directory \APPS\EPM in order to avoid the confusion of having several files of the same name in different directories on the hard disk:  Create the directory \APPS\EPM.  Move all files \OS2\APPS\*epm* and \OS2\APPS\DLL\epm*, \OS2\APPS\DLL\etk* and \OS2\HELP\EPM* to \APPS\EPM.  Then install pmCSTeX as explained further.

3. Let the shipped localized EPM in its \OS2\APPS directories.  Install the EPM from the Net (this is a US version) into \APPS\EPM, thus you will get the whole documentation, the sources for all macros etc.  Finally, install pmCSTeX as explained further.  Any time, you will be able to start the localized EPM from the command line \OS2\APPS\epm.exe or from an associated icon.

I use the method 3.

2.3 Upgrading pmCSTeX for EPM

Upgrading pmCSTeX from the release 1996 requires complete reinstallation (but nobody is still using this version I hope).

If you have a working configuration from 1997 or later, then instead of the full installation make the upgrade discussed in this section.  Replace the old files by their current version, or read the documentation as mentioned below:

• Updated EPM macros: CSTeX.e, CSTeX.ex, pm4EPM.e, pm4EPM.ex, pm_keys.e, pm_keys.ex, Profile.erx
• Updated documentation: pmCSTeX.INF, pmCSTeX.emxdoc
• MyCNF.e and MyCNF.ex have been taken away from the <=1997 releases (its defload routine for syntax highlighting has been moved to pm_keys.e; thus also 'link MyCNF' has been taken away from the Profile.erx
• Installation of advanced macros with many additions for fine TeX et al. files writing has been newly written.  Its corresponding macro files are in the directory install\advanced
• There are no new changes to config.sys
• LaTeX2e.INF of the version 1.6 is available from the directory install\l2e_ndx, and LaTeX2e.NDX has been updated as well
• Updated sampactn.e / sampactn.ex (see the reference to 29. 12. 1997 in History)
• Please move all files from install\dvips directory into \EMTEX\data\dvips directory.  Then you can easily use Double-side or slot 2 printing from dvips

Please, see the History of pmCSTeX to track for the changes I made in pmCSTeX since your current version.

2.4 Installation of pmCSTeX for EPM

I hope you already unzip-ed pmCSTeX.zip in an empty directory.  Let us suppose you correctly installed EPM to the directory E:\APPS\EPM.  Thus make directory E:\APPS\EPM\CSTeX (note:  use your drive letters; I have applications on drive E: and the operating system on drive F:).  Then

1. Move all files (not directories!)  from the install directory into \APPS\EPM\CSTeX.  Since you cannot move this pmCSTeX.INF while reading it, please exit it before the movement and then reload it back from \APPS\EPM\CSTeX.
2. Move CSTeX.* from one of the install\e-ex directories into \APPS\EPM\CSTeX:  the users of the CSTeX distribution use the directory e-ex.CS, all other world uses e-ex.NCS.  [Note:  install\e-ex.CS\CSTeX.e is compiled with the option CSTEX_CSTEX = 1, and install\e-ex.NCS\CSTeX.e is compiled with the option CSTEX_CSTEX = 0, see the section about the macro recompiling.)
3. Move install\e-ex.CS\Profile.erx or install\e-ex.NCS\Profile.erx into \APPS\EPM (this is an "autoexec.bat" for each file loaded into EPM), but please take care when moving it:  you may already have this file which you may have already modified---in that case only modify what is missing in your Profile.erx.  At least you should add and 'link pm4epm' and 'link CSTeX', and something more for pm_keys, Czech keyboard, syntax highliting, etc.
4. Switch on the EPM option Settings/Misc/Rexx profile so that EPM reads Profile.erx for each file being loaded.
5. CSTeX distribution users should install the Czech keyboard driver for EPM (implemented by Z. Wagner) if they are not satisfied with the typing machine layout.  If you already use the original czech.e and czech.ex, you have to replace it by the version compatible with pmCSTeX -- see also Czech.E. Therefore backup the original czech.e and czech.ex and replace them by moving the files install\e-ex.CS\czech.ex and install\e-ex.CS\czech_PM.zip into the directory \APPS\EPM\CSTeX.
6. Move the file actions.lst from the directory install\apps-epm into \APPS\EPM.  Be aware again---thi file can exist on your system, so:  add only the changes of actions.lst, i.e.  add the lines CSTeX and pm4EPM.
7. Move all files from install\cmd.CS or install\cmd.NCS into your \EMTEX\bin directory.  You must replace these files if you had the previous version of pmCSTeX (because of introducing the keyword EMTEXOPT), except for the *dvips.cmd files, that you may have modified yourself (sheet alignment can be introduced either here or in the dvips.cnf file).
8. Please move all files from install\dvips directory into \EMTEX\data\dvips directory.  Then you can easily use Double-side or slot 2 printing from dvips.
9. CSTeX-distribution users should move the binary files install\exe.CS\vlnka2.exe and install\exe.CS\dvi-out2.exe into \EMTEX\bin directory.  The original Turbo Pascal sources were compiled by Speed Pascal for OS/2, so that kbdvio32.dll must be present somewhere on your LIBPATH (I prefer the directory \UTILS).

If you are yet not using the cs2cs convertor, then copy it somewhere on your PATH (I have it in the directory \UTILS).  The full package of this programs, accompanied by the documentation and the source code, is available from the author's (Ferdinand Prantl, Jr.)  ftp site, ftp://aip1.fsv.cvut.cz/sys/pub/users/ferdi/cs2cs.zip.

Now, edit config.sys and change it like (use the letters of the partitions according to your hard disk, my system drive is F:):

Example:

        SET EPMPATH=E:\APPS\EPM;E:\APPS\EPM\CSTeX;...;F:\OS2\APPS;...

Further,

Example:

        SET EMTEXOPT=/mt65000 /mp65000

(this change together with the update of .cmd files is dated 19.5.1996, see History).

Add the path to your dictionary files US.dic, UK.dic, FR.dic, GR.dic etc... (please, read about the spell checker for more details where to get these files and how to ensure that they are used for both EPM and IBM Works):

Example:

        SET EPM_DICTIONARIES=e:\apps\epm\Dictionaries

[Note:  it's now more then one year after the Czech IBM released their "localized" version of Warp, but they are still not able to produce CZ.dic :-(( This and many other small things make really bad impression on the wonderful Warp.)

I'm quite sure you want the on-line hypertext help about the LaTeX2e commands. Thus move the files from the directory l2e_ndx into the directory %EMTEXDIR%\BOOK\ENGLISH (like E:\EMTEX\BOOK\ENGLISH). You can read @CTINDX (in Czech) or @READNDX (in English) how I have created LaTeX2e.INF and LaTeX2e.NDX. If you follow the instructions there you find that you have to modify your config.sys:

Example:

        SET BOOKSHELF=..;E:\EMTEX\BOOK\ENGLISH;...
SET EPMPATH=...;E:\EMTEX\BOOK\ENGLISH;...
SET HELPNDX=...+LaTeX2e.NDX

Now reboot your computer. When it is done, go to E:\APPS\EPM\CSTeX and type
        start epm

A new menu item CSTeX should appear on the menu bar.  If not, something was wrong and you should repair it (have a good chance!).

Now install the CSTeX toolbar.  Go to File/Settings/Toolbars, use "Import" file E:\APPS\EPM\CSTeX\CSTeX.bar, name it CSTeX toolbar and then "Make current".  Admire it.  If you are not satisfied, change the toolbar as you wish (I encourage you to remove it the next day after well sleeping, since my toolbar is really good :-)) ...  but I accept that you may like another one).

Please, now verify that you can run from the command line commands latex (=latex2e), plaintex, latex209 etc.  (CSTeX-distribution users should use cslatex, csplain, cslatex209 etc.).  You should have installed emTeX in such a way, that you have latex.cmd, plain.cmd,...  (or latex.cmd = cslatex.cmd, csplain.cmd, cslatex209.cmd,...)  in %EMTEXDIR%\bin, see above.  So you should be able to recompile any LaTeX document typing the command (in an OS/2 window)

Example:

        latex _any_latex_document_.tex

You should be able to start the previewer by

Example:

        start dvipm @dvipm.cnf _any_tex_document_.dvi

(I supposed you copied lj.cnf or p6l.cnf or whatever resolution you want to the file dvipm.cnf). If the above does not work, configure emTeX properly.  You find valuable information in files \EMTEX\BOOK and \EMTEX\DOC.

Check the last lines of %EMTEXDIR%\bin\maketexp.cmd file if you want that dvips generates fonts automatically (dvipm does that par definion).

If you want to run (La)TeX over your document from the command line (without launching EPM), you can also use pmTeXit.cmd _your_file_.tex. However, pmTeXit.cmd knows only about the Format: keyword, so it is really better to run TeXing from the EPM, namely if you are using AMS-LaTeX and the Emtexopt: keyword. See to do.

Now you can customize your EPM:  when installing EPM for my friends, I usually delete \OS2\epm.ini and copy them my install\apps-epm\epm.ini into the directory \APPS\EPM---you can do that too it if you like.  You can play with the values in File/Settings/Misc., and read their documentation (I think you must have "REXX support" on; and I further prefer "Stream mode editing").

You may or may not want the automatic syntax highlighting.

Read Czech.E if you want to use the Czech keyboard in pmCSTeX or go to Tutorial. Please don't forget to read about the syntax of the keywords on the first line of the Master file.

2.5 Installing psview.cmd

psview package is in the subdirectory psview. This is a nice small tool for rapid PostScript file visualisation. It is a keyboard-driven front-end to GhostScript (not mouseable as gvpm).  Great for small PostScript files or for writing your own commands.

Installation:  unzip the package.  Read and execute ReadMe, which should result in the following:

• *.ps (i.e. gs312.ps and ps_view.ps) are in your GhostScript directory (e.g. E:\GS\gs4.03)
• *.cmd (at least psview.cmd which is used by pmCSTeX for EPM), must be somewhere along your PATH
• finally insure that psview.cmd and gs.exe (=gsos2.exe) are on PATH; config.sys have sth. like (see the GS documentation) SET GS_LIB=E:\GS\gs4.03;E:\GS\gs4.03\fonts;.\ Note: there is already GhostScript 5.10 in December 1997.

2.6 Syntax highlighting

There are people that do like syntax highlighting (yes, I do) and those they do not like this colour circus.  This section deals with the installation of this feature.  If you have copied all files and pm_keys from the pmCSTeX distribution without changes, then it should work. Just try to download any .h or .cpp or .tex or ...  file into EPM.

I prefer the syntax highlighting as usually used in Turbo Vision---yellow letters on blue background.  If you set those colours in the Settings of EPM, then you may find worth to copy the files from the directory pm_hilit to the directory \APPS\EPM to adjust the appropriate highlighting files for this colour scheme.  Moreover, syntax highlighting for .log files (created by TeX) are supported by the epmkwds.log file, so as the PostScript files (this is surely not complete; don't you have a list of all the postscript commands?)  and awk files (GNU awk is a great and simple C/REXX-like scripting language).  Please don't forget to backup the original files epmkwds.* files before you overwrite them.  Please see also I cannot see \begin FAQ.

Now the installation (or the deinstallation if you proceed in the reversed order) of the colour highliting:

In order to apply the colours into files listed on the command line after EPM has been started, add the following line to your Profile.erx file (done in its supplied version):

        'cstex_highlight_all S'

To let the files loaded from within EPM (e.g.  via menu) to be coloured, put the following code into any *.e file and compile it---I have it in pm_keys.e (see pm_keys):
        defload
'a_togl_hilit S'

and recompile it.

Files are highlighted according to their extension listed in sampactn.e file (and loaded from sampactn.ex) according to the colour scheme defined in the file like epmkwds._extension_. The file epmkwds.c contains the syntax of the colouring. Of course, you should have put the line

Example:

        'link sampactn'

into your Profile.erx (also done in the supplied Profile.erx).

My sampactn.e and sampactn.ex included in the pmCSTeX distribution includes also .sty, .cls and .dtx extensions for being TeX-like coloured, and the .log file colour, and the fortran .f files. If you want to recompile sampactn.e yourself, you need files english.e, stdconst.e and menuhelp.h from epmmac.zip.

2.7 My config.sys

Occasionally problems appear when some global variables in config.sys are missing.  Here is my config.sys if you want to have a look:

Example:


SET PATH=...;e:\apps\epm;F:\OS2\APPS;e:\emtex\bin;...
SET DPATH=...;e:\apps\epm;F:\OS2\APPS;...
LIBPATH=...;e:\apps\epm;F:\OS2\APPS\DLL;e:\emtex\dll;...
SET BOOKSHELF=...;e:\apps\epm;e:\emtex\book\english;...
rem Someone prefers german instead of english
SET HELP=...;e:\emtex\help;...

...

rem ******************** emTeX *********************************

SET EMTEXDRV=E
SET EMTEXDIR=E:\EMTEX
SET TEXINPUT=E:\EMTEX\TEXINPUT!
rem For plain only; *tex*.cmd scripts redefine this
SET EMTEXOPT=/mt65000 /mp65000
rem This you MUST have!
SET DVIDRVINPUT=E:\EMTEX\DOC;E:\EMTEX\DOC\ENGLISH
SET DVIDRVFONTS=E:\EMTEX\fonts
rem In this case, I do not use the recommendation by E. Mattes to use \TEXFONTS directory
rem I do not like too much directories in the root
SET MFJOBOPT=/3
rem for using the mf386 version of MetaFont
SET INDEXSTYLE=E:\EMTEX\texinput\latex2e
rem sth like path for MakeIndex, .ist files?
SET TEXCONFIG=E:\EMTEX\data\dvips
SET CSBIBALP=E:\EMTEX\data\csbibtex

REM *** EPM
SET EPMPATH=e:\apps\epm;e:\apps\epm\cstex;e:\apps\epm\epmmac;e:\apps\epm\epmmac2;
e:\emtex\book\english;e:\emtex\book\czech;F:\OS2\APPS
SET HELPNDX=EPMKWHLP.NDX+EMX.NDX+LaTeX2e.NDX

REM *** pmCSTeX for EPM
SET TEXFORMATDEFAULT=latex
SET EPM_DICTIONARIES=e:\apps\epm\Dictionaries\
rem where are the dictionaries UK.dic, FR.dic, GR.dic etc. located


(Note:  there is SET EPMPATH=...;F:\opendoc\bin under Merlin and OpenDoc)

2.8 Spell checking in EPM

EPM comes with the US dictionary and synonym file (the EPM found on the Net, and the EPM enclosed in the "localized" Czech Merlin).  If you want to proof text written in another language, it could be easy if you have BonusPak for other languages, because the IBM Works from your BonusPak uses the same dictionary files as the EPM.  Thus go to the directory of IBM Works of the desired language version on your CD-ROM BonusPak (shipped with OS/2 Warp 3.0) and copy diction.@ file to your hard disc.  Unpack it by the command unpack diction.@ and copy the dictionary files (US.dic, UK.dic, francais.dic (I renamed this to FR.dic), GR.dic) to the desired location (I prefer \apps\epm\Dictionaries). Then type the dictionary filename into EPM Settings/Paths/Dictionary file and rename the default personal dictionary lexam.adl to something like UK.adl, FR.adl etc.  There is/was another confusion:  some versions of EPM called these files *.dct; look at your hard disk, and delete it or rename it to *.dic.

Put into your config.sys:

Example:

        SET EPM_DICTIONARIES=e:\apps\epm\Dictionaries\

The same dictionary should be set up from the IBM Works settings if you have installed this package.

Then you can use the menu CSTeX/Spell-Checker to easily switch between the dictionaries of different languages, which saves your time and nerves for doing that in File/Settings/Paths/Dictionary Files and Personal Dictionary.  The chosen dictionary is used until you exit EPM.  You can make this change permanent by entering and closing the Settings.

Note that your attempt to change the dictionary when Auto-spellcheck is on does not change the dictionary.

Since it seems that there are people that don't have that BonusPak CD, I have put some dictionaries somewhere on our ftp server and linked it to my WWW page. Or have IBM put it somewhere? (Well, I was badly surprised that the Czech "localized" (!) version of OS/2 Warp 4.0 Merlin contains only the US (!) dictionary, even I complained about that in the beta-testing).

2.9 Installation of advanced macros

If you are too tired of installing pmCSTeX, you may skip this section and read this section later.

Otherwise, you may install the following features:

These they are independent of the CSTeX macro functionality, and included into the pmCSTeX package since they are fine when writing TeX files.

2.9.1 TeX-aware paragraph reformatting

The hotkey Alt-P is used for reformatting the current paragraph to the current margins (see also Alt-Z in pm_keys).  However, the default reflowing routine is not TeX-aware, i.e.  it breaks lines with comments (text after the % character) and reformats into lines also the \begin{sth} ... \end{sth} LaTeX environments.

I have modified the macros responsible for the reformatting process.  If these are installed (see below), then the TeX-aware function is activated when editing *.tex, *.latex, *.sty, *.dtx, *.cls files, see also the constant TEX_EXTENSIONS in install\advanced\PM_MyCNF.e). If no text is marked and Alt-P is pressed, then the paragraph reflowing stops at the first blank line (default) or at line containing:

• %  --- comment
• \begin --- new environment
• \end  --- end of environment
• \item  --- new item
• \label  --- label
• $,$, $$,$$ --- math environments

Notes:

1. For adding another TeX-reflow-stopping keyword (e.g. $...$), change the pm_reflow_is_tex_endline procedure in the source code.
2. The usual reflow routine is used when reformatting block mark of text. A warning appears in that case. If you wish to modify this routine as well, you are welcome. I never needed that.

Installation

There are the following two methods of installing the TeX-aware modifications:

1. Easy installation which overlays the hotkey Alt-P defined in epm.ex. To do that you need to put AltP4TeX.ex file somewhere in your EPMPATH and add the statement
        'link AltP4TeX'  /* Paragraph reflow (Alt-P hotkey) is TeX aware */

to your Profile.erx.  The source code is in file AltP4TeX.e.  Both files are in the directory pmCSTeX\install\advanced\AltP\easy.
2. Advanced installation which requires to recompile EPM.ex. Proceed in the following way:
• Save or move EPM.ex to something like epm_ex.00
• Go to EPMMAC directory. Rename the original stdkeys.e and stdprocs.e to something like stdkeys_e.00 and stdprocs_e.00
• Execute command
        gpatch -p0 <AltP-TeX.diff

(adjust paths to gpatch and AltP-TeX.diff as needed).
• Recompile EPM.e (etpm epm or etpm /v epm)

2.9.2 TeX tags

Have you ever used the EPM menu item View / Tags / Scan current file? If not, try it when editing a C/C++, Pascal or .cmd file.  It will display list of all tags (i.e.  procedures and constants), and allow you to move quickly to their definitions. The support for tags is compiled into epm.ex by including tags.e.  You can create a Toolbar item with Function:  * and Parameter:  tagscan.

The support for TeX-related files is not in the standard EPM. This has been contributed by Vladimir Kisil (vk@cage.rug.ac.be) and its function and installation is presented below.

TeX files (*.tex, *.latex, *.sty, *.dtx, *.cls)

Menu Tags / Scan current file displays nested list of commands:

\part
\chapter
\section
\subsection
\subsection
\paragraph
\subparagraph
\caption
\label

TeX log files (*.log)

Menu Tags / Scan current file displays list of messages:

! TeX Errors
LaTeX (Font) Warning
Overflow

BibTeX files (*.bib)

Menu Tags / Scan current file displays list of BibTeX entries:

 @ARTICLE
@BOOK
@PROCEEDINGS
etc.

Installation

There are two possible ways of installing tags with TeX file support.  Both come out from the same TeXtags.e file which is a modified version of tags.e. Note that it has been modified in accordance with suggestions in its beginning thus you will not lose any functionality for other types of files (C, C++, E, REXX, Pascal, etc.)  written in tags.e. The modified version is in the directory pmCSTeX\install\advanced\tags.

1. Easy installation which overlays the tag scan definition in epm.ex.  Link precompiled TeXtags.ex file over existing EPM.ex file.  To do that you need to put TeXtags.ex file in your EPM directory and add a statement
        'link TeXtags'

2. Advanced installation which requires to recompile EPM.ex. Proceed in the following way:
• Save or move EPM.ex to something like epm_ex.00
• Go to EPMMAC directory. Rename the original tags.e to something like tags_e.00
• Execute command
        gpatch -p0 <tags-tex.diff

(adjust paths to gpatch and tags-tex.diff as needed).
• Recompile EPM.e (etpm epm or etpm /v epm)

2.9.3 Generalized Ctrl-[, Ctrl-] for TeX

Currently, hotkeys Ctrl-[ and Ctrl-] let the cursor jump between parenthesis.  The following patch generalizes these hotkeys for searching the corresponding keyword in TeX constructs in TeX files:

        \if.. \else \fi
\begin.. \end..
\begin{ \end{     or  \begin{..} \end{..}   (depends on COMPILE IF choice)
\left \right

Technical note: routine passist() in assist.e has been patched.

Installation:

The installation requires to recompile recompile EPM.ex. Proceed in the following way:

• Save or move EPM.ex to something like epm_ex.00
• Go to EPMMAC directory. Rename the original asssist.e to something like assist_e.00
• Execute command
        gpatch -p0 <assist-tex.diff

(adjust paths to gpatch and assist-tex.diff as needed)
• Recompile EPM.e (etpm epm or etpm /v epm), move epm.ex to its appropriate location.

2.9.4 Making backup copies of files before save

EPM can make a backup copy of a file to be saved. This requires to recompile EPM.e with BACKUP_PATH defined in your MyCNF.e. If this variable is

    BACKUP_PATH='='

then the backup copy is made in the directory of the saved file. Otherwise you can specify unique directory to keep copies of all edited files, e.g.
    BACKUP_PATH='d:\tmp\epm_save'

The original routine denotes the backup file by trailing $character. Since this is rather unique (in my opinion), usually editors name that file .bak or with trailing ~). Thus I patched the EPM routines to accept the following: 1. Backup file is denoted by trailing ~. 2. Making backup copies can be switched on or off via the command dialog Ctrl/I in EPM by the respective command  backup_enable 1 backup_enable 0  or in Profile.erx via  'backup_enable 1' 'backup_enable 0'  Furthermore, backing up can be allowed for file with some specified extensions (files for programming) and not for the other (text or postscript files). Again, in the command dialog of EPM, you can use either of  set_backup_extensions '' set_backup_extensions 'AWK C CC CPP HTML TEX'  or in Profile.erx  'set_backup_extensions' 'set_backup_extensions AWK C CC CPP HTML TEX'  to allow all files to be backed up or only .awk, .c, .cc et al. The default definition is in stdprocs.e, where you can choose between '' and TEX_EXTENSIONS ' AWK ASM BIB E F F GP HTM HTML JAVA M PAS' (before recompiling EPM). Installation: The installation requires to recompile recompile EPM.ex. Proceed in the following way: • Save or move EPM.ex to something like epm_ex.00 • Go to EPMMAC directory. Here you can save the original versions of stdprocs.e, e3emul.e, slnohost.e, and saveload.e. • Execute command  gpatch -p0 <backup-files.diff  (adjust paths to gpatch and backup-files.diff as needed) • Add the following two lines to your MyCNF.e: -- backing up files before save? BACKUP_PATH='='  • Recompile EPM.e (etpm epm or etpm /v epm), move new epm.ex to its appropriate location. • You may add the following to your Profile.erx if you like to change the default behaviour of backing up (otherwise, the default setting are taken):  backup_enable 1 set_backup_extensions ''  2.9.5 TeX, BibTeX (C, REXX etc.) assistance Syntax assistance extended for TeX, in order to save some keystrokes, has been contributed by Vladimir Kisil (vk@cage.rug.ac.be). It consists of myassist.e compiled if WANT_MY_ASSIST=1 and of some *.asi files. See the directory install\advanced\TeXassist for more details. 2.10 Recompiling EPM If you have not yet recompiled EPM macros (EPM.ex) to suit your needs, you may find the following notes useful. 1. Get epmmac.zip from the Net. Unzip it in e.g. \APPS\EPM\EPMMAC, add this directory into EPMPATH in the CONFIG.SYS and reboot. 2. Make a back-up copy of EPM.ex (e.g. EPM_ex.00). 3. It is possible that after the installation of EPM you will obtain EPM.ex with the READ-ONLY attribute set. In this case the E-compiler ETPM.EXE will not overwrite this version of EPM.ex. The trap is that no error or warning message is issued in this case. So after a "success-seems-to-be" compilation you will have still the old EPM.ex with the old functionality. You should clear READ-ONLY attribute of EPM.ex by attrib command or just delete it. 4. Go to \APPS\EPM\EPMMAC. Read the documentation and FAQ in read.me. Recompile: etpm epm. Replace old epm.ex by the compiled version, kill all EPM sessions and start EPM with any file to edit. 5. If this is your first try of recompiling EPM.ex and you have not read the documentation in details you have probably obtained the new EPM with a menu very different from the distributed one. All trick is the definitions in MyCNF.e. You may try to rename my PM_MyCNF.e to MyCNF.e and recompile again. Otherwise, the configuration EPMGCNF.SMP file rather than MYCNF.SMP should be taken for the base for your MyCNF.e file to obtain an EPM.ex most close to the distributed one. Note: you can use my configuration file install\advanced\PM_MyCNF.e, if you rename it to MyCNF.e and copy to the EPMMAC directory. 6. Explanation of some constants useful to put in MyCNF.e is listed now: • Layout of the menu items: The point is STD_MENU_NAME constant in MyCNF.e file. Check that your MyCNF.e file contains the following line  STD_MENU_NAME = 'fevshmnu.e' -- (undef) Use WFEVSH menu style  This will produce the usual EPM menu layout. See EPM User's guide | Changing the default configuration | Summary of configuration constants for more information on STD_MENU_NAME. • If you recompile EPM.ex you may wish to make the highlighting oval for the Find / Replace dialog more notable than in the default EPM.ex. If you like the oval of Find next error in pmCSTeX, you may put  LOCATE_CIRCLE_STYLE = 4 LOCATE_CIRCLE_COLOR1 = 13 LOCATE_CIRCLE_COLOR2 = 13  somewhere in you MYCNF.e file. The place inside a statement  compile if defined(BLACK) ... compile endif  or the end of MyCNF.e are the most appropriate to do that. See EPM User's guide: Changing the default configuration | Summary of configuration constants for more information on these constants, or search there for LOCATE_CIRCLE_STYLE and MAGENTA strings. • Menu items representing the EPM documentation are available if this is defined in MyCNF.e:  SUPPORT_USERS_GUIDE = 1 SUPPORT_TECHREF = 1  • With this option the EPM does not add the eoln char after with the selected word (Alt-W):  WORD_MARK_TYPE = 'CHAR'  • Bug fix: please correct the minor bug in file load.e. The wrong line  compile if defined(TEX_FILE_TYPES)  should be corrected to  compile if defined(TEX_FILETYPES)  • For various functions (both constants should keep the same string):  TEX_FILETYPES = 'TEX LATEX STY CLS DTX' TEX_EXTENSIONS = 'TEX LATEX STY CLS DTX'  7. You can add TeX aware paragraph reformatting, see Alt-P. 8. You can replace tags.e from the standard distribution by the version enhanced for TeX, .log and BibTeX files. See TeX tags. 9. You can add syntax assistance enhanced for TeX and BibTeX files. 2.11 Information for users of Czech.E If you use the macro Czech.E that implements the Czech keyboard in EPM (by Z. Wagner), you would encounter some collisions with the Greek keyboard. That's why you should replace Czech.E by Czech_PM.E (from Czech_PM.zip file in this package), is it has been explained earlier. I have added one global variable that keeps the status of the Czech keyboard (and I have commented out the beeps; you can restore them if you like them). Pokud prijdete na duvod tech kolizi a opravite to, dejte mi prosim vedet. Now, go to Tutorial. 3 Tutorial Welcome to the tutorial! I suppose you launched EPM in the demo directory by the command Example:  start epm example.tex inc.tex  If there is no CSTeX menu item in the EPM, reboot the computer. Try Tutorial again. If there is no progress, consult the Installation. Now click on the word description (in example.tex file). Press Ctrl/H. Help should appear. If not, LaTeX2e.INF and LaTeX2e.NDX ware not installed correctly. Further, if you press Ctrl/H on \mistake, you get the warning "Unable to find entry...". It means this keyword is not listed in LaTeX2e.NDX. Now press Ctrl/H with the cursor being on the word \allowbreak. Nothing happens: it's correct---this is TeX primitive and it is also not documented in LaTeX2e.INF. You edit example.tex. Choose CSTeX/(La)TeX document /b. Then latex.cmd will be launched to proceed your file (CSTeX-distribution users should have their LaTeX.cmd command script equal to csLaTeX.cmd). It finished. There was one mistake. However, tex386 has not stopped due to the /b (=batchmode) command line parameter passed into tex386. So you now press Shift-F12 and the error will be localized. Press several times F12 to localize and read the .log file in the edit ring. Go back to example.tex, correct the mistake, and press Shift-F12 again. "No more errors" message should appear. Then start Previewer. Usually you are re(La)TeXing your document while dvipm is simultaneously on your screen, so you can hear the beep when tex386 has finished and dvipm is reloading the document (it must be enabled via the dvipm menu). In the above procedure the tex386 window has been minimized so you cannot interact with this program. For the interactive work, you can use the menu item "CSTeX/(La)TeX document". It (La)TeXes your document on foreground using the usual interactive mode. Now click on any paragraph (a block of the text) and click on the toolbar icon [TeXit]. The current paragraph should be recompiled and automatically updated by dvipm (haven't you forget to set Auto reload in dvipm?). Now play with it yourself. Also, read the other part of this documentation for more details. For full details, read the source code of pm4EPM.e and CSTeX.e, as well as all EPM manuals :-)). If there some problems, please correct them and send me the solution. Have fun! Please don't forget to read about the syntax of the keywords on the first line of the Master file. Those supplied in the example.tex Example:  % Format: latex emtexopt: */mp85500* dvips: *-p 123* ViewOpts: */tr1 +inverse*  mean the following: • Format of the document is latex, i.e. use latex.cmd script to recompile it, • before launching the above script, the environmental variable is enlarged (with respect to its value from the config.sys) by the option /mp85500, so that tex386 has larger pool size so it can process the AMS-LaTeX documents, • if you are dvipsing (.dvi->.ps) the .dvi file, then only pages up to the page 123 are printed (makes no sense in example.tex anyway), • ViewOpts are passed into the full-screen previewer and to the printer drivers. 4 Usage Please go yourself through all the CSTeX menu options, icons and actions that you can icon-ify. This manual will probably never be too complete. You are welcome to contribute. However, it should not mine, since "ordinary" users will hardly change the code, and the programmers will do it easily. Anyway, you are welcome to have a look at .e files what's really inside. They are readable... 4.1 Syntax of expansions You edit a file. It is called working file. If its first line contains Example:  % ....... Master: b.tex .....  then b.tex is its master file to which all actions like latexing, previewing etc. will be related. If there is no Master: keyword on its first line, this file is both Working and Master. The first line of the Master file can contain other keywords which are expanded by pm4EPM.e. CSTeX.e reacts to the following keywords: Example:  % .... Format: cslatex209 .....  or Example:  % .... Format: plain .....  This is used to texing the document. .cmd file of the same name as is that of the format is called to compile the document (in the above example, cslatex209.cmd and plain.cmd are called, respectively). If no Format: is present, environmental variable LATEXFORMATDEFAULT is searched. If that is not defined, default format latex is used. Synonym to the Format: myformat is %&myformat starting the command line; this allows to accept cweb/unix style of format determination. Example:  % .... EMTEXOPT: */mp85500* .....  This keyword is added to the environmental variable EMTEXOPT before _format_.cmd is started. The above option I use for AMS-LaTeX and AMS-fonts. Another example: if you want to get rid of the user interaction even in the CSTeX/(La)TeX document, then replace */mp85500* by */mp85500 /b* or by */b*. See the emTeX documentation for more details (\emtex\doc\(english or german)\tex.doc). Example:  % .... dvips: *-p 3 -l 9 -A* .....  This keyword enables passing parameters into dvips (in this case, only the odd pages between page 3 and 9 are postscripted). Look at dvips documentation (or type dvips at the command prompt) for more details. Example:  % .... makeindex: * -s mystyle * .....  Options that are passed into the MakeIndex program. See its documentation for more details. Example:  % .... ViewOpts: */tr1 +zoom:4 +inverse* .....  The string between those stars (*) or any pair of same chars is taken as the argument for printer/viewer command line. That means not for "Viewer document" (interactive dvipm), but for "Preview before print" and "Print". Consult \emtex\doc\english\dvidrv.doc for more details about the available switches, or type /?? at the dvi* prompt. If you are Editing settings of an icon on the toolbar, there is "Parameters" line related to "Action". This Parameter is expanded as described directly in the pm4EPM.e file. They are not used by CSTeX.e (yet). 4.2 CSTeX menu items explanation (La)TeX document Compiles document on foreground: start /c /win /f cmd.exe /c %format.cmd %N Abbreviation %N expands to the master file in the Unix style and %format to the format of the document. (La)TeX document /b As above, but TeXing is started on the background. Well, in both cases, you should have used \batchmode TeX command in the beginning of your file to force tex386 go smoothly over errors (you locate errors later using Shift-F12). (La)TeX paragraph Compiles the current paragraph of the edited text. The paragraph is the text block between two blank lines, or a line block of text (marked by Alt-L ... Alt-L, for instance). A temporary file$cstex\$.tex is written, which contains everything from the first line to the \begin{document} statement of the Master file, then the current paragraph, and the file is terminated by \end{document}. After reLaTeXing, the .dvi and .log files are copied over those of the Master file.

Locate next error

A. Error searching: If .log file is loaded, then search for the next error.  If .log file is not loaded, load it to the editor and search for the first error.  If it is loaded, refresh it and start from the beginning.

(Technical note:  the above works fine for me; I think there is no need to implement in next_error to check the file on the harddisk whether it has changed or not every time when next_error function is invoked by the user.)

B. Warning searching:

If you position the cursor in .log file on a line which is like one of these:

Overfull \hbox (19.0473pt too wide) detected at line 5
Overfull \hbox (19.94281pt too wide) in alignment at lines 95--104
Underfull \hbox (badness 10000) in paragraph at lines 356--373
LaTeX ...whatever, e.g. Warning: or Font Info:.... line 138.

then the Locate next error will find the location of the warning from that line.

Otherwise the method A. is in action, of course.  That's what you use normally.

dvips will be used to convert .dvi -> .ps.  Then you can launch either gvpm program (it is the GhostView for OS/2, available from any net server mirroring the ghostscript staff) or use the DOS previewer psview (available at ftp.muni.cz:pub/tex/local/postscript/psview.zip). If you print from dvips, then the output goes to the prn port.  See also the keyword dvips: applicable for the Master's first line, which is described in the section Syntax.

If you use the menu item dvips-it, then pmCSTeX will beep when it is finished, so that you can reload the file in GhostView or send it into a PostScript printer.  You can switch this beep off, see recompiling.

Menu for printing using dvihplj and 300 dpi was well tested.  Others not.  If you have other printer not listed explicitly in the menu, then .cmd script will be called with myprt1.cmd or myprt2.cmd. For previewing, myprt1.cnf or myprt2.cnf will be used.  You should prepare them yourself, according to \emtex\bin\prt*.cmd and \emtex\data\*.cnf files.

Editor / Include

The file whose name is under the cursor is included into the editor.  The routine is implemented such that it looks to the current directory, then to ..\units, then to \emtex\texinput, then to some of the \emx\include directories.  You can easily add your favourite directories to the source code of CSTeX.e and recompile the macros.

Moreover, not only the file under cursor, but as well as those files with .h, .c, .cpp, .sty, .tex are searched. Try it and see.

CStoCS (Ceska verze)

Pokud nemate konverzni program cs2cs (dal jsem ho do modulu os2.zip?), tak si ho stahnete primo od jeho autora: ftp://aip1.fsv.cvut.cz/users/ferdi/cs2cs.zip

Spell / Czech,Slovak,English (Ceska verze)

Pravopis se opravi v DOSovskem programu %EMTEXDIR%\cstug\texspell.exe, ktery je soucasti pate diskety CSTeXu pro registrovane cleny CSTUGu.  Ma smysl pouzivat pouze pro opravy cestiny ci slovenstiny do te doby, nez nam IBM laskave doda CZ.DIC anebo SK.DIC, bude-li to vubec nekdy.  Uz by s tim taky mohli trochu pohnout, ze?

1999: slovniky, tedy alespon jakesi soubory *.dic, jsou soucasti Netscapu 4.61. Ovsem zase nejdou cist v EPM, cosi s nimi pada. See bugs.

Other TeX programs

Drawing programs:  TeXcad is well-known, Qfig probably less.  But there are XFree86 ported to OS/2 (http://set.gmd.de/~veit/os2/xf86os2.html) so I'm really glad that I can use Xfig for OS/2.  Since you run XFree86 in a separate full-screen session, there is no item for it.  PageDraw is a good tool for PostScript drawings---it runs in Win-OS2 session, so the author should be asked for a native OS/2 version.

TeXclean

Deletes all files *.aux *.log *.dlg *.dvi *.toc *.lot *.lof *.blg *.idx *.ind *.glo *.gls *.hp *.mfj *.pri *.bak

4.3 Hotkeys in CSTeX

These hotkeys are defined:

Ctrl/1

It brings menu with paragraph, section, chapter...

Ctrl/3

It brings menu with LaTeX environments.  If there is a line-mark, then surround the marked text block by the choosen environment; otherwise insert the environment and a blank line in between

Ctrl/4

It brings menu with AMSLaTeX environments If there is a line-mark, then surround the marked text block by the choosen environment; otherwise insert the environment and a blank line in between

Ctrl/5

It brings menu with LaTeX font sizes

Ctrl/6

It brings menu with textrm, textsf, texttt, textmd, textbf, textup, textit, textsl, textsc, emph, textnormal

Ctrl/7

It brings menu with rmfamily, sffamily, ttfamily, mdseries, bfseries, upshape, itshape, slshape, scshape, em, normalfont

Alt-G

Switches the keyboard to the Greek keyboard.  After pressing Alt-G and pressing a key, its Greek character (in TeX syntax) will be typeset instead.  E.g. Alt-G a produces \alpha.

Note:  if the keyboard is not switched to the keyboard layout you was using before, then change the end of DEFPROC pm_TypeGreek() according to any global flag your personal keyboard provides.

And finally, here is the translation table:

a     | b    | c   | d     | e       | f   | g     | h   | i    | j  | k     | l      | m  | n
-     | -    | -   | D     | -       | F   | G     | -   | -    | J  | -     | L      | -  | -
alpha | beta | chi | delta | epsilon | phi | gamma | eta | iota | psi| kappa | lambda | mu | nu

o     | p  | q     | r   | s     | t   | u          | v      | w        | x  | y       | z
O     | P  | Q     | -   | S     | -   | -          | -      | -        | X  | Y       | -
omega | pi | theta | rho | sigma | tau | varepsilon | varphi | vartheta | xi | upsilon | zeta


4.4 Hotkeys in pm_keys

There are some hotkeys you may or may not find useful.  You can either add

        'link pm_keys'

into Profile.erx, or copy the hotkey definitions into your MyKeys.E file (then recompile it).  Currently, I use these definitions:

Ctrl/Y

It deletes the current line (as Ctrl/BackSpace does).  I'm used to this key sequence from Borland-like editors.

Alt-1

Generalizes / enhances the standard EPM file load hotkey, equivalent to CSTeX/Editor/Include.

Alt-3

Inserts \begin{}

Alt-4

Inserts \end{}

Alt-5

Inserts 

Alt-6

Inserts 

Alt-Z

It brings a dialog with margin setup.  Easier then going to File/Settings...

Alt-Q

This hotkey provides either of the following two actions:

1. quickly makes ...   environment with two two comment lines above and below.  Thus pressing Alt-Q on this line would do:

   %

%

2. If the line under the cursor contains only , it changes it into \begin{eqnarray}.  If there is \begin{eqnarray}, it is changed to \begin{align}, and if there is \begin{align}, it transforms back to .  The same rotation works for the , \end{eqnarray} and \end{align} lines too, as well as for the \begin and \end versions of equation*, eqnarray* and align* environments.

Note for future:  this could be more powerful if this command would change both \begin{..} and \end{..} simultaneously.

5 Recompiling the macros

Your need stdconst.e from epmmac.zip (see hobbes.nmsu.edu:os2/editors).  This file has to be on your EPMPATH.

The following commands will compile CSTeX EPM macros:

Example:

        etpm pm4EPM
etpm CSTeX

You can recompile CSTeX.e into two menu schemes depending on the constant CSTEX_CSTEX:

CSTEX_CSTEX=1

This produces CSTeX for EPM that is distributed together with CSTeX'96 distribution.  It includes support for all our favourite CS features and programs

CSTEX_CSTEX=0

This disables compilation of the features specific for CSTeX'96 distribution

CSTEX_CS2CS=1

Uses OS/2 program cs2cs.exe for Czech encodings conversion (this program does not come with CSTeX'96 distribution yet, get it from ftp://aip1.fsv.cvut.cz/users/ferdi/cs2cs.zip

CSTEX_CS2CS=0

Uses DOS program cstocs.exe for Czech encodings conversion (included in CSTeX'96 distribution, but due to cs2cs.exe it became obsolete now)

PM_DICTIONARIES=1

Adds dictionary (language) menu for EPM spell checking+synonyms

CSTEX_USEMASTERDIR=1

The master file is firstly searched in the directory of the working file, then in the current directory; if

CSTEX_USEMASTERDIR=0

then the master file is searched in the current directory, i.e.  in the directory where the EPM was started from. The choice =1 is much better if EPM runs permanently (EPM /i).

Two options in DEFINIT routine in CSTeX.e

cstex_true_tex_background=1 is default option that minimizes window of the background TeXing.  Set cstex_true_tex_background=0 to get the whole window.  cstex_background_beep=0 is default option to avoid beep when background texing has finished (dvipm can do it for you).  Set cstex_background_beep=1 if you would prefer this beep.

You can do the appropriate changes in both files---as you wish.  In fact, you should changed the menus and related things if some build-in options do not suite your customs.  I tried to write the code as simple as possible---I'm not professional EPM programmer.

However, KEEP IN MIND that you can distribute the files derived from CSTeX ONLY IF the original distribution of pmCSTeX.zip comes with them!  People need to know where that comes from, whom they can make donations to or who is the person to blame...

6 Conclusion

This release of pmCSTeX for EPM works perfectly for me, but that need not be the case for you.  If it does not work, please verify the installation of EPM, go again through the Installation, and read about Bugs. If this did not help, then let me know about your problems.

You can also write me about your suggestions or even your solutions to your suggestions, what should be additionally included etc.  Thanks.

6.1 History

16. 4. 2000
• License explicitly added (required by (La)TeX packages catalogue).
• Syntax of expansions: synonym to the Format: myformat is %&myformat starting the command line; this allows to accept cweb/unix style of format determination.
• Installing all advanced features via diff files and gpatch instead of the distribution of modified source files.
• Added patch for making backup copies of files before save.
• Documented the idea of solving the red oval instability in the bugs section.
• Czech specific: added updated version of dvi-out2 (contributed by Jaromir Kuben).
• New hotkeys Alt-3,Alt-4, Alt-5, Alt-6.
• Czech specific: added updated version of vlnka (contributed by Jaromir Kuben). Previous vlnka2.exe removed, added new vlna.exe.
• Czech specific: added EPM for TeX short guide EPMpopisJK.INF by Jaromir Kuben.
• Added TeX syntax assistance, to save some keystrokes, by Vladimir Kisil (vk@cage.rug.ac.be).  See the directory install\advanced\TeXassist for more details.
15. 3. 1999
• enhancement for Ctrl-[ and Ctrl-] hotkeys in order to search pair construct (La)TeX keywords
6. 3. 1999
• enhancement for Ctrl/3,4 Hotkeys in CSTeX for the inclusion of (AMS-)LaTeX environments:  if a line-marked block (Alt-L) exists, then surround it by the choosen environment; otherwise environment inserted at the cursor position (as before)
14. 12. 1998
• Improvement:  skipping text between Overfull/Underfull and [] (sometimes produced a warning about wrong number of corrupted .log file because of parenthesis)
• Improvement: skipping text from LaTeX Warning: until blank line
18. 1. 1998
• Figured out how to make Double-side or slot 2 printing from dvips
• Bugfix:  the greek keyboard was switching off Auto-spellcheck.
• Generalization of the Locate next error function (available from the menu, as the toolbar icon or as hotkey Shift-F12).

If you put the cursor in .log file on a line which is like

Overfull \hbox (19.0473pt too wide) detected at line 5
Overfull \hbox (19.94281pt too wide) in alignment at lines 95--104
Underfull \hbox (badness 10000) in paragraph at lines 356--373
LaTeX ...whatever, e.g. Warning: or Font Info:.... line 138.

then the Locate next error will find the location of the warning from that line.

Otherwise, i.e.  from non-.log files or having there cursor on another line (which is usual when searching for true errors), the behaviour of this function is unchanged.

5. 1. 1998
• (La)TeXing the paragraph: now accepts the current paragraph as well as the line block of text, if selected; see CSTeX menu items explanation
• Bugfix in the Czech version: reversed parameters of Master and Options when calling csdvips
• This documentation updated for the Installation of advanced macros
29. 12. 1997
• TeX->PS routine---thus you can use the action cstex_texit_and_dvips for making a toolbar icon (now: only menu item (La)TeX and dvips document)
• Change in sampactn.e (syntax highlighting): *.ps, *.eps and *.pdx files are coloured according to epmkwds.ps
15. 12. 1997
• In the pm_keys.e, I have joined Alt-Q and Ctrl-Q into Alt-Q, since I have found how the Ctrl-Q and the ALL command can be useful
• Moreover, the new version of Alt-Q work on TeX-like files only (i.e.  files with extension TEX, LATEX, STY, CLS or DTX
• View documentation menu item enhanced to browse pmCSTeX.INF and LaTeX2e.INF
11. 11. 1997
• Bug fix:  EPM crashed when (La)TeXing a paragraph invoked from a very deep directory (this was caused by EPM's string length limitation)
• View documentation menu item added (note:  this routine works if the EPM has been compiled with WANT_SEARCH_PATH)
• Call of the macro already_in_ring replaced by its expansion (did not work for two users who recompiled EPM without the E3EMUL support)
• FAQ added to the documentation
24. 9. 1997
• TeXing a paragraph was not working if another EPM session (or EPM server) on different partition was running simultaneously
16. 7. 1997
• Alt-1 (in pm_keys) load file hotkey in pm_keys accepts also absolute filenames as well as those in Unix format (forward slashes)
13. 4. 1997
• Alt-1 (in pm_keys) load file hotkey replaced by my generalization.
• Options for MakeIndex are now available.
• PostScript: psview.cmd added (i.e. psview.bat converted for OS/2 and changed its option in the menu).
• PostScript: dvips-it + pause added.
• Spell-checker: warning if the selected dictionary does not exist, Spain dictionary added. Greek keyboard: ksi->xi fixed.
• Other programs (CSTeX version): dvi-out2 works in current directory and shows the messages.
5. 2. 1997
• Bugfix for a typo in the previously updated version of the protection against damaged .log files.
30. 1. 1997 and 3. 2. 1997
• The oval over the mistakes found is now thicker and light_magenta, thus easier to distinguish
26. 1. 1997
• 'TeXclean' now deletes *.bak files too
• 'Highlight all' now does correctly go back to the first file
15. 1. 1997
• Documentation rewritten, packed together in order to release the beta version of the pmCSTeX for EPM, the version for the year 1997
4. 1. 1997
• The master file is firstly searched in the directory of the working file, then in the current directory (compilation option CSTEX_USEMASTERDIR)
• Menu item "Cykl" taken away (well, it was there for some historical reasons and I never used it under EPM)
30. 11. 1996
• (Czech version):  zacleneny dvi-out2.exe, vlnka2.exe (pascalske zdrojaky puvodnich DOSovskych programu byly konecne zkopilovane pro OS/2).  Update se provede takto:  tyhle dva nove exace a novy csdvips.cmd se zkopiruji do %EMTEX%\bin
28. 10. 1996
• Dictionaries FR.dic, UK.dic, US.dic, etc. are taken from the directory defined by the EPM_DICTIONARIES environmental variable. If this does not exist, then from the directory \APPS\EPM. See also spell checker
22. 10. 1996
• For the CS version: separate BibTeX, MakeIndex and csBibTeX, csMakeIndex (csBibTeX has been compiled in 1994 and it is not compatible with the new emTeX directory structure)
9. 10. 1996
• CSTeX.e: in DEFC cstex_highlight_all added nextfile after the loop; but then taken away because of other link; I'll check it in future.
• Profile.erx: remarks should be enclosed in /*  */ instead of only a semicolon prefix
22. 7. 1996
• Hotkeys Ctrl/1, Ctrl/6, Ctrl/7 added
11. 6. 1996
• Added dictionary (language) menu for EPM spell checking+synonyms. The corresponding compile option is PM_DICTIONARIES
8. 6. 1996
• Final release---upload to hobbes, leo and CTAN
7. 6. 1996
• Meaning of Alt-Q changed, added Ctrl-Q hot key; spell-checker discussion
28. 5. 1996
• TeXing action works even when you ask for it from within .log file
• 'Locate Next Error': oval drawing for ...long line with an error works now better
26. 5. 1996
• Typo/bug from 19. 5. corrected
• sampactn.e replaced according to new EPM 6.03b
19. 5. 1996
• EMTEXOPT keyword added (see syntax) so you don't need to change your .cmd files if you use AMS-LaTeX or memory consuming documents.  Therefore EMTEXOPT environmental variable has to be established and it should contain fixed memory parameters (see Installation). These were previously in .cmd files and they have been changed in this release.  Using this EMTEXOPT trick there is no more need to have \batchmode command in the Master file.  Document being (La)TeXed on background is iconified, but this can be changed (see recompiling)
16. 5. 1996
• Suggestions and minor changes reported by Wolfgang Kronberg (kroni@bite.shnet.org) taken into account
• Section about syntax highlighting written
15. 5. 1996
• Annoying message "I think you re(La)TeXed..." taken away
• dvips option into pm4EPM (i.e. new expandable keyword dvips for the Master's first line included)
9. 5. 1996
• Odstraneno zdvojeni ~V v menu View a vlnka
6. 5. 1996
• Announcement in comp.os.os2.announce
• cstocs.exe replaced by cs2cs.exe
2. 5. 1996
• AMS-LaTeX environments support  (Ctrl/4 hotkey in pm_keys)
28. 4. 1996
• Only small changes
1. 3. 1996
• First public announcement
6. 2. 1996
• Distribution for my colleagues
30. 1. 1996
• First useable version for myself

6.2 FAQ---Frequently Asked Questions

There are some Frequently Asked Questions listed here.

6.2.1 How to run MetaFont, gnuplot, awk... on the edited file

The syntax with the first line Format: keyword makes it possible to run any command over the edited file.  For instance, you are editing a mypic.mf:

Example:

        % Format: runmf
... some MetaFont code here...

A click on the TeXit icon, or the Shift-F11 hotkey, will run the batchfile runmf.cmd on the currently edited file (or even more, you can use Master:).

Note that even the icon is called TeXit, it can run whatever you write in the appropriate script, like mf386.exe, or gnuplot.exe if gp.cmd states for @gnuplot %1 %2 %3 %4 %5 %6 %7 %8 %9:

Example:

        # Format: gp
set title "Hello, gnuplot"
set grid
plot sin(x)/x
pause -1

Note:  I use EPM to edit configuration files for my calculations in physics; the only necessity is to write a batch file that launches the correct application.  Furthermore, writing a syntax highlighting file is a matter of maybe 10 minutes (well, someone could contribute the epmkwds.mf file for MetaFont).

6.2.2 Incorrection version

A message like Incorrection version... is displayed in the EPM status window.  That means that you have started EPM earlier than 6.03b.  Please verify your configuration, namely:

• Is \Apps\EPM cited before \OS2\Apps in PATH and LIBPATH? See Installation of pmCSTeX or my config.sys).  Remember that Warp 3.0 is shipped with EPM 5.51, see Installation on Warp 3.0.
• Have you correctly installed EPM 6.03b?  One user was convinced that he installed this product well, but he was reading the installation instructions by EPM 6.0 while installing EPM 6.03b into the same directory.  Thus some .dll files were locked and they were not overwritten, he got a crazy mixture of two versions!  Hint:  backup previous version, delete it complete, install the new one.

6.2.3 How to read previous EPM messages?

What has EPM written to the bottom status bar?  Look at the menu: View/Messages.

6.2.4 I cannot see \begin etc. keywords

The highlighting epmkwds files enclosed in pmCSTeX are suited for the yellow&blue combination of foreground&background. Thus, if you prefer the default EPM setting of black&white, then do NOT use my epmkwds files, otherwise you will not see any TeX keyword.  See also syntax highlighting. If you want to use my highlighting files for non-yellow&blue combination, then you should process them by a script for sed, awk, REXX,... to convert the 2nd and 3rd column to a combination that pleases your eyes.

6.2.5 You don't like my hotkeys

You may redefine them or take completely away.  Look at pm_keys.e, change/delete them, and recompile it.

6.2.6 Nefunguje mi ceska klavesnice

Precti si, prosim, Bugs, zprava uplne naspod.

6.2.7 Double-side or slot 2 printing from dvips

Finally, I have found the way how to print double side from dvips (17.  1. 1998!)!  It uses the -h option of dvips and the correct header files. Thus, from within EPM, use:

%  ...   dvips: * -h 2sideP.ps *

for double-side printing on portrait sheet,
%  ...   dvips: * -h 2sideL.ps *

for double-side printing on landscape sheet, or
%  ...   dvips: * -h Slot2.ps *

for printing on transparencies or on the paper deposited in the slot 2 of the postscript printer.

Installation:

For use withing pmCSTeX, all should be prepared as described in sections Installation of pmCSTeX or Upgrading pmCSTeX. If you want to use this feature on another TeX installation/platform, then copy those files into your TeX directory tree and use them in commands like

        dvips -h 2sideL.ps my_text.dvi


6.2.8 Tags are fine, but are there "permanent" tags?

Use the ALL *string_to_find* command (invoke command line by Ctrl/I). Then use (repeatedly) Ctrl/Q.

6.2.9 I have a question/I have found a bug...

Ok, write me a mail.  But please, be sure that you have read this manual completely, it is sometimes difficult to figure out what's wrong on your system.  Remember that a lot of users have installed this product without problems. If you find a bug, please read the Bugs section first, and then let me know about it by e-mail if that insect has not been documented up to now.

6.2.10 Renaming a file

Instead of using the menu options, EPM offers a more direct way to change the name of the file your working on.  Place the mouse pointer over the title bar and double-click the right mouse button.  The title bar will change to an edit field so that you can change the file name.  When you're done, click the mouse anywhere off the title bar.

Source of this trick:  http://ourworld.compuserve.com/homepages/luvabo/

6.2.11 Running EPM as a server

Running epm /r /i installs EPM as an editor server. All further downloads into it by epm /r myfile.dat are much faster (e.g., you can setup an Alternate editor in File Commander/2 by epm /r or by start epm /r /i).

6.2.12 Saving file with LF or CRLF line ends

You can change miscellaneous default save options in Profile.erx. Among them, the following line saves the files in Unix LF' convention:

        'universal default_save_options /u'

Later on, if you want to save an edited file in the standard OS/2 CRLF' format, then you can use the command save /o

6.2.13 Make a backup file copy before save

Do you want to backup the previous version of your edited file before overwriting it by the Save command? Well, this is described in the section Making backup copies of files before save.

6.2.14 Automaticke vygenerovani pk fontu z ps fontu

Prispel pan J. Kuben: Pokud jde o automaticke vygenerovani pk fontu z ps fontu, je to reseno pomoci dvips. To se zavola (pri nastaveni prvniho radku)

      % dvips *-Pnic*

Soubor emtex\data\dvips\nic.cfg ukazuje na prazdny seznam ps fontu emtex\data\dvips\prazdny.map. Davka emtex\exe\epm\csdvips.cmd (musi byt v ceste) je upravena tak, ze nastavi set maketexpk=make_pk. Tento soubor vola dvips a predava mu parametry (protoze mu bylo receno, ze nejsou ps fonty). Rexx soubor emtex\exe\make_pk.cmd (musi byt v ceste) je treba naeditovat. V uvodni casti je treba nastavit cesty podle konkretni instalace (kde jsou ps fonty, konfiguracni soubory, kam se budou ukladat pk fonty). Ten pak prohlizi soubor emtex\data\dvips\adobe.sez, kde je ulozen seznam ps fontu, ktere jsou k dispozici, nazev zdrojaku a parametry, s nimiz se vola ps2pk (musi byt v ceste; pouzivam verzi 1.6).  Tento soubor je mozne podle potreby rozsirovat. Parametry odpovidaji syntaxi z psfonts.map.  Pokud neni font v seznamu nalezen, vola se emtex\exe\maketexp.cmd, a tudiz mfjob (opet je treba nastavit cesty podle instalace). Dvipm ma pak pripravene pk fonty a pri dalsim volani dvips se smaze -Pnic, aby se spravne pouzily ps fonty.

6.2.15 What is gpatch?

gpatch means GNU patch program.  It is usually called patch on Unix system. Since there is already another \os2\patch.exe program by IBM distributed with OS/2, it makes sense to call GNU patch gpatch.exe. You can download the whole GNU patch package as gnupatch.zip from hobbes or leo.

Note: diff-files enclosed in pmCSTeX were produced by

      diff  -uw  xxx-original.e  xxx-modified.e >xxx.diff


6.2.16 Various .dic files from IBM

There are several versions of the dictionary *.dic files from IBM all around. The latest are distributed together with Netscape 4.61 (April 2000). However, these are not compatible to the .dic files of EPM, obviously because of its oslexam.dll. Anybody knows how to use the new dictionaries with EPM, mainly those for languages lacking an EPM dictionary?

6.3 Known bugs and missing features

pmCSTeX for EPM related bugs and missing features:

1. The command 'link pm_keys' must be the first one in the Profile.erx, otherwise Ctrl/Y will not work for *.c* and *.h files.  This occured after 4.1.1997.  Probably a clash with CKEYS.E keyset or whatever else, when I redefine those EDIT_KEYS.
2. The makeindex first line keyword (see Syntax of expansions) was added according to demand of one person, but I've got no feedback.  Whether this works or not for you, please let me know.
3. Using "Next error", an error is found correctly but the current file (the file with the error) is switched off to .log file.  I don't know why, this comes irregularly, is there something wrong what is on the stack of EPM?  Because just before the return command the current file is correct.
4. CSTEX distribution users:  Jsou problemy s csbibtexem, ktery se do distribuce CSTEX'96 dostal z CSTEX'94:  neakceptuje novou adresarovou strukturu emTeXu, nezna dlouha jmena .aux souboru...
5. Czech.E users:  V prvnim okne ringu funguje ceska klavesnice bez problemu, ovsem v dalsich ji neni mozne spustit (pres Alt-[).  Musi se napsat jakekoliv recke pismeno (napr.  Alt-G a) a teprve potom dat Alt-[. Nevite nekdo, proc se to chova takto?
6. pmTeXit.cmd:  change it so that it accepts not only the Format: keyword, but also the EmtexOpt: and Master: keywords.  (This means, you are welcome to do that---I haven't used pmTeXit.cmd for more than one year, since I do everything from within the EPM).
7. (La)TeX paragraph is now targeted for use in LaTeX documents only.  Plain TeX documents should end by \bye command instead of \end{document}. However, there was no demand for plain TeX paragraph TeXing until now, so there is no need to code this.

General EPM related bugs and missing features:

1. I could disable the menu of changing the dictionary file when the Auto-spellcheck is on.  Just I would have to find/receive from you a trick how to detect it.
2. Sometimes actions from the menu items cannot be fired, while toolbar and hotkeys action are still working normally.  Any idea?  I have a suspiction that this could be related to the EPM's string length limitation.
3. Sometimes the syntax highliting stops working for the files newly loaded. Anyone knows why?
4. The same problem of the instability of the red oval over the first error found in .log file as in EPMTEX occured if the syntax highlighting is on.  The reason has been discovered recently:  it is caused by defload syntax highlighting method, since the the syntax highlighting is made AFTER ALL macros are finished, thus the oval is re-coloured.

Workaround is not 'trivial'. However, I was hacking this in 1998 and I have figured out that this problem could be solved by patching routine toggle_parse() in stdctrl.e. pmCSTeX would set on global variables with the filename and oval positions, which will be executed at the end of the syntax colouring routine. If anybody is wishing to implement this idea, please submit the patch for inclusion into pmCSTeX.

5. Netscape 4.61 contains new dictionaries; the most important are localized ones not available for EPM before (czech.dic, for instance).  However, these dictionaries do not work with EPM.  Do you have an idea what to do?

6.4 To do!

Use EPM and (La)TeX every day! Have a nice day/night writing your beautiful documents.