160 Some notes about TEX and MS-Windows Bijlage B

Some notes about TEX and MS-Windows

Wietse Dol  Landbouw-Economisch Instituut (LEI-DLO) P.O.Box 29703 2502 LS Den Haag The Netherlands [email protected]

Abstract Many people know about TEX and TEX utilitiesfor the MS-DOS PC. However, in the world of WINDOWS there is a lack of knowledge. This note is intended to inform people who like to run TEX under WINDOWS and want all the good stuff that WINDOWS and TEXoffers.

1 Introduction free of charge!) and ASTEX (see MAPS 93.1 page 41). I am a real DOS (4DOS) addict and in principle do These programs all have the multitasking and excel- not like to work under WINDOWS. I really detest the lent graphical display as mentioned above. People who many mouse clicks one needs to get simple things done. really like to use some kind of TEXforWINDOWS will Things that are done with one or two really simple 4DOS ®nd out that there is no such thing yet. There is a com- commands (e.g. ®le moving) need many mouse move- mercial package Scienti® word wich claims to be a ments. Perhaps I am an old fashioned guy not realizing TEXÁa la WYSIWYG (see MAPS 92.2 page 147). It really looks promising but is not a real and complete that the world is changing::: TEX system for WINDOWS. There are two application that make it worth while using WINDOWS. The ®rst one is the multitasking en- After reading this introductionthe question arises `what vironment of WINDOWS. Of course there are ordinary should we use under WINDOWS?'. The next sections DOS programs (e.g. Quarterdeck Desqview) that do will discuss some WINDOWS and TEX topics and hopes the same but a nice graphical environment with icons you to inform how one could set up a WINDOWSTEX makes WINDOWS a real userfriendly multitaskingenvir- system. onment. The second and most convincing advantage of WINDOWS is its graphical interface. There are many 2emTEX and Windows excellent graphical packages (e.g. Correldraw) that al- When looking at TEX PC packages there is one that is lows you the create, manipulate, convert and print all state of the art: EMTEX. It is a pity that E. Mattes `only' kind of graphics. So when talking graphics one really developed a MS-DOS and an OS-2 version. EMTEXis should work with WINDOWS. free of charge and is to my knowledge the best TEXPC People who work with TEX are all people who like to package there is. It offers for the novice and advanced create texts of the highest quality. The greatest dis- TEX user everything one wants. The only drawback advantage (others would say advantage) of TEXisthat to the system is that E. Mattes did not developed a it is not WYSIWYG (what you see is what you get). userfriendly TEX shell. This is nowadays no real disad- After the compilation of a TEX document we all want vantage because there are many good shells (of course to use some kind of graphical interface to view (see) I think the best is 4TEX, see the discussion about EMTEX the results. So we are talking graphics. We also would shells elsewhere in this MAPS). like some kind of multitasking, even better a straight Our ®rst attempt for a WINDOWSTEX should be a DOS- compilation and viewing of our T X code while we E window running EMTEX. Many people who have tried are typing the text. This all should be possible with got really disappointed. When running the 386 version

WINDOWS::: of EMTEX under WINDOWS we get the error message An operating system quite similar to WINDOWS for a `DPMI not supported.' We can use the slower 8088

PC is OS-2 (sorry but OS-2 is much better than WIN- and 80186 versions of EMTEX but we want more::: DOWS). For OS-2 there are several excellent TEXpro- The errormessage `DPMI not supported' is the result grams and utilities. For example EMTEX (absolutely of E. Mattes own DOS-extender. Running TEX needs

 I am not a WINDOWS specialist so don't be offended when I do stupid and clumsy things. This note is intended to inform people and stimulate them to write more about TEXandWINDOWS.

Reprint MAPS#11 (93.2); Nov 1993 Dutch TEX Users Group (NTG), P.O. Box 394, 1740 AJ Schagen, The Netherlands Bijlage B Some notes about TEX and MS-Windows 161 a lot of memory or diskswapping. When you have a only costs $25,-. Not only the `normal' editing facilit- 386 PC or higher with a lot of memory (the manuals ies are supported but also some `tool bars' and `dialog suggest 3Mb) the DOS-extender will claim all available boxes'. memory and use this instead of the slow diskswapping. There are three T X tool bars, i.e. a Text-bar, a Math- The DOS-extender will also use the fast 32-bits pro- E bar and a LAT X commands-bar. With the Text-bar cessor optimally and gain a lot of speed. The second E you can easily and graphically select fontsize, font type advantage of the 386 version of EMT Xisthatituses E and all kinds of accentuation. The Math-bar graphic- memory settings of the BiG-T XandBiG-LATXver- E E ally displays all LAT X symbols and helps you select- sions. This means that you can compile large docu- E ing the correct statements for all math symbols. With ments with many references and labels. the LATEX commands-bar one can select from a list of There is nowadays a solution to the DOS-extender prob- all LATEX commands. WINTEX also has some dialog lem. Perhaps not the perfect solution but it works boxes. There are dialog boxes for the mathematical ar- and I think in the near future will become idiot proof. ray, the eqnarray environment, the tabular environment Mattes wrote a program (emxbind -x) that deletes and the LATEX preamble. With dialog boxes the making his own EMX DOS-extender from the tex386.exe of the above structures becomes easy. and adds a small program (emxl)totex386.exe. When you open a new document, WINT X gives you Now tex386.exe will by default look for Mattes E access to dialog boxes that will help you to build the own DOS-extender (emx.exe)ontheDOS-pathor preamble and the style options. With the main dialog will look in the environment variable EMX what DOS- box you choose the document style and associated op- extender to use. There are two possible memory- tions. Clicking on Page style, Math style or Floating extenders you can use bodies style buttons will open environment speci®c dia- 1. The DOS-extender emx.exe (version 0.8f), i.e. log boxes. Once selected, the options are inserted in E. Mattes own DOS-extender. This will only work the newly opened document. under DOS and not under WINDOWS. To use this

DOS-extender set the environment variable EMX to I could not read many of my own LATEX documents and

n n SET EMX=C:nEMTEX EMX.EXE I really missed the powerful macro possibilities as for 2. The DPMI-extender rsx.exe (version alpha 0.51) instance with Qedit (or TSE). My general conclusion is written by R. Schnitker. This will only work under that the tool-bars and the dialog-boxes makes it really WINDOWS and not under DOS. To use this DOS- simple to type documents but that there need a lot to be

extender set the environment variable EMX to done before WINTEX is a real text editor and TEX tool.

n n SET EMX=C:nEMTEX COMPILER RSX.EXE 4 DVIwin version 2.7 So, simply by updating your tex386.exe and adding The DVIwin driver is written by H. Sendoukas and lets two memory-extenders to your EMT X system you now E you preview and print DVI ®les under MS-Windows can use EMT X under DOS as well as under WINDOWS. E 3.1. Its main advantages are: speed, compatibility The DPMI-extender is still in a testing phase (an alpha with any raster device with a WINDOWS driver, and release), so there could be some bugs. Indeed some graphics capability. All screen and printer handling bugs are already documented and will be solved in the is done through WINDOWS, so it should work on any near future. I have noticed that after running EMT X E printer supported by the system. You can insert arbit- under WINDOWS my log ®le as well as my dvi ®le and rary graphics ®les produced by most WINDOWS applic- several others became read-only. No serious problem ations, or other standard graphics ®les (e.g. TIFF, PCX, because with a simple DOS statement these ®les are no etc.) provided that you have the appropriate graphics longer read-only (i.e. attrib -r *.dvi *.log). ®lter. The EMT X specials and the PostScript specials A simple batch ®le solves these inconveniences. All the E to include graphics, however, are not supported. testing I did under WINDOWS didnot result in crashes or strange error massages. The errormessages that ap- DVIWIN is easy to install and also reads fonts from

peared were all the result of the know bug that some EMTEX fontlibrary ®les (.fli ®les in the directory n ®les appear to be read-only after rsx has opened them. c:nemtex texfonts). The font-substitution looks All these errors are easily corrected. much like the one used by EMTEX. There only differ- ence is that DVIWIN does not allow wildcard characters The conclusion of this section is that people who want (e.g. cm* 150 -> cm* 300 is not allowed). aTEXforWINDOWS, should consider to upgrade/install the EMTEXsystem. I really like DVIWIN because every time you switch to DVIWIN, it checks if the dvi-®le that is currently 3WinTEXversion 1.0 displayed is updated. If updated it will load the new dvi-®le and position at the same position (page) as the WINT X is a text editor for WINDOWS specialy writ- E old dvi-®le. This makes it really simple to perform the ten for the use with T XandLATX. It is written by E E edit-compile-view cycle. S. Morin and helps you with all the dif®culties of writ- ing documents in LATEX. WINTEX is shareware and

Dutch TEX Users Group (NTG), P.O. Box 394, 1740 AJ Schagen, The Netherlands Reprint MAPS#11 (93.2); Nov 1993 162 Some notes about TEX and MS-Windows Bijlage B

My general conclusion is that DVIWIN is an excellent at least 50 (due to font loading). Also one needs to

dvi-viewer and printer for WINDOWS. I think it will copy the *.dll ®les from the directory where one

n n

be only a question of time or all EMTEX possibilities installs WINTEX(e.g.c:nemtex win ) to the win-

n n that are not available yet in DVIWIN (e.g. automatic dow system directory (e.g. c:nwindows system ). fontgeneration, specials) can be used with DVIWIN. The font substitution ®le dviwin.sub we need to

adjust to our own (extra) fonts and then copy it to

n n c:nemtex texfonts 5ATEX for Windows system our font directory ( ). After installing DVIWIN one has to start the program and In this section I will explain what I have installed under adjust some OPTION settings. First we change the WINDOWS and how I use WINDOWS to produce T X E resolution to 300 dpi and then change the OPTION

documents.

n n

FONT DIRECTORY to c:nemtex btm texfonts

n n n First I updated the EMTEX tex386.exe and added n$rdpi;c: texfiles fonts $rdpi.Nowwe

the two memory-extenders. These programs will be are ready for action ::: available on the 27 high density diskettes the NTG will DVIWIN also has two nice utilities. The program distribute as the complete T X distribution for the PC. E clipmeta.exe can be used to take a meta®le or I will also try to get them on all the CTAN servers. a bitmap ®le from the system clipboard and save it to a The TEX shell I use is 4TEX. This user friendly menu disk meta®le. E.g. you can use gnuplot to make nice system can be used to perform all (novice and ad- plots and then paste then to the clipboard and convert vance) TEXing. 4TEX version 3.00 (promised to be this with clipmeta.exe to a meta®le. The program released in november 1993) will be updated so that wbr.exe is a text ®le browser under WINDOWS.It it can run every thing in a DOS-window when run- is for instance used in combination with DVIWIN to ning WINDOWS. The only thing one has to do is to display the log ®les. open a new program group, i.e. select in the Program When I use TEX I ®rst start a 4TEX session and at the Manger the FILE and then NEW and PROGRAM GROUP same time a DVIWIN session. I use the menu of T X and type the new group name (e.g. TeX). After this 4 E for all TEXingandswitchtoDVIWIN whenever I want you can install 4TEXasanewPROGRAM ITEM and use

to view and print the document. 4TEX has much to offer

n n c:nemtex btm 4tex.pif as the COMMAND LINE

what is not yet available under windows (e.g. automatic

n n and use c:nemtex btm 4tex.ico as the icon. fontgeneration and many other utilities). Of course I have installed WINT X, DVIWIN and E The general conclusion is that in the worldof WINDOWS some other T XWINDOWS utilities (e.g. dvips, E much is on the move. It will only be a matter of time ghostscript and gnuplot for WINDOWS)asPro- and there will be a perfect T X system for WINDOWS. gram items in the same Program group. Now I have a E Especially the inclusion of all kinds of graphics and the complete T X system for WINDOWS. E mulitasking (even better real time display while typing) One thing to remember when installing DVIWIN is that will be possible under WINDOWS. Perhaps all this will the number of ®les in the config.sys should be not be possible under DOS 7.0.

Reprint MAPS#11 (93.2); Nov 1993 Dutch TEX Users Group (NTG), P.O. Box 394, 1740 AJ Schagen, The Netherlands