Archive for the ‘latex’ Category

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…

h1

How to install Biblatex

7 August 2007

Biblatex is a bibtex style package for Humanities and Social Science style footnotes and/or bibliography. Since most default bibtex styles are for math and science or psychology, those of us MLA users are out in the cold. I have so far used Biblatex for philosophy apers using Chicago styling, but I’m sure it can do more than that. I’m in the process of developing a setup for MLA. In the meantime, here’s how to install the Biblatex package.

Get the biblatex package here:

www.ctan.org/tex-archive/help/Catalogue/entries/biblatex.html> (You’ll have to click the download link on that page.)

1. Unpack the zip.

2. Inside the expanded folder (biblatex/) rename latex to biblatex.

3. Find out where you local texlive install is located. For the unix users, this is represented in the system by the variable $TEXMFLOCAL. Here are some possibilities to get you stated:

  • Mac: /usr/local/texlive/texmf-local/
  • Linux: /usr/local/share/texmf/
  • Win: c:\localtexmf\

Once you have found this folder’s path, we’re ready to proceed. We’ll be referring to it as texmf/ for short.

4. Copy the folder biblatex/biblatex into texmf/tex/latex/

5. Inside biblatex/bibtex/ you’ll find the biblatex.bst file. Copy it to texmf/bibtex/bst/.

Almost Done!

6. This is the last step. I’m afraid it is Mac/Linux only since I don’t know how to do it on a PC. For this you’ll need a command line and a root or sudo password. I’m going to assume you know or can easily find out about those. What you’re going to do is reload the local TeX database so that it will know about the files we installed. It’s called rehashing. To do it, type at the commandline prom

sudo texhash

That’s it. If that command succeeded you are good to go.