TEX.DLL TeX-LaTeX Support for CodeWright 5.1d ************************************* version 98.11c (32 bits), November 23, 1998 Can be freely distributed for non commercial purposes. Gilbert Ritschard THEMES, Department of Econometrics University of Geneva 102, bd Carl-Vogt CH-1211 Geneva 4, Switzerland e-mail: Gilbert.Ritschard@themes.unige.ch url: http://www.unige.ch/ses/ecoth/staff/ritschar Features: ******** 1. A TeX setup dialog box in which one can define 2 TeX typesetter commands. 4 TeX printer or viewer driver commands with customizable start and end page switches. 2 TeX spellchecker commands. 2. A TeX menu handler which allows to - open the TeX Setup dialog box. - call any of the 8 commands defined in the TeX Setup - translate (French) accented letters from ANSI or OEM into TeX form (\'{e}) and reciprocally. - other conversions (text to TeX, tab to tabular). - enable/disable TeX word wrap (see below). - enable/disable TeX math mode coloring. - enable/disable Use of project root as TeX main. When a printer/viewer command is activated, a dialog box asks for the start and end pages. The dialog box is, however, activated only if the associated command line contains one of the parameters [s], [e] or [n] (see Installation, 4). After a TeX spell check, a dialog box offers the choice between accepting the spell changes or to restore the previous state of the buffer. 3. A TeX error parser (_TeXErrorInfo). After compilation, the error parser seeks the first error or warning message in the log file and positions the cursor on the concerned line in the tex source file. Next errors may then be located the same way with the CW ErrorNext API function. 4. A modified Word Wrap. Unlike the CW built in word wrap, it considers any line with a space, a tab or a new line character in column one as the beginning of a new paragraph. It turns also auto-indent off inside a paragraph. The following API functions can be associated to keys: TexWrapParagraph TeX reformats the paragraph TexWrapAll TeX reformats all paragraphs into buffer or selection TextToTeX 1 Makes basics changes ( $ % & {} ) and TexWrapAll on a text-only buffer or selection with line breaks inside paragraphs. TextToTeX 0 Makes basics changes ( $ % & {} ) and TexWrapAll on a text-only buffer or selection without line breaks inside paragraphs (white lines are inserted between paragraphs). 5. Chroma coloring for - TeX commands (words beginning with a backslash), - TeX comments (from a '%' to the end of the line), - Math mode - Verbatim mode - Numbers and braces Since the math mode coloring is time consuming, it can be disabled/enabled for the current buffer with the TeXColorMath API commands: TeXColorMath 0 disables math coloring TeXColorMath 1 enables math coloring TeXColorMath 2 toggles math coloring on/off 6. LaTeX templates. See the Templates tab in the Document/Language menu item. You can add your own templates there. 7. Outline parsers command (Section, Block( \begin ) ). Installation: ************** 1. Put the file TEX.DLL in your CWRIGHT directory (usually CW32). 2. Modify the CWRIGHT.INI. The TEXMENU.INI file contains the lines which should be added into CWRIGHT.INI to 1. LibPreload TEX.DLL (required in the [LibPreload] section) Other sections are given as examples. 3. Modify the CWRIGHT.BTN. The CWTEX.BTN file contains the TeX section which should be added to CWRIGHT.BTN to 1. Give access to TeX buttons through Tools/Toolbar... customization. 4. Start Cw32.exe and customize your settings. 1. TeX/Setup The variables "[s]" for start page, "[e]" for end page and "[n]" for #pages are for use with the print/view driver commands: they pass to the command the values given in the FromPage dialog when the print/view command is launched. These parameters are optional. NEW The variable "[wn]" where n stands for the warning level 98.10c is for use with the TeX1 and TeX2 command. The higher the value of n, the fewer warnings are seeked by the error parser. For example, with [w1], the error parser skips the "Font Warning" 's, with [w3] it skips all warnings, with [w4] it skips the Overfull and Underfull boxes messages and with [w5] the "missing character" messages. The parameter is optional. Default value is [w0]. The error file name should be set to the log file produced by your TeX engine. Two alternative parametrizations are available. i) "_err_.log" The error parser will then subsitute the main name to "_err_" if the "Use main name" option is selected and the root of the current file otherwise. Works only if the path to the log file is the same as the path to the source file. ii) "[log_path]%r.log" where [log_path] is required only if it differs from the path of the source file. The %r will be replaced by the root name of the current file. Does not work with the "Use main name" option. 2. Document/language : - Edit Tab: select chroma coding. - Symbol Tab: select the blocks for the Outline. (!!! When Outline is selected CW hangs randomly for seconds !!!) - Templates Tab: add/modify templates as desired. 3. Tools/Toolbars: create a TeX toolbar using the TeX and/or other buttons (the cwright.btn should contain the TeX section mentioned above). Usage ***** The TeX word wrap works only when the normal text word wrap is disabled. Activating TeX word wrap automatically disables the normal word wrap. The reverse is not true. We recommend using project with a main tex file having the project name (projectname.tex). You can then chose to typeset the current file or the main with the TeX/Use main menu command. You can also specify the main root name in the TeX Setup dialog or by using the TeX/Set main to current menu command. !! Warning !! The use of a main file works correctly only when the Working directory specified in teh Project/Properties dialog contains is that of the main file. By default it is the current directory. With the "TeX/Set main to current" menu command, you automatically set the Working directory to the directory that contains the main file. Help files ********** If you have some TeX or LaTeX help files, we recommend to add them to the codewright help engine through Help/Configure Index File. *********************************************************** Thank you for reporting any problems to Gilbert Ritschard (addresses at the top of the file). ***********************************************************