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'm very new to Latex so apologies if this is a newbie question. However I have looked around online and can't find an answer.

I'm trying to compile my file in TeXShop (on mac) using the following but I'm not sure how to go about it (using the 'Typeset' button alone is not sufficient). Please can someone help me out?


When I tried compiling the document with the script provided it got stuck. Here is a screenshot of what I see:

enter image description here

share|improve this question
Use latexmk. It's in the disabled engines folder by default, but can be enabled easily. See this related question for how to do that. I think it will automatically figure out when you need to run makeglossaries or any other tool, but it can definitely be configured to do so. – Mike Renfro Jan 31 '12 at 22:56
Re latexmk and glossaries: tex.stackexchange.com/questions/1226/… – lockstep Jan 31 '12 at 23:10
up vote 5 down vote accepted

You create a file with

bfname=$(dirname "$1")/"`basename "$1" .tex`"  
pdflatex --shell-escape "$1"
makeindex -s "$bfname".ist -t "$bfname".glg -o "$bfname".gls "$bfname".glo 
pdflatex --shell-escape "$1" 
pdflatex --shell-escape "$1" 

You save this file with a name like glossaries.engine inside

You need also to make excutable the script :

Go to the terminal : cd ~/Library/TeXShop/Engines and then chmod u+x glossaries.engine use the name of your engine.

Then you can compile with the engine glossaries . Before to click on the compilation button, you need to chice the engine inside the list near the button "typeset", I suppose because in french, i have a "composition" button.

share|improve this answer
Hi thanks for your help. However when I try to compile the document it gets stuck. I have added a screenshot to my question. Any ideas what's going wrong? – The Crazy Chimp Feb 1 '12 at 10:31
Go to the terminal : cd ~/Library/TeXShop/Engines and then chmod u+x glossaries.engine use the name of your engine. I don't know if the encoding of the engine is important. I always use utf8. – Alain Matthes Feb 1 '12 at 10:54
You can also compile manually. Perhaps you have a problem with the file .ist if you use a specific file. You need to adapt the line makeindex -s "$bfname".ist -t "$bfname".glg -o "$bfname".gls "$bfname".glo . – Alain Matthes Feb 1 '12 at 10:57

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.