Skip to content

TipsAndTricks

Stefan Löffler edited this page Feb 12, 2021 · 3 revisions

This page documents some helpful features included in the TeXworks sources that are not documented elsewhere.

Magic Comments are documented separately.

Using SyncTeX

SyncTeX by Jérôme Laurens provides a means for synchronization between input (i.e. (La)TeX) and output (i.e. pdf). You need a sufficiently new LaTeX engine to use its benefits (if your engine doesn't support it or its usage has been disabled you will see a note at the bottom of the preview window when you open a pdf). To use the synchronization, Ctrl-Click (Cmd-Click on Mac OS X) anywhere in your source file or the output to navigate to the corresponding place in the other window.

Locating and customizing TeXworks resources

TeXworks comes with a lot of customziable configurations and templates, most notably CodeCompletion, syntax highlighting and sectioning commands. All these are stored in plain text files in sub-directories of the TeXworks' resource directory. Depending on your operating system this directory is located in different (standardized) locations:

OS Path
Windows C:\Users\<username>\AppData\Roaming\TUG\TeXworks
GNU/Linux ~/.local/share/TUG/TeXworks
macOS ~/Library/Application Support/TUG/TeXworks

Up until TeXworks 0.6.5, the following (non-standard) directories were used:

OS Path (until 0.6.5)
Windows C:\Users\<username>\TeXworks\
GNU/Linux ~/.TeXworks/
Mac OS X ~/Library/TeXworks/

Note: These are the standard settings. If you use a non-English version of your operating system or if you have changed the system's configuration the path on your system may differ.

Note: TeXworks automatically creates the resource directory and its sub-directories if they don't exist, and installs a default collection of resources. You can restore these defaults (or update them for a new release) by removing the resource directories and then restarting the program.

To customize the behavior of TeXworks edit the plain text files contained in the sub-directories. Most of those files contain short comments on the purpose of the file and the syntax used.