[OS X TeX] adjusting TexShop's Bibliography macro

Peter Dyballa Peter_Dyballa at Web.DE
Thu Mar 2 16:48:46 EST 2006


Am 02.03.2006 um 21:46 schrieb Daniel Becker:

> Hallo Peter
>
> thanks for your hint
>
>>> I tried (several hours) to adjust the  Bibliography macro that  
>>> comes with TexShop to my needs. All I want to do is to have two  
>>> more runs than already present in the macro.
>>
>> How about writing an "engine" for this job?
>
> yes, that was one of the ideas I tried, but I am doing something wrong
>
> I "wrote" a file fullrun.engine that looks like this:
>
> #!/bin/tcsh
> # fullrun
> # This script will do ....
>
> #first latex-run
> pdflatex --shell-escape "$1"
> #makeindex
> set path= ($path  /usr/local/bin  /usr/local/teTeX/bin/powerpc- 
> apple-darwin-current)
> makeindex -c -s indexkorr.ist "$1.idx"
>
>
> but when I choose this engine (either with the menu or with %!TEX  
> TS-program = fullrun) and hit typeset, only the first latex  run  
> happens and the console remains just empty  ...
>
> If I include
>
> bibtex "$1"
>
> after the first latex-run, I get an error "I couldn't open file  
> name `Magister_0.4.tex.aux'"
>
>
> permission look ok, right?
>
> -rwxr-x---    1 daniel  staff   337 Mar  2 21:04 fullrun.engine*
> -rwxr-x---    1 daniel  staff   412 Mar  2 15:15 ps4pdf_Bilder.engine*
>
> hope you have any idea what I am doing wrong here????????
>

The 'set path' statement comes first, before any command is executed.  
A bit of optimisation can be to make it independent from the  
processor used in the Mac:

	set path = ($path  /usr/local/bin  /usr/local/teTeX/bin/`uname -p`- 
apple-darwin-current)

pdflatex needs no '--shell-escape' accept is runs itself some  
external command or script.

Invoke in Terminal 'chmod 755 fullrun.engine' (and for  
ps4pdf_Bilder.engine too).



The problem is probably that the script receives the full file name.  
It might work with:

	makeindex -c -s indexkorr.ist `basename "$1" tex`idx

'`basename "$1" tex`' converts the full path name with the file  
name's extension to the full path name without the extension "tex"  
but with the dot ".", so you just need to add "idx" for the full  
index name.

Isn't it better to leave away the ".idx" extension? If so use this:

		makeindex -c -s indexkorr.ist `basename "$1" .tex`

I think bibtex waits for a file name without extension, i.e.  
`basename "$1" .tex`. And since it's now more than once that basename  
is being used, it's worth to write:

		set fbName = `basename "$1" .tex`

and then use "$fbName" instead of `basename "$1" .tex` and "$ 
{fbName}.idx" instead of `basename "$1" tex`idx.


And the first, commented makeindex, needs an argument like pdflatex,  
i.e. "$1".

--
Mit friedvollen Grüßen

   Pete

Patriotismus ist die Überzeugung, dass unser Vaterland allen anderen  
Ländern überlegen ist, weil wir darin geboren wurden.    (George  
Bernard Shaw)


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list