[OS X TeX] Carbon Emacs settings.
Andrea Riciputi
ariciputi at pito.com
Mon Apr 26 16:14:42 EDT 2004
Hi,
I was looking at the Carbon Emacs settings for the "View" commands (in
the file site-start.el) when I realized that it would be improved by
replacing the actual viewing script:
(concat "dvipdf " tex-file ".dvi " tex-file ".pdf ; "
pdf-previewer-program " " tex-file ".pdf"))
with a smarter:
(concat " if[ " tex-file ".pdf -ot " tex-file ".dvi ]; then dvipdf "
tex-file ".dvi " tex-file ".pdf ; "
pdf-previewer-program " " tex-file ".pdf; else "
pdf-previewer-program " " tex-file ".pdf "))
the resulting shell script would be:
if [file.pdf -ot file.dvi]; then dvipdf file.dvi file.pdf; open -a
'Preview' file.pdf; else open -a 'Preview' file.pdf; fi
In this way dvipdf is only called when necessary making viewing files
quicker when possible. Now when I try the script from the shell it
works perfectly but when I try it from within emacs I get the following
error message:
/bin/sh: -c: line 1: syntax error near unexpected token `then'
/bin/sh: -c: line 1: ` if[ prova.pdf -ot prova.dvi ]; then dvipdf
prova.dvi pro\va.pdf ; open -a 'Preview' prova.pdf; else open -a
'Preview' prova.pdf 'View exited abnormally with code 2 at Mon Apr 26
22:10:38
I can imagine there is somthing wrong in quoting and I've tried many
different variants without success (well I'm not so good at shell
programming!). Anyone can help me?
Thanks in advance,
Andrea.
-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.
More information about the MacOSX-TeX
mailing list