« February 2008 | Main | May 2008 »

March 20, 2008


One of those days...

Wikipedia entry for Thomas Crapper.

Seattle, WA

March 19, 2008

The Bottom Side of a Sidewalk

I have another LaTeX entry all typed up, but figured I better keep my postings mildly entertaining so people don't give up on me. You probably have never noticed this, but every once in a while you will walk over little bits of glass (often purple in color) embedded in a sidewalk of a big city. I've seen this in San Francisco and Seattle. This picture is taken standing in an underground tunnel underneath the sidewalk, looking up. The plants are growing out of the sidewalk and UNDER the sidewalk...

Under a Sidewalk somewhere in Seattle, WA

March 12, 2008

Writing a Thesis

Over the past couple of weeks I've started putting together my thesis. I have various things I've written throughout my graduate career (journal articles, presentations, posters, etc) that will be included, so I need not write everything from scratch. I'd estimate about 1/3 of it is already written.

I decided that I was going to use LaTeX to format my thesis. Not many chemistry people use LaTeX - they seem to be entrenched in Microsoft land using Word. Support in LaTeX for chemistry is there, though it may take some work to get everything just right.

There are two areas I had particular trouble with: figures and citations. I'll describe how I resolved these issues.

I wanted crisp, clean figures for my thesis. More than half of the figures I see in presentations and papers are ugly, rasterized, blurry or jagged. Pretty figures means I need to preserve the vector data, rather than pixel data.

Using Ball & Stick to generate 3D structures from PDB files is great. Copying and pasting into ChemDraw allows me to add arrows, bond distances, angles, and so forth and also preserves vector data for the ball and stick drawing.

I can then copy and paste this figure to Adobe Illustrator and save it as an *.eps file without further modification. Be sure to set Preview: Format to "None" when prompted with an EPS Options box. ChemDraw will save your figure as an *.eps file, but for whatever reason this is file can't be opened or converted by anything I've tried (and I tried a lot).

I want to output my LaTeX as a *.pdf document, so I can't use the *.eps images directly. There are two utilities for Macs that I've found can convert an *.eps file to a *.pdf file (the required format for vector images). epstopdf produced an image with poor preservation of color. All my grayscale items turned to black. I went with the Mac native utility pstopdf, which produces brilliant results.

In order to add "chemistry style" references (yea, us chemists apparently vary from the rest of the world when it comes to citations) I used the package achemso.

The default behavior for LaTeX is to stick all your references in one place. A good practice, but for a thesis I needed a separate list of references at the end of every chapter. The package chapterbib takes care of this.

Unfortunately, I spent a good two days attempting to get these two packages to play nice together. Ultimately I emailed one of the authors, and current maintainer of achemso, Joseph Wright, mentioning the incompatibility. He had a workaround to me in less than a half hour, followed by a patched version of the package not even ten minutes later. Thank you Joseph!

The hack involved saving the original \bibliographystyle before loading the package, and restoring it after:

\let\orgbibliographystyle\bibliographystyle % add this line
\let\bibliographystyle\orgbibliographystyle % and this line

Which worked just great. The patched version he sent me eliminated the need for this hack.