2

Installation

TEXworks is only a text editor; to be able to create documents with (LA)TEX and to typeset them to PDF, we also need what is called a TEX distribution. This is a collection of programs and other files which will be automatically called by TEXworks during its work. Thus, you need to install a distribution: we will do that before starting TEXworks for the first time, as this way, TEXworks will automatically find what it needs.

TeX Live (http://www.tug.org/texlive/), a combination of teTeX, MacTeX and XEmTeX, is available for all three operating systems (Linux, Mac OS X, Windows). The current version is TeX Live 2010. Note that you need a reasonably recent version of TeX Live (2008 or later at the time of writing) to use all features of TEXworks.

For Linux: most Linux distributions include a TEX distribution, but it may not be installed by default and you will have to use the Linux package management tools to do that. As an alternative to TeX Live, one can use teTeX (http://www.tug.org/teTeX/, a predecessor system to TeX Live.

For the Mac: MacTeX, a new distribution based on gwTeX and XeTeX, is available; see http://www.tug.org/mactex/.

For Windows: a very popular distribution is MiKTeX (http://www.miktex.org/). MikTeX has an update programme, which has also been ported to Linux. You can also use the XEmTeX distribution (http://www.xemtex.org/).

2.1 Under Windows

Most of the larger TEX distributions already contain TEXworks as a package. Sometimes, these versions even have some distribution-specific enhancements. So, the preferred way of installing TEXworks on Windows is to use the package manager of your distribution. In this case, you can skip the next few paragraphs. Be sure to read the end of this section, though, as it provides important information about customizing TEXworks to your needs.

If you want to obtain an “official” version, obtain TEXworks by downloading the setup from the TEXworks web site htp://tug.org/texworks/ after the installation of the TEX distribution.

Simply install TEXworks by running the setup file. During the installation, you will be asked where to install the program, if you want to create shortcuts, and if you want to always open .tex files with TEXworks. There are reasonable default values that should work well for most users.

If you want full control over how and where TEXworks is put, you can also download the .zip archive from the website and unpack it wherever you like. Note that in this case, shortcuts and file associations must be created manually.

When you start TEXworks for the first time, it creates a folder named TeXworks in your home folder1. This folder will contain some sub-folders for auto-completion, configuration, dictionaries, templates, and interface translation/localisation files—we will see these in more detail later.2

NB. At the time of writing, if <your name> contains any non-ASCII characters (for example accented characters), some functions of TEXworks may not work correctly. For example, the spell-checker and forward/reverse synchronization between the source and .pdf will be impaired.

2.2 Under Linux

Several common Linux distributions already have packages for TEXworks. They are adequate for most users and facilitate installing TEXworks considerably.

If your Linux distribution does not provide recent, adequate packages, you need to build TEXworks from source yourself, which is fairly easy on Linux. After the installation of the TEX distribution, go to http://code.google.com/p/texworks/wiki/Building and follow the instructions suitable for your Linux distributions. Also see section C .

Once the program is installed, start TEXworks. The folders .TeXworks and .config/TUG will be created in your home directory.

2.3 Under Mac OS X

MacTeX 2010 already contains TEXworks as a package. So, the preferred way of installing TEXworks on the Mac is to use the package manager of your distribution. In this case, you can skip the next few paragraphs. Be sure to read the end of this section, though, as it provides important information about customizing TEXworks to your needs.

If you want to obtain an “official” version, obtain TEXworks by downloading the archive from the TEXworks web site htp://tug.org/texworks/ after the installation of the TEX distribution.

You need to get TeXworks-Mac-0.3r567.zip3 which contains everything you need.

It is a standalone .app package that does not require any Qt files installed into /Library/Frameworks, or other libraries into /usr/local/lib. Just copy the .app anywhere you like and run it.

On Mac OS X, the TEXworks resource folder will be created in your Library folder (~/Library/.TeXworks/), inside your home directory. Preferences are stored in ~/Library/Preferences/org.tug.TeXworks.plist which you can delete if you ever suspect it is causing problems.

2.4 Ready!

Finally, some files may need to be added to the “personal” files that TEXworks creates. As the exact location of these depends on your platform, this will be referred to as <resources> or the TEXworks resource folder throughout this manual. On Linux, this is ~/.TeXworks, on Windows XP it is C:\Documents and Settings\<your name>\TeXworks, on Windows Vista/7 it is C:\Users\<your name>\TeXworks, and on Mac OS X it is ~/Library/.TeXworks/ by default. The easiest way to locate this folder in recent versions of TEXworks is to use the HelpSettings and Resources… menu item. It opens a dialog which shows you where TEXworks saves its settings and where it looks for resources.

After installation and first run, have a look in the sub-folders of the TEXworks resource folder and delete any qt_temp.xxxx files; they are temporary files left behind and could interfere with the normal ones, which are installed in the same folder, later on.