[OS X TeX] Bibdesk choose fields and automate

Maarten Sneep maarten.sneep at xs4all.nl
Thu Apr 28 15:18:17 EDT 2005


On 28 apr 2005, at 19:47, Herb Schulz wrote:

> On 4/28/05 7:22 AM, "Maarten Sneep" <maarten.sneep at xs4all.nl> wrote:
>
>>
>>> This is my engine code
>>> ******************************
>>> #!/bin/sh
>>> bfname=$(dirname "$1")/"`basename "$1" .tex`"
>>
>> Practically all tex-related tools expect to be run from the same
>> directory as the main tex file.
>> bfname=`basename "$1" .tex`
>> pushd `dirname "$1"` # this may be superfluous, as TeXShop probably
>> does it for you already
>>
>
> Howdy,
>
> That snippet came form me. I've noticed that the dirname call seems to 
> be
> superfluous in a TeXShop engine but habits from writing shell scripts 
> and
> especially for Dropscripts creep in all the time. I guess I'd say that 
> it
> also doesn't hurt; except for the few milliseconds it takes to execute.

Not entirely: if this were used in a dropscript, or a 'On my command' 
script, it would hurt.
Since tex (or rather the kpse lib) starts searching for files from the 
current directory, is
matters quite a bit: the original may very well cause errors because 
\include{chapter1} fails,
or because \includegraphics{figures/graph} fails.

Or am I mistaken, and does tex append the relative path to the master 
input file
(silently) to all other relative path searches (and just store the 
log-files elsewhere.
I must admit I never actually tried this: running tex on a master file 
from a different
directory.

Cheers,

Maarten

--------------------- 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 Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list