[OS X TeX] Creating a glossar

Peter Dyballa Peter_Dyballa at Web.DE
Sat Jan 27 15:24:12 CET 2007


Am 27.01.2007 um 14:41 schrieb Christian Burk:

> Is there a way to combine these runs, mexbe in one engine? Of  
> course not all but one run for the right glossar including LaTeX >  
> BibDeskGlossar > LaTeX > LaTeX.

Yes, of course! You just need to remember that a TeXShop engine only  
accepts one file name. And it's the name of the file TeXShop works on  
right now when you press the button.

So the solution will become inflexible: either the LaTeX file's name  
is constant or that of the glossary file. Let's assume that you are  
mainly working on the LaTeX code and the glossary is kind of side- 
work. You can have both files open at the same time, and when you  
saved the recently changed glossary, you can work on the whole  
document from the LaTeX source. So the engine would be:

	#!/bin/sh
	fname="`basename "$1" .tex`"	# here the LaTeX file's name is given
	latex  "$fname"
	bibtex "<file name>.gls"	# this is the constant name!
	latex  "$fname"
	latex  "$fname"

Instead of latex you can use pdflatex.

And particularly think of changing the text inside the quotes of  
"<file name>.gls" to the real file name. The glossary file should be  
put into the same directory as the LaTeX source.

You can make the script finish faster by evaluating return or status  
codes:

	if [ $? -ne 0 ]; then
	    echo "Fehler (La|Bib)TeX!"
	    exit 1
	fi

or
	status=$?
	if [ $status -ne 0 ]; then
	    echo "Fehler $status bei (La|Bib)TeX!"
	    exit $status
	fi

after each latex or bibtex run.

--
Mit friedvollen Grüßen

   Pete

Heißt 'Wegwerfgesellschaft', dass mensch diese Gesellschaft weg  
werfen *kann* oder *muss*?



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/




More information about the macostex-archives mailing list