5. Preview the typesetting
Click on the DVI or PDFview toolbar icon or the TEXTEX View &
menu item; or type your previewer command in a terminal shell.
(Note that there may be a pause the first time you use your DVI viewer, while WYSIWYG font files are created.2)
6. Print it
Click on the Print toolbar icon within the viewer, or use the TEXTEX Print & menu item, or type dvips -f demo | lpr (Unix/Linux).
If you encounter any errors, it means you do need to study this chapter after all!
2.3 Editors
All the text of your documents can be typed into your LATEX document from a standard keyboard using any decent plain-text editor. However, it is more convenient to use an editor with special features to make using LATEX easier. Some of the most popular are TEXshellWinShell, TEXnic Center, and WinEdt (Windows only); and LYX and Emacs (all platforms).
2.3.1 LYX
The LYX document editor (all platforms) is a special case, as it uses the What You See Is What You Mean (WYSIWYM) model of synchronous typographic editing as opposed to What You See Is What You Get (WYSIWYG), and many users prefer this interface (but see the reservations in the Introduction on p. xiv).
2DVI previewers use their own font files specially created from the font outlines (TrueType, OpenType, PostScript, METAFONT, etc). The first time you use a font at a size not used before, there will be a second or two’s pause while it gets created. The more you use LATEX, the less this happens.
Formatting information
19
Figure 2.2:The LYX document editor
LYX makes a strong case for using synchronous typographical editing: it is possible to create even quite large and complex documents without seeing a backslash very often, although with math or complex macros there is probably no way to avoid having to do some manual insertion of LATEX code.
The free availability on multiple platforms makes this a clear answer to the myth of ‘having to edit like a programmer’, and as it is an Open Source project, there is constant improvement, both to the facilities and to the interface.
Probably the only real reservation is that it does not save native LATEX files by default. It uses its own internal format, and it can export LATEX for use in other editors, but the exported files are not designed for human legibility, only for LATEX processing. In a co-operative environment this would be a serious drawback, but for the individual user this interface is an excellent tool.
2.3. EDITORS
Figure 2.3:The TEXshell editor
2.3.2 TEXshell
This is one of the simplest of all the plaintext Windows editors, but it has most of the tools needed to begin with. Sectioning, lists, and graphics can be inserted from the menus, and there are buttons for running LATEX on the open document and for previewing the typeset document.
The syntactic highlighting distinguishes between commands and your text, and it comes with options for spellchecking (you need to install ispell), and for adding math, Greek (math), and some symbol characters from a pickchart. The typeset display is done using your installed DVI viewer (there is no provision for PDF, although as it is configurable, that could probably be edited into the menus).
Download the .tar.gz file from CTAN in the support/TeXshell/
directory and unwrap it into somewhere like C:\ProgramFiles\
Formatting information
21
Figure 2.4:The WinShell editor
TeXshell\.3 There is a tsconfig program in the same directory on CTAN, which is designed to help with reconfiguring TEXshell.
2.3.3 WinShell
This is another free Windows editor for beginners with LATEX.
Despite its simplicity, it is capable of a considerable amount of document management and assistance with editing. As well as handling stand-alone LATEX files, you can create a ‘Project’ for larger documents, which helps you keep track of additional files like separate chapters, illustrations, diagrams, indexes, etc.
You run LATEX direct from the toolbar icons or with F-key shortcuts. Both standard LATEX and pdfLATEX are supported, as well as creation and previewing of PostScript and PDF output.
There are additional toolbars for math characters, and there is
3Yes, I know I said don’t use directory names with spaces in them — and so you shouldn’t, for your LATEX documents — but Windows programs are usually safe enough in them.
2.3. EDITORS
Figure 2.5:The TEXnicCenter editor
a ‘Table Wizard’ for handling tables. The syntax highlighting distinguishes between commands (in blue) and delimiters (in red), leaving your text in black.
Download the WinShellnn.exe program (self-contained setup:
the nn changes with the version) from CTAN in the systems/
win32/winshell/directory and double-click it to start the setup.
2.3.4 TEXnicCenter
TEXnicCenter is a powerful Windows editor suitable both for the beginner and the more advanced user. Its ‘Project’ environment keeps track of multiple files, and the processing function (the bit which actually runs LATEX, here called ‘Build’) tries to ensure that all the files you need for a large or complex document are in place before you start typesetting, to avoid errors like missing illustrations.
Formatting information
23
Figure 2.6:The WinEdt editor
It’s a much more wordprocessor-like control interface, with configurable toolbars and button-controls for lists, math, tables, and previewing options.
Download the TXCSetupxxx.exe program (self-contained setup:
the xxx bit changes with the version) from CTAN in the systems/
win32/TeXnicCenter/ directory and double-click it to start the setup.
2.3.5 WinEdt
WinEdt is a highly configurable plain-text editor for Windows.
It comes with a host of special functions and shortcuts for TEX and LATEX, based on the MikTEX distribution. It is supplied on the TEX Collection 2004 DVD and the proTEXt CD. You can also download it from http://www.winedt.com — in either case there’s a 1-month free trial, then it reminds you to buy it.
WinEdt uses a built-in toolbar of configurable buttons, preset for use with LATEX, and it provides syntactic coloring of LATEX
2.3. EDITORS
commands. Both the positioning and effect of the buttons can be changed, using an editable file of icons and a configuration panel.
This flexibility lets you bind a program and arguments (equivalent to a typed command) to a particular icon.
There are default buttons on the toolbar for one-click typeset-ting, previewing, and PostScript or PDF generation from LATEX documents, and it manages multi-file document projects like most of the other editors. Winedt is also used by many people for normal plaintext file-editing tasks, in preference to more limited programs like Notepad. If you’re using the fpTEX which came with the 2003 TEX Collection, some editing of the menus is required (explained in the local installation document) because the default setup is for MikTEX/proTEXt.
2.3.6 GNU Emacs
Emacsis a product of the GNU Project.4 Versions are available for all makes and models of computer, and it has a LATEX-mode which provides syntactic colouring (‘fontification’ in Emacs-speak) and mouseclick processing from a menu or toolbar.
Emacsis a very large and powerful editor, with ‘modes’ (plug-ins) to handle almost everything you do on a computer. Many users run Emacs once on logging in, and never leave it for the rest of the day — or month. As well as edit, you can use it to read your mail, browse the Web, read Usenet news, do wordprocessing and spreadsheets, compile programs, help you write in any computer language — including XML and LATEX — and it provides a few games as well.
Emacs knows about LATEX and how to process it, so it comes with a menu full of LATEX operations to click on. If you are editing complex documents with mathematics, there is a mode (AUCTEX) which has even more functionality. LATEX support is well-developed, and there is a hierarchy of newsgroups for Emacs support.
4‘GNU’s Not Unix (GNU)’ is a project to make a computing environment completely free of restrictions.
Formatting information
25
Figure 2.7: Emacs editing LATEX
Because Emacs runs on Microsoft Windows, Macs, Linux, and most other platforms, many LATEX users who have multiple ma-chines (and those who have multiple users to support) prefer it to other editors because it provides the same environment regardless of which platform they are using.
It’s sometimes criticised for a steep learning curve, but in fact it’s no worse in this respect than any other editor, given the power