[OS X TeX] Creating a glossar
herbs at wideopenwest.com
Fri Jan 26 17:42:14 EST 2007
On Jan 26, 2007, at 4:21 PM, Peter Dyballa wrote:
> I just had a TeX file open in TeXShop, having remembered some
> things – there seems to be everything already ready for you! There
> is the Macros menu and in it Claus Gerhardt's Macros, and one of
> those is bibtex!
The file name passed as $1 to the engine file includes the extension,
e.g., fname.tex, since the file you are editing is fname.tex. The
built-in BibTeX command in TeXShop strips the extension and runs
bibtex on the base name (after switching to the directory of the
and then bibtex assumes it's the fname.aux file that is input. This
is NOT the case here.
> Obviously it's not so good to never use TeXShop for editing ...
> And you are editing in TeXShop the file myglossar.gls? Or another
> file for this purpose that has always the extension .gls? This is
> an important item, because in this case this part of Herb's engine
> script from two weeks ago
> "`basename "$1" .tex`"
> must not be used (it would fail, anyway).
Yes, but doing
bfname = "`basename "$1" .tex`"
will do the right thing.
> (And the first part
> bfname=$(dirname "$1")/
> is also not necessary, since TeXShop only passes the file's name
> including its extension to a macro or engine script. The
> directory's name is contained in the environment variable $PWD.) ...
This is true but is harmless (it just returns .) and is left over
from when I didn't realize that the script was executed in the same
directory as the source file.
(herbs at wideopenwest.com)
------------------------- 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 MacOSX-TeX