Last updated: 25.09.2006


This guide shows you how to set up UltraEdit-32 for use with LaTeX. UltraEdit-32 is not a LaTeX graphical user interface nor a dedicated LaTeX editor, but a powerful text editor with features such as syntax highlighting, user tools, templates, regular expression search and replace, auto-completion, function list, code folding and macros. UltraEdit-32 doesn't provide any symbol repository so you have to be comfortable writing most of the LaTeX code on your own (templates aside).
This guide assumes you have already installed MiKTeX and UltraEdit-32. The screenshots are from version 12.10b of UltraEdit-32.
Adding the user tools
First of all start UltraEdit-32 and go to Advanced > Tool Configuration...
The LaTeX DVI tool
- Insert these values into the appropriate fields:
- Menu Item Name: Something like LaTeX DVI
- Command Line: texify.exe --clean --src --run-viewer "%n.tex"
--clean removes all temporary and unneccesary files created during compilation.
--src makes the compiler include source file information in the DVI file (to enable inverse search).
--run-viewer does exactly that. - Working Directory: %p
- Toolbar bitmap/icon (file path): Whatever icon you choose.
- Your tool configuration should now look something like this:
- Now, click the tab named 'Options' and make make sure these choices are made:
- Program type: Should be 'DOS Program' since texify.exe is a DOS program.
- Check 'Save active file'. This option forces UltraEdit-32 to save the file you are working on before it is compiled.
- Your configuration should now look like this:

- Then, click the tab named 'Output' and make these choices:
- Command Output (DOS commands): 'Output to List Box'.
- Check 'Cature Output'.
- Replace selected text with: 'No Replace'.
- Your configuration should look like this:

- Click 'Apply' to accept these settings.
Note: The --src option causes YAP to place small gray circles at the beginning of every paragraph.
The LaTeX PDF tool
- If you want to be able to create PDF files in a jiffy -- add these values to the fields:
- Menu Item Name: Something like LaTeX PDF
- Command Line: texify.exe --clean --quiet --pdf --run-viewer "%n.tex"
--quiet supresses all compiler output.
--pdf makes a Word .doc file instead of a DVI. Yeah, right. - Working Directory: %p
- Toolbar bitmap/icon (file path): A suitable PDF icon.
- Your tool configuration should now look something like this:

- The 'Options' and 'Output' tabs should be set up the same way as for the LaTeX DVI Tool.
- Click 'Apply' to accept the settings of your new LaTeX PDF tool.
The LaTeX Forward Search tool
- A forward search just means passing along a line number to the DVI viewer thus making it jump directly to the corresponding paragraph in the DVI file. For large documents this feature is isdispensable. To add this tool insert these values into the appropriate fields:
- Menu Item Name: Something like LaTeX DVI Forward Search
- Command Line: texify.exe --clean --src --run-viewer --viewer-opt="-1 -s %line%%N.tex" "%n.tex"
--viewer-opt passes the text between the quotation marks as parameters to the DVI viewer.
-1 and -s are parameters understood by the default viewer, YAP. - Working Directory: %p
- Toolbar bitmap/icon (file path): Whatever icon you prefer.
- Your tool configuration should now look something like this:

- The 'Options' and 'Output' tabs should be set up the same way as for the LaTeX DVI Tool.
- Click 'Apply' to accept these settings.
You can rearrange the order of the tools using the 'Up' and 'Down' buttons.
Note: Be sure to press 'OK' when you're finished or else none of your tools will be saved.
Key Mapping
UltraEdit-32 has already provided your new tools with shortcut keys, but you may want to change them to more sensible ones. Here's how:
- Go to Advanced > Configuration... > Key Mapping.
- In the 'Commands' list box select 'AdvancedUserTool1'.
- Select 'Ctrl+Shift+1' in the 'Existing Keys' list box and click 'Remove'.
- Place the cursor inside the 'Press New Key' field and press a suitable combination. Most of the 'Ctrl+Alt+' combinations are unassigned. If your window now looks similar to this you're well on your way:

- Click 'Assign' and then repeat the steps for the rest of your custom tools ('AdvancedUserTool2' and 'AdvancedUserTool3').
- Click 'OK' to save your custom Key Mapping.
Adding the tools to the toolbar
You may want to add your new tools to your toolbar. To do this follow these steps:
- Go to Advanced > Configuration... > Toolbars / Menus > Customization
- Click the 'Customize Toolbar' button to open the Toolbar dialog.
- In the left list box, scroll down and select the last element in the list.
- In the right list box, find and select 'UserTool1' and add it to the Toolbar by clicking the left-arrow button in the middle:

- Add 'UserTool2' and 'UserTool3' the same way.
- If you want to separate your custom tools from the neighbouring tools on the toolbar, add a separator (found at the top of the list in right list box) the same way as with your tools. Change the order with the up/down arrow buttons in the middle.
- Click 'OK' to save your custom toolbar.
- Your tools should now appear on the Toolbar. If you can't find them, right-click on any tool and select 'Basic' from the popup menu.
Syntax highlighting
It's a shame and a sin, but UltraEdit-32 does a poor job syntax highlighting LaTeX source. I have contacted IDM requesting support for proper LaTeX syntax highlighting and they replied that the request had been passed on to the developers. There are two wordfiles for LaTeX available at the UltraEdit-32 site, but none of them are any good. I have made some adjustments to the TeX/LaTeX ATT98580 wordfile that are available here. Append the content of this file to the end of your wordfile.txt found in the UltraEdit-32 program directory. As you can see, the first line starts with /L20, indicating that this is language number 20. If you don't already have 19 languages in your wordfile you may want to change this number. If you go to View > View As (Highlighting File Type) you can get the number of the next available language (Language ##). If you haven't added any languages before the number is most likely 12.
Inverse search
The standard DVI viewer, YAP, makes it possible to do inverse searches. This means that you can right click anywhere in the DVI file and by selecting 'Edit TeX Source' be placed near the corresponding paragraph in UltraEdit. To enable this feature follow these steps:
- Go to View > Options... > Inverse Search.
- Insert this in the 'Command line'-field: uedit32.exe "%f/%l/5"
The number 5 indicates that UltraEdit-32 should place the cursor in column 5. - Click 'OK'.
--------------------------------------------------------------------------------
You should now be able to comfortably prepare your LaTeX documents with the power of UltraEdit-32 ready at hand. Please support IDM Computer Solutions, Inc. by buying their product.
--------------------------------------------------------------------------------