CLI Home
Archive

Integrated Development Environments for LaTeX
Windows 2000 and Red Hat Fedora Core 1

Bill Moss
March 16, 2004

Contents

Introduction
TeXnicCenter and MikTeX on Windows
Kile and teTeX on Linux
Post Installation Configuration
Math Fonts
Conclusions

Introduction

This article is for users of LaTeX on Windows or Linux. LaTeX is a system for producing publication quality articles and books, especially those containing mathematical expressions. LaTeX is widely used in higher education and the publication industry.

In the mid 1980's, I became a heavy user of OzTeX on a Mac. In the early 1990's, I set up and administered the Sun network for the Department of Mathematical Sciences at Clemson, including teTeX. In the mid 1990's, I started using the commercial LaTeX distribution Y&Y TeX on a PC, and I added the commercial Mathtime fonts to teTeX on the Sun system and to Y&Y TeX on my PC. In addition, the commercial Adobe Acrobat Distiller was installed on both the Sun and PC systems.

On the Sun system, the most popular applications for TEX input file creation were the Emacs and Vi editors. A shell script was used to automate the building of DVI, PS, and PDF output files. On the PC, the commercial editor WinEdt was used to produce TEX files. WinEdt is a scriptable editor, so buttons were created to build DVI, PS, and PDF output files.

Using either teTeX or Y&Y TeX together with the Mathtime fonts and the Acrobat Distiller, I produced class notes in PDF format for Web distribution which looked good on screen and in print. In addition, file sizes were small because the Times text font did not have to be embedded in the PDF files. These files only contained subsets of the Mathtime fonts. However, teTeX and Y&Y TeX were not easy to set up.

I have used WinEdt and the Y&Y TeX system exclusively for almost a decade. Recently, I was motivated to see how far LaTeX technology has progressed in a decade with respect to ease of installation and ease of use. I was in for a surprise. On the Windows side, we have TeXnicCenter and MikTeX. On the Linux side, we have Kile and teTeX. All of these applications are free, easy to use, easy to install, and require almost no configuration. TeXnicCenter and Kile can reasonably be called integrated developement environments (IDEs) because all document processing occurs within these systems.

Input files for LaTeX are plain text files containing LaTeX markup. Learning the LaTeX markup language is a challenge but IDEs such as TeXnicCenter and Kile decrease the pain. Besides the documentation that comes with MikTeX and teTeX, there are several good books on LaTeX and there is a wealth of information available on the Web. Googling LaTeX produced about 12,600,000 hits. In any university mathematics, science, or engineering department you are likely to find a LaTeX expert. Output files can be produced in DVI, PS, and PDF formats. These output formats can be viewed on screen, printed, or distributed on the Web. In this regard, the PDF format is most popular. The formatting in the output files is controlled by stylesheets referenced in the TEX input file. There are standard stylesheets for letters, articles, and books and a large number of packages. In addition, conferences and journals will often provide their own stylesheets.

One cycle of the normal build process for a LaTeX document involves editing the TEX input file, compiling the TEX file by running latex, viewing the resulting DVI, double clicking on an error in the DVI file, and automatically returning to the point in the TEX file that is generating the error. The process of moving from a point in the DVI file to the corresponding point in the TEX file is called an inverse search. The process of moving from a point in the TEX file to the corresponding point in the DVI file is called a forward search.

In some cases an error may terminate the compile of the TEX file. You can examine the compiler output and try to debug the input TEX file or you can force the compile to completion and then look at the DVI file to see where errors first occur. There are multiple ways to create PDF output files which we discuss below.

A project is a group of TEX or other files that manage all information related to
your main document. A typical example of using a project is a document consisting
of several chapters, written in different TEX files. All these files could be included in
a project to make the whole document easier to manage. You can also store non-source files
such a graphics in a project.

Forward and inverse searches and projects are implemented in TeXnicCenter-MikTeX and Kile-teTeX. Both systems also have a spell checker.

TeXnicCenter and MikTeX on Windows

MikTeX 2.4 can be downloaded and installed from www.miktex.org. Small (25 MB), large (64 MB), and complete (250 MB) systems are available depending on which packages are included. Most users will find the large system adequate. MikTeX 2.4 comes with a new package manager which can be configured to download packages that are not already loaded or for which updates are available. The package manager implementation seems solid. TeXnicCenter can be download and installed from www.ToolsCenter.org. Most users will be satisfied by the default installs for both of these applications. TeXnicCenter will detect MikTeX and automatically configure several output profiles. At this point, you have a fully functional LaTeX system with an IDE designed to reduce the learning curve for beginners. The help systems include manuals for MikTeX, TeXnicCenter, and LaTeX.

Ghostscript is part of the standard install on Linux but it is not part of the MikTeX distribution on Windows. For comparison purposes, I also installed Ghostscript and its companions GSView and RedMon. AFPL Ghostscript is distributed with a license called the Aladdin Free Public License that allows free use, copying, and distribution by end users, but does not allow commercial distribution. The current version of Ghostscript can be downloaded at www.cs.wisc.edu/~ghost/. The postscript (PS) previewer GSView and the port monitor RedMon can be downloaded from www.cs.wisc.edu/~ghost/gsview/. To use the utilities that come with Ghostscript it is neccessary to add the folders c:\gs\gs8.14\bin and c:\gs\gs8.14\lib to the system path.

The Adobe Acrobat reader provides the most consistent rendering of PDF files on Windows although there are now a number of other free viewers. In addition, Acroread provides information about font types and embedding. Version 6.0 can be downloaded www.adobe.com.

On detection of MikTeX, TeXnicCenter automatically configures several out profiles. An output profile specifies how the output file is to be produced. I created a set of output profiles that matches as close as possible the profiles found in Kile on Linux. Here are the output profiles and a brief description.

latex => dvi
Compiler: LaTeX
Path: C:\texmf\MiKTeX\bin\latex.exe
Arguments: --src -interaction=nonstopmode "%Wm"
PostProcessor: None
Viewer: Yap
Path: C:\texmf\miktex\bin\yap.exe
Arguments: -1 "%bm.dvi"
Description: This profile is commonly used during the edit-compile-bebug cycle. Double clicking in the Yap window, moves to the corresponding point in the TEX input file in the TeXnicCenter window. Putting the cursor at a point in the TEX file and hitting the DVI button (F5) moves to the corresponding point in the DVI file.
latex => ps
Compiler: LaTeX
Path: C:\texmf\MiKTeX\bin\latex.exe
Arguments: --src -interaction=nonstopmode "%Wm"
PostProcessor: DviPS
Path: C:\texmf\MiKTeX\bin\dvips.exe
Arguments: "%Bm.dvi"
Viewer: GSView
Path: C:\Program Files\Ghostgum\gsview\gsview32.exe
Arguments: "%bm.ps"
Description: This profile is seldom used, since PS output files are typically only used as input files for printers. The GSView appears fuzzy.
latex => distiller
Compiler: LaTeX
Path: C:\texmf\MiKTeX\bin\latex.exe
Arguments: --src -interaction=nonstopmode "%Wm"
PostProcessor: DviPS
Path: C:\texmf\MiKTeX\bin\dvips.exe
Arguments: "%Bm.dvi"
PostProcessor: Distiller
Path: C:\Program Files\Adobe\Acrobat 5.0\Distillr\acrodist.exe
Arguments: /n /q "%bm.ps"
Viewer: Acroread
Path: C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe
Arguments: "%bm.pdf"
Description: This is a popular profile for users who have installed the commercial application Adobe Acrobat. The Acrobat Reader is free.
latex => ps2pdf
Compiler: LaTeX
Path: C:\texmf\MiKTeX\bin\latex.exe
Arguments: --src -interaction=nonstopmode "%Wm"
PostProcessor: DviPS
Path: C:\texmf\MiKTeX\bin\dvips.exe
Arguments: "%Bm.dvi"
PostProcessor: Ps2Pdf
Path: C:\gs\gs8.14\lib\ps2pdf.bat
Arguments: -dCompatibilityLevel=1.3 "%Bm.ps"
Viewer: Acroread
Path: C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe
Arguments: "%bm.pdf"
Description: This popular profile uses Ghostscript to produce PDF files for free. This profile executes much faster than the latex => distiller profile and it often produces smaller file sizes.
latex => dvipdfm
Compiler: LaTeX
Path: C:\texmf\MiKTeX\bin\latex.exe
Arguments: --src -interaction=nonstopmode "%Wm"
PostProcessor: DviPdfm
Path: C:\texmf\MiKTeX\bin\dvipdfm.exe
Arguments: "%Bm.dvi"
Viewer: Acroread
Path: C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe
Arguments: "%bm.pdf"
Description: This popular profile uses DviPdfm to produce PDF files for free. This profile executes much faster than the latex => distiller profile. Since PS is not an intermediate format in this process, EPS figures must be converted to PDF format before inclusion.
latex => pdflatex
Compiler: PdfLaTeX
Path: C:\texmf\MiKTeX\bin\pdflatex.exe
Arguments: -interaction=nonstopmode "%pm"
PostProcessor: None
Viewer: Acroread
Path: C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe
Arguments: "%bm.pdf"
Description: This popular profile uses PdfLaTeX to produce PDF files for free. This profile executes much faster than the latex => distiller profile. Since PS is not an intermediate format in this process, EPS figures must be converted to PDF format before inclusion.
texify => dvi
Compiler: LaTeX
Path: C:\texmf\MiKTeX\bin\texify.exe
Arguments: "%pm"
PostProcessor: None
Viewer: Yap
Path: C:\texmf\miktex\bin\yap.exe
Arguments: -1 "%bm.dvi"
Description: This popular profile uses the MikTeX utility texify to simplify the creation of DVI or PDF documents. It automatically runs pdfLaTeX, MakeIndex and BibTeX as many times as necessary to produce a DVI or PDF file with sorted indices and all cross-references resolved. In this profile, the output is a DVI file.
texify => pdf
Compiler: LaTeX
Path: C:\texmf\MiKTeX\bin\texify.exe
Arguments: -p "%pm"
PostProcessor: None
Viewer: Acroread
Path: C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe
Arguments: "%bm.pdf"
Description: This popular profile uses the MikTeX utility texify to simplify the creation of DVI or PDF documents. It automatically runs pdfLaTeX, MakeIndex and BibTeX as many times as necessary to produce a DVI or PDF file with sorted indices and all cross-references resolved. In this profile, the output is a PDF file.
texify => clean
Compiler: LaTeX
Path: C:\texmf\MiKTeX\bin\texify.exe
Arguments: -c "%pm"
PostProcessor: None
Viewer: None
Description: This popular profile uses the MikTeX utility texify to remove all files except the source file and the DVI file. The files that are removed are configurable.

The latex => dvi profile is useful during the edit-compile-bebug cycle. TeXnicCenter has both forward and inverse searches implemented which can be a big time saver. A forward search takes you from a specific point in the TEX file to the corresponding point in the DVI file. An inverse search does the opposite.

The texify => pdf profile is a good choice for producing PDF files. The latex => ps2pdf profile is generally produces the smallest file sizes. Of the profiles which produce PDF output, the latex => distiller profile executes the slowest.

The texify => clean profile is a good choice for removing auxiliary files after a final output file has been constructed.

The Ghostscript ps2pdf utility can be put to a number of interesing uses which are not directly related to LaTeX document processing but are worth mentioning.

Create a shortcut with Target C:\gs\gs8.14\lib\ps2pdf.bat and Start in folder C:\gs\gs8.14\lib, and put this shortcut in the Send To folder. Now you can do a PS to PDF conversion by right clicking on a PS file and sending it to this shortcut.

Create a print to file printer using the HP Color LaserJet 8500-PS driver and the RedMon port monitor. Set up instructions can be found at http://www.martinaberger.com/freepdfwriter.html. Now you can create a PDF file by choosing this printer in any Windows application.

Kile and teTeX on Linux

The teTeX and ghostscript are part of the of FC1 distribution.

Kile is an integrated development environment (IDE) for LaTeX which is built on the KDE libraries. I loaded the KDE desktop system from the FC1 distribution and then loaded the RPM kile-1.6.1-0.fc1.i386.rpm from kile.sourceforge.net. Although Kile is a KDE application, it can be run under Gnome. The LaTeX srcltx package must be loaded before forward and inverse searches will work in Kile. This package can be found on CTAN in the macros/latex/contrib/srcltx directory. In addition, TEX input files must contain the line \usepackage[active]{srcltx} and the Kile embedded viewer, Kdvi, must have an option set: Settings -> DVI Options -> DVI Specials -> Shell Command -> kile %f --line %l.

The Adobe Acrobat reader provides the most consistent rendering of PDF files on Linux although there are now a number of other free viewers. In addition, Acroread provides information about font types and embedding. I loaded the RPM acroread-5.0.8-1.rhfc1.dag.i386.rpm from dag.wieers.com/packages/acroread. Note that Dag Wieers works for IBM Belgium. This repository is of high quality. Each of the packages are tested on the specific Red Hat version before releasing.

Kile help files include the Kile Handbook and a LaTeX Reference Guide. The Kile Handbook is a guide to Kile usage and also provides and basic information about creating a LaTeX document. The Reference guide contains an alphabetical index of LaTeX commands as well as an index by subject.

Kile has toolbar buttons for the following actions.

The Kile viewer applications are configurable. The embedded viewer for all three output file types is Kdvi. Forward and inverse TEX-DVI searches are implemented with the embedded viewer. A double click initiates an inverse search and there is a toolbar button for a forward search. My preference is to use the embedded viewer for DVI and PS files and to use the Acrobat Reader for PDF files. Kile has toolbar buttons for the following views.

Kile has a configurable Quick Build button which can be set to one of the following options.

Kile has a menu item to remove auxiliary files: Build -> clean.

Most users will execute the edit-compile-bebug cycle, including forward and inverse searches using the latex and DVI toolbar buttons. The desired final output file can be produced using the Quick Build button. After the final output file has been built, auxiliary files can removed by selecting clean on the Build menu.

Most Linux applications have a built-in generic postscript printer. Some such as gedit and OpenOffice also have a built-in convert to PDF option. Maple 9, for example, has neither option built-in. In this case, you can configure a real or virtual local postscript printer and then use the print to file option. PS files can be converted to PDF format using command ps2pdf file.ps file.pdf .

Post Installation Configuration

One of the features of TeXnicCenter-MikTeX and Kile-teTeX is that they are nearly plug-and-play; that is, you can do a default install and start using them. The default paper size (a4, letter, legal, ... ) and the PDF version (1.2, 1.3, 1.4) are exceptions but neither of these is a show stopper.

The default paper size is set to European standard a4. I found the teTeX configuration utility texconfig useless so I did the configureation by editing the appropriate files.

dvipdfm
Configuration file: texmf/dvipdfm/config/config:
p letter
pdflatex
Configuration file: texmf/pdftex/config/pdftex.cfg:
page_width 8.5 true in
page_height 11.0 true in
dvips
Configuration file: texmf/dvips/config/config.ps:
% @ A4size 210mm 297mm (comment out)
% @+ %%PaperSize: A4 (comment out)
dvi viewer
TeXnicCenter Yap: menu item
Kile Kdvi: menu item

The default PDF file version is 1.2, 1.3, or 1.4 depending on the application. I have set all applications to produce version 1.3.

dvipdfm
Configuration file: texmf/dvipdfm/config/config:
V 3
pdflatex
Configuration file: texmf/pdftex/config/pdftex.cfg:
pdf_minorversion 3
ps2pdf
Commandline argument: -dCompatibilityLevel=1.3

Math Fonts

Type 1 fonts are required for creating high quality PDF files. Type 1 versions of the default Computer Roman fonts come with MikTeX and teTeX. On screen these fonts appear as not sufficiently bold and the PDF file sizes are large. To optimize on-screen viewing and file sizes, it is popular to use the Times family of text fonts. The mathptmx package (comes with MikTeX and teTeX and provides math characters that look good with the Times font family. The mathpazo package comes with MikTeX and teTeX and provides math characters that look good with the Palatino family of text fonts. There are several commercial math font packages available. The Mathtime and Mathtime Plus packages are available from Y&Y at www.yandy.com. To install the Mathtime and Mathtime Plus packages, I created the directories

../texmf/fonts/type1/yandy/mathtime
../texmf/fonts/type1/yandy/mathplus

and copied the *.pfb font files to these directories. I updated the font map files with the commands

Windows: C:\texmf\miktex\bin\initexmf --mkmaps
Linux: updmap

To use the mathptmx package, include the following lines at the top of your TEX file.

\usepackage{mathptmx, courier, pifont}
\usepackage[scaled=0.92]{helvet}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

To use the mathpazo package, include the following lines at the top of your TEX file.

\usepackage{mathpazo, courier, pifont}
\usepackage[scaled=0.95]{helvet}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

To use the mathtime package, include the following lines at the top of your TEX file.

\usepackage[LY1]{fontenc}
\usepackage[LY1]{mathtime}

Conclusions

The TeXnicCenter-MikTeX and Kile-teTeX systems are comparable, easy to install, and easy to use. Post-installation configuration is mimimal. The choice of paper size and PDF version could be easily be added to the installation scripts. Alternatively, a texconfig application could be added to both systems. The texfig applications that comes with teTeX needs work.