TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used the (awesome) chemstyle bundle to write several theses on my old PC (with MiKTeX), and would like to continue using it with my new mac (OSX). I think I've managed to install it okay at the command line using sudo tlmgr install chemstyle, but I'm unsure about where to proceed from there - I've read about needing to enable write18 (I tried pdflatex --enable-write18, but wasn't sure about what to do next). Any help would be much appreciated! When I try to compile previous projects (using texmaker), the numbers appear in order in the text, but the graphics still have the temporary numbers (TMP1, TMP2 etc). Thanks in advance!

share|improve this question
What LaTeX distribution are you using? MacTeX? TeXlive? 2009? 2010? Does compiling multiple times help? – frabjous Sep 18 '10 at 2:52
Could you post an example TeX file somewhere? Also, which editor do you use, or are you using the Terminal to run pdfLaTeX? – Joseph Wright Sep 18 '10 at 6:00
Thanks for the responses - I'm using MacTeX 2010, I've tried compiling multiple times (from texmaker, have also tried TeXShop) but no joy. I've pasted my main file here: pastie.org/1166589 - with auto-pst-pdf included (after some googling), it fails with the error "shell-escape" or "write18" is not enabled. – Sonia Sep 18 '10 at 14:20
This is not a good example. It is far too long. – TH. Sep 18 '10 at 16:47
up vote 1 down vote accepted

The command line argument you want to pass is -shell-escape to enable \write18.

share|improve this answer
Thanks for the answer - I've given that a shot, but no joy I'm afraid. – Sonia Sep 18 '10 at 14:21
@Sonia: I think you're misusing it. When I (try to) compile your example without -shell-escape, I get an error that it is needed. When I compile it as pdflatex -shell-escape foo, then it gets much farther before failing with a mysterious hyperref error that I didn't try to diagnose. – TH. Sep 18 '10 at 16:48
Thanks for the help, I think I was trying to enable write18 for the wrong file...sorry about the n00b-ness! – Sonia Sep 18 '10 at 21:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.