Setting preferences using the Preferences Menu

Windows and display

Several items can be changed using the Preference menu: the default font for the input window, the default magnification for the output window, and the default position of these windows when they first appear. You can configure the console so it always appears when typesetting, or only appears when there is an error. You can configure the source window so an initial click in the window only activates the window, or this initial click also sets the text insertion point.

Typesetting commands

The preference dialog can also be used to change the commands executed when the "TeX" and "LaTeX" buttons are pushed. This is useful because some users prefer a version of TeX called etex, and there are pdf versions of etex called pdfetex and pdfelatex. Obviously the substituted command must produce a pdf output file. If the new programs are in the teTeX binary directory, it is enough to name them in the preference dialog; the dialog will also accept fully qualified path names for files which live elsewhere.

Text encoding

TeXShop editing is done with Apple's Cocoa editing class, which uses Unicode for internal work. When TeXShop files are written to disk, they are usually converted to 8-bit ascii because TeX expects to receive such a file. There are several ways to do the conversion: Mac OS Roman, Iso Latin 1, Iso Latin 2, and others. A preference item selects the method used. For many users, the choice will make no difference. Some TeX packages allow users to type accented European characters directly on the keyboard; these packages require the Iso Latin conversion. Thanks to Martin Heusse for providing the original code for this preference. The conversion method can also be selected directly from the Open and Save panels.

When TeXShop typesets a source file, it displays the result in the preview window, activating this window and bringing it to the front. A preference setting changes this behavior, showing the result in the preview window but keeping the source window active for further editing. This is particularly useful if you have a large monitor and the source and preview windows do not overlap. To set this preference, choose the Typesetting tab in preferences and change the "After Typesetting" item to "Continue Editing."

Japanese/Korean preferences

Users in Japan and Korea will use other conversion preferences, also provided.

A pulldown menu at the bottom of the Preferences Panel can be used to reset preferences to their default values. This is mainly useful in Japan, since different defaults are available for users of various pTeX distributions.

Invisible character preferences

The item "Show Invisible Characters" in the Source menu makes certain invisible characters visible: the space character, a special wider space used in Japan, the newline character, and the tab character. The choice of which characters to show and how to represent them is made in the "Show Invisible Characters" section of the Preference Panel. Most users want invisible characters to be shown only on rare occasions when puzzling things happen, but if you want them to be shown by default, select the "On by Default" item in this section of the Preference Panel.

The color of invisible character representatives is orange, but this color can be changed by a hidden preference. See the "Hidden Preferences" section of Advanced Help.

Brace matching preferences

TeX makes extensive use of various kinds of braces: parentheses, curly brackets, etc. A common mistake is to write source in which the braces don't match. TeXShop has brace matching code to help avoid this error. The code is configured in the "Parens Targets & Highlight Color" and "Parens Matching Settings" sections of the Preference Panel.

When a brace is typed, this brace and its matching brace flash and temporarily turn color, and the background of the text between them also turns color. This makes it easy to make sure that the scope of the brace pair is correct. As soon as another character is typed, these temporary colors are removed.

Because temporary colors and flashes can be distracting, the user is given fine control over this behavior. First, the types of braces it affects can be selected. Many users, for instance, prefer that it not apply to ordinary parentheses "(, )" because they occur so often. Second, the temporary color of the braces can be modified; by default it is magenta.

The "Highlight Enclosed Characters" item determines whether the background of text between the braces temporarily changes color. The "Show Indicator in Moving" determines whether this code applies when moving the cursor through the source with the arrow keys. The "Blink Highlight" item determines whether the matching brace pair momentarily changes color and then returns to the usual color, or instead changes color until another character is typed. Finally, "Beep for Isolated Parens" and "Flash Back for Isolated Parens" cause the user to be notified when a brace is typed which has no matching brace.

The color of the temporary background for text inside a brace pair (default is yellow) can be changed by a hidden preference. See the "Hidden Preferences" section of Advanced Help.

On Snow Leopard and above, matching braces are briefly marked with a yellow badge over the brace; this fulfills a request for greater visibility of the matching characters. This badge can be turned off; see the "Hidden preferences" section of Advanced Help for details.

Hidden preferences

Although most of the TeXShop's preferences are available from the Preferences menu, some more low-level preferences are only settable using the command line.

Background, Text and Cursor Colors

It is possible to reset the background color of the source window. The preference dialog does not have an interface to make this change. To set the background to (r, g, b) = (.42, .39, .77), issue the following commands in Terminal:

defaults write TeXShop background_R 0.42
defaults write TeXShop background_G 0.39
defaults write TeXShop background_B 0.77

It is also possible to set the text color in the source window. This preference will only be recognized if syntax coloring is on. To set the forground color to (r, g, b) = (.42, .39, .77), issue the following commands in Terminal:

defaults write TeXShop foreground_R 0.42
defaults write TeXShop foreground_G 0.39
defaults write TeXShop foreground_B 0.77

The color of the insertion point in the source window can be changed. For example, to set this insertion point color to (r, g, b) = (.42, .39, .77), issue the following commands in Terminal:

defaults write TeXShop insertionpoint_R 0.42
defaults write TeXShop insertionpoint_G 0.39
defaults write TeXShop insertionpoint_B 0.77

By using the previous three sets of commands in combination, the source window can be made to display white text on a black background or other coloring schemes as desired.

There are hidden preferences to set the transparency of the source, preview, and console windows:

defaults write TeXShop ConsoleWindowAlpha 0.75
defaults write TeXShop SourceWindowAlpha 0.75
defaults write TeXShop PreviewWindowAlpha 0.75

Here an alpha value of 0.00 is completely transparent and an alpha value of 1.00 is completely opaque. Use these commands cautiously!

Adding to the list of file types

There is a hidden preference to add file extensions to the list of files that TeXShop recognizes as source files which can be typeset and syntax colored. This is useful when you want to use syntax coloring when editing TeX files with non-standard extensions. For example,

defaults write TeXShop OtherTeXExtensions -array-add "lbx"

tells TeXShop to syntax color biblatex 'lbx' files.

Basic Help
Setting Preferences