# 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.

# 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. This is useful to allow syntax coloring for TeX files with non-standard extensions.

  defaults write TeXShop OtherTeXExtensions -array-add "ext"

Where 'ext' is the extension of the file type to be recognized.

Basic Help
Setting Preferences