h1

TeXShop Color Highlighting – May we have other colors please?

10 August 2007

TeXShop, the default LaTeX editor that comes with MacTex, has some default color syntax highlighting which did not agree with me for long use. The standard red, green, and blue colors are hard to see against the white background. So, not content to just use it as is or find another program, I scoured the web for information on how it could be altered. It turns out there is a way to.

When syntax coloring turned on in the source window, comments will be colored red, commands will be colored blue, and the symbols $, {, and } will be colored dark green. A few users may wish to change these colors. Each color is determined by setting its red, green, and blue components; these components are real numbers between 0.0 and 1.0.

Suppose we wish to change the color of $, {, and } to bright green, a color with components (r, g, b) = (0.0, 1.0, 0.0). To do so, open the Terminal window and type the following commands

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

The corresponding preference items for comments are commentred, commentgreen, commentblue; the items for commands are commandred, commandgreen, commandblue.

Now if only I could remember what website I got that from…

One comment

  1. Really a very usefull hint!
    Thank you!



Leave a Comment