TeXShop adds lines which begin with the words \section, \subsection, \subsubsection, or \chapter to the Tag menu. To turn this off, run Terminal and type the following command. Change the word NO to YES to turn the behavior back on.

defaults write TeXShop TagSections NO

ConTeXt users may want additional words to be recognized and added to the Tag menu. The following preferences adds the words \subsubsubsection, \subsubsubsubsection, \part, \title, \subject, \subsubject, \subsubsubject, \subsubsubsubject, and \subsubsubsubsubject.

defaults write TeXShop ConTeXtTags YES

When syntax coloring is on, comments are colored red, commands are colored blue, and the symbols $, {, and } are colored dark green. These colors can be changed. A color is determined by the red, green, and blue components of the color; each is a number between 0.00 and 1.00. To change the color of $, {, and } to bright green, issue the following commands in Terminal:

defaults write TeXShop markerred 0.0
defaults write TeXShop markergreen 1.0
defaults write TeXShop markerblue 0.0

To change the comment color, replace "marker" with "comment"; to change the command color, replace "marker" with "command".

The background color of the source window can be changed. For example, to set this 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

Warning: the next two items have not worked since version 2.10. They will be fixed eventually, but probably not in the immediate future.

The text color of the source window can be changed. This change requires that syntax coloring be on. For example, to set this foreground color for text 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.

The background color of the preview window can also be changed. For example, to set this background to (r, g, b) = (.42, .39, .77), issue the following commands in Terminal. Change these numbers to 1 to convert back to a white background. It may be easier to view colored TeX documents with a gray background. The background color will not affect printing.

defaults write TeXShop Pdfbackground_R 0.42
defaults write TeXShop Pdfbackground_G 0.39
defaults write TeXShop Pdfbackground_B 0.77

The transparency of the source, preview, and console windows can be changed. For example,

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. Using these commands cautiously.

TeXShop can be configured to save a backup file whenever it saves or typesets a source file. To turn this on, run Terminal and type the following command. Change YES to NO to turn it off.

defaults write TeXShop KeepBackup YES

Occasionally during typesetting, the .aux files, .log files, and other files created automatically by TeX become corrupted and must be removed. TeXShop has a "Trash AUX Files" menu item and associated button in the console window. When either item is selected, TeXShop moves to the trash all files in the folder containing the source file with the same name as the source name, and extensions .aux, .bbl, .blg, .brf, .glo, .idx, .ilg, .ind, .ioa, .log, .log, .lot, .mtc, .mlf, .out, .pdfsync, and .toc. Other extensions can be added to this list, one by one. For instance, to add .dvi files to this list:

defaults write TeXShop OtherTrashExtensions -array-add "dvi"

To remove all added extensions and return to the original list:

defaults write TeXShop OtherTrashExtensions -array

Sometimes a more extensive cleanup is desirable. If the option key is held down while choosing "Trash AUX Files," TeXShop uses the "% !TEX root = ..." and "Set Project Root" mechanisms to find the root file. It then moves all files in the folder of this file and any subfolders of this folder to the trash if they have appropriate extensions, regardless of the names of the files. This behavior can be made the default behavior for "Trash AUX Files" without using the option key; issue the command

defaults write TeXShop AggressiveTrashAUX YES

TeXShop can be configured to automatically refresh pdf views when the pdf file changes. To do this, once a second it examines the date and time when the pdf was last written to see if this information has changed. The time interval between these checks can be modified. To do this, run Terminal and type the following command. Change 1.00 to the number of seconds desired.

defaults write TeXShop RefreshTime 1.00

Automatic refresh for pdf views is useful if TeXShop is configured to use an external editor, or if a tex file is opened by "Open For Preview...". In these cases, a .tex file is opened, but TeXShop only shows the associated pdf file. TeXShop also allows pdf files to be opened directly; this is useful for a brief glance at illustrations before embedding them in a TeX document. If you want pdf files opened for an external editor to be refreshed automatically, but pdf files opened for a brief glance to be left alone, run Terminal and type the following command. The default value of this preference is YES.

defaults write TeXShop PdfFileRefresh NO

When TeXShop opens a .tex file for an external editor, it checks the dates of the tex and pdf files to make sure that the pdf output is up to date. If this output is not up to date or does not exist at all, TeXShop typesets the .tex file again. To turn off this behavior, run Terminal and type the following command.

defaults write TeXShop ExternalEditorTypesetAtStart NO

There is a hidden preference to set the default size of the matrix in the Matrix Panel:

defaults write TeXShop matrixsize 12

There is a new checkbox tool for the Preview window named "ShowSync." It is not part of the default toolkit for this window. When this item is checked, synchronization spots are show in the Preview document. The item is not shown when a preview window first appears, but this changed be changed via:

defaults write TeXShop ShowSyncMarks YES

When the preview window is updated after typesetting, it comes to the front. This behavior causes trouble for uses with an X11 editor running in Apple's X11 Window Manager. For these users, the behavior can be turned off via:

defaults write TeXShop BringPdfFrontOnAutomaticUpdate NO

TeXShop used to support a different set of source commands to determine the typesetting engine, file encoding, and root file; examples are %&latex, %&encoding= UTF-8 Unicode, %SourceDoc ../Main.tex. This syntax was a poor choice on my part and has been changed. If you have a lot of old documents, you can temporarily turn this choice back on using the command below. If you do so, the new commands will be recognized, but the old commands will also work. This preference change should only be made in an emergency.

defaults write TeXShop UseOldHeadingCommands YES

The left and right arrow keys scroll left and right if the preview page is narrower than the total page width, but otherwise they page up and down. A hidden preference changes this behavior so the left and right arrow keys always page.

defaults write TeXShop LeftRightArrowsAlwaysPage YES

The console text reporting typesetting behavior and errors shows black text. The text can be made to switch to red after the first error with a hidden preference.

defaults write TeXShop RedConsoleAfterError YES

In the editing window, a soft line break occurs after words. This behavior can be changed to "no line break" = 0, "line break after words" = 1, or "line break after characters" = 2.

defaults write TeXShop LineBreakMode 1

When the Preview window first appears, its drawer is hidden. A hidden preference changes this behavior so the drawer is visible when the Preview window first appears.

defaults write TeXShop PreviewDrawerOpen YES

TeXShop now supports SyncTeX. See the synchronization section in Advanced Help for details. If synctex fails, TeXShop falls back on the Search synchronization method. For users who would like to experiment with synctex by itself, there is a hidden preference to turn off this fallback behavior:

defaults write TeXShop SyncTeXOnly YES

TeXShop supports command completion. Type the first portion of a complicated TeX command and push the escape key. The rest of the command will be entered into the source. This command can be quite complicated, with additional parameters; in that case, TeXShop types "marks" where each parameter is be filled in. Menu commands in Completion/Marks jump from mark to mark; these commands have shortcuts listed in the menu.

Since jumping to the next or previous mark is a common operation, TeXShop also allows users to type option-escape to get to the next mark and control-escape to get to the previous mark.

A Preference Panel item allows users to use "tab" instead of "escape" as the key which triggers command completion. In that case, the shortcuts which jump from mark to mark become option-tab and control-tab.

Occasionally, third party utilities make use of option-escape, control-escape, option-tab, and control-tab for other purposes. If TeXShop's use of these shortcuts interferes with these utilities, you can turn off these particular TeXShop shortcuts with a hidden preference:

defaults write TeXShop CommandCompletionAlternateMarkShortcut NO

Until version 2.38 of TeXShop, syntax coloring considered '\@' to be a single command which ended with the @ sign, so lines like

\ifx\@@input\@undefined\let\@@input\input\fi
in style files would only be partly colored. This is fixed in version 2.38. In the unlikely event that you prefer the old method:
defaults write TeXShop MakeatletterEnabled NO

Version 2.38 of TeXShop introduced new parenthesis matching code and the ability to display invisible characters. The new code employs three colors: a temporary color assigned to parenthesis pairs (magenta), a temporary color assigned to the background of the text between these parenthesis pairs (yellow), and the color of invisible characters (orange). The first of these colors can be changed in the Preference Panel. The other two colors are controlled by hidden preference items:

defaults write TeXShop highlightContentRed 1.00
defaults write TeXShop highlightContentGreen 1.00
defaults write TeXShop highlightContentBlue 0.00
defaults write TeXShop invisibleCharRed 1.00
defaults write TeXShop invisibleCharGreen 0.50
defaults write TeXShop invislbleCharBlue 0.00

Version 2.38 also marks matching parentheses with a yellow badge over the parenthesis which flashes briefly and then disappears. This change to increase visibility fulfills a long time request; it requires Snow Leopard or higher. To turn the badge off:

defaults write TeXShop brieflyFlashYellowForMatch NO

There is a significant bug in Tiger, explained in the remaining paragraphs of this page. TeXShop has a workaround for the bug. The bug is fixed in Leopard and the workaround is ignored on that system. The bug is important, so users should upgrade to Leopard if possible.

When TeXShop was first released on Tiger, users ran into an annoying bug which caused the program to gradually slow to a crawl after several typesetting actions. This bug was fixed a couple of days after the release. The problem occurred when a new pdf file was loaded into the PdfKitView in the Preview window. According to Apple documentation, this should have released the previous data structure from memory. The release did occur, but it caused the program slowdown. So the bug fix consisted of tricking the system into believing that the data structures were still being used so the system didn't try to release them.

Later a hidden preference was added to release the data if desired. The values of this preference are

0 to release the data on system 10.4.3 or higher (experiments suggested that the bug was not as severe on 10.4.3)
1 to never release the data
2 to always release the data

The default value is 1, causing the program to use the original workaround.

defaults write TeXShop ReleaseDocumentClasses 1

When TeXShop runs on Leopard, it ignores this preference setting and bypasses the bug fix. Thus memory is correctly released on Leopard.

How do I configure TeXShop?
Hidden Preference Items