[OS X TeX] latexdb & texshop
Herbert Schulz
herbs at wideopenwest.com
Thu Oct 13 15:33:53 CEST 2005
On Oct 13, 2005, at 12:46 AM, Ingo Reich wrote:
> Herb,
> last night I tried (almost: tcsh) exactly what you suggested, and
> it didn't work at all; this morning I retried (bash), and it does
> work on the first run. To be more precise: it does work as long as
> I don't have to save my file before calling latexdb; if I need to
> save changes in the file, texshop still complains the way I
> mentioned in my last mail.
>
> Another question: Since latexdb only generates a dvi-file, not a
> pdf-file, I tried to extend the script as follows:
>
> #!/bin/bash
> latexdb "$1"
> dvipdfm "$1"
>
> But now dvipdfm looks for "example.tex.dvi" instead of
> "example.dvi", and gets stuck.
> Sorry for being so ignorant.
> Ingo
>
> P.S. to Claus: I did try it both ways, i.e. with and without the
> extension .tex, but the problem persisted.
>
Howdy,
The $1 is the full name, with the .tex; e.g., fname.tex. To get the
base name you need to use `basename "$1" .tex` so a simple addition
to get it right is:
#!/bin/bash
basefname=$(basename "$1" .tex)
latexdb "$1"
dvipdfm "${basefname}"
In terms of your other problem... What is the output of latexdb? Does
it change the .tex file?
Good Luck,
Herb Schulz
(herbs at wideopenwest.com)
------------------------- 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 macostex-archives
mailing list