2 Installation

[next] [prev] [prev-tail] [tail] [up]

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 ( https://tug.org/texlive/), a combination of teTeX, MacTeX and XEmTeX, is available for all three operating systems (Linux, macOS, Windows).

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. Alternatively, you can also download and install TeX Live directly from https://tug.org/texlive/.

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

For Windows: a very popular distribution is MiKTeX ( https://miktex.org/). MikTeX has an update programme, which has also been ported to Linux.

For details on portable usage, and changing local configuration locations, please see the section Portable Usage & Changing the Configuration – section 5.7 (on page 51 ).

### 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 https://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 C:\Users\<your name>\AppData\Roaming\TUG\TeXworks. 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.1

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 https://github.com/TeXworks/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 .local/share/TUG/TeXworks and .config/TUG will be created in your home directory.

### 2.3 Under macOS

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

It comes as 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 macOS, the TEXworks resource folder will be created in your Library folder (~/Library/Application Support/TUG/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 Windows, this is C:\Users\<your name>\AppData\Roaming\TUG\TeXworks, on Linux it is .local/share/TUG/TeXworks, and on macOS it is ~/Library/Application Support/TUG/TeXworks by default. The easiest way to locate this folder in recent versions of TEXworks is to use the Help→Settings 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.

[next] [prev] [prev-tail] [front] [up]