1

Introduction

Donald E. Knuth decided to create a new typesetting system, which would be called TEX, because there had been a change in the printing system used for the volumes of his book The Art of Computer Programming and Knuth found the result of the new system awful.

The goal of TEX was then to have a system which would always produce the same documents independently of the actual machine they were processed on. Knuth also designed the Computer Modern family of typefaces and the METAFONT language for font description.

The work initiated in 1977 was finished (the languages were “frozen”) in 1989. TEX and METAFONT are not evolving any more except for minor bug fixes (TEX versions are numbered following the decimals of π—now 3.1415926—and METAFONT the decimals of the number “e”—now 2.718281).

TEX provides basic tools (commands/instructions/“primitives”) to define typesetting; almost every detail has to be defined, but the language allows the creation of macros for repeatedly used constructs. So collections of macros are loaded through format files (i.e., pre-compiled large macro collections).

Knuth created an original default format (600 commands, more or less) which is called Plain TEX. This facilitates creating documents.

The most widely used format is LATEX (Leslie Lamport, 1985), which provides more global commands and structures for documents (article, book,…) allowing easier and faster work, but sometimes with loss of flexibility due to the more or less rigid framework. But there are many other formats and TEX-variants in use as well, such as AM S-TEX, AM S-LATEX, ConTEXt, or XETEX, each having specific goals and advantages (and drawbacks).

To extend the format, one loads “packages” which are collections of macros specific to some aspect of typesetting.

From its specification in the late 1970s, the TEX family had to evolve until now, last version March 2008, to take into account the developments in the typesetting world outside TEX.

Some of the problems to answer were/are:

To answer these questions and others, many “engines” and programmes have been created around TEX, including pdftex, pdflatex, dvips, ps2pdf, and METAPOST, which opens the TEX world to the possibilities of PostScript and PDF. XETEX and XELATEXto be able to use the “normal” fonts found on the different machines and to be able to cope with writing systems different from the left to right systems which originated in Europe (Latin and Cyrillic letters and associates)—right to left, vertically, pictograms,…Or LuaTeX and LuaLaTeX to have a powerful scripting language.

To use TEX and the systems of its family, one has to create a “source” document as TEX is only a system to “transform” a source document into a (beautifully) typeset document. This source is a simple text with typesetting instructions and one needs a programme to create it: the editor.

There are many editors able to create a TEX source; some are general editors, others are specifically designed for TEX: here TEXworks comes in.

TEXworks is a project to create a text editor for use with the TEX family of tools; we will refer to these as (LA)TEX. Instead of creating a new sophisticated program, equipped with multiple tool-bars to meet any need, TEXworks provides a simple editor, offering at first sight only a limited set of tools for text editing as well as a single button and a menu to typeset a (LA)TEX text.

The idea to create the editor came to Jonathan Kew, the initiator and leader of the project, after a long period of reflection on the reasons why potential users tend to keep away from (LA)TEX, as well as pondering the success of the TEXShop editor on the Mac.

Finally the goal was also to provide the same editor on many operating systems: TEXworks currently runs on Linux, Mac OS X and Windows. The interface is always the same and the program offers the same functionality on all three platforms.

After this introduction, the second section of this manual explains how to install the software. In the third section, we describe the interface and create a first document as well as show the basics of TEXworks. In the forth and fifth section, the advanced tools provided by TEXworks are presented; you should read these sections only after mastering the basic working of TEXworks. These advanced tools allow much more effective working practices. The sixth section gives a brief introduction to scripting. This section focuses on using ready-made scripts, not on writing your own scripts (which is beyond the scope of this manual and will be presented elsewhere). After that, the seventh section in which some pointers to further information about TEXworks and sources for help are compiled concludes the main part.

Finally, the appendices provide additional information how TEXworks can be customized, about the regular expression search/replace system, and how TEXworks can be compiled from source. A short bibliography and an index conclude this manual.

1.1 Icons and style

Because a picture is often worth a thousand words, icons and special styling is used throughout this manual to avoid cumbersome paraphrases or mark specialties. Keyboard keys are usually depicted as   A  , with the exception of a few special keys. These are: Shift , Page , Page , ←' (return), , , , ,     (space), ↦- → (backspace), and (tab).

In addition, mouse clicks are depicted as pict (left click) and pict (right click; on Mac OS X with a one-button mouse, this is usually available by holding down Ctrl while clicking).

Apart from input instructions, several passages throughout this manual are marked by special styling.

Information that is only valid or relevant for a particular operating system is marked like this:

This only concerns you if you use Windows.
Of course you can also read it if you use another operating system.
It just will not be of much use to you.

Code examples are set in a fixed-space, typewriter font, with lines above and below to set it apart from the rest of the text:

  Hello \TeX-World!

Closely related to this, chapter 3 contains several tutorials, which are typeset just like the code examples above, but with an additional notebook icon next to it.