Created
December 23, 2010 13:55
-
-
Save noqqe/753005 to your computer and use it in GitHub Desktop.
Fraise App LaTeX Command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# change to directory | |
cd %%d | |
# create pdf from .tex | |
/usr/texbin/pdflatex --output-directory %%d %%p | |
# get name | |
tex=%%p | |
# cleanup | |
if [ -e ${tex%.tex}.log ]; then | |
rm ${tex%.tex}.log | |
else | |
echo "Error. Trash files not found." | |
fi | |
# open generated file | |
if [ -e ${tex%.tex}.pdf ]; then | |
open ${tex%.tex}.pdf | |
else | |
echo "Error. Can't find generated PDF" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment