diff options
Diffstat (limited to 'svgtex.sh')
-rwxr-xr-x | svgtex.sh | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -21,8 +21,7 @@ set -e tmp=$(mktemp -p /tmp) eqn=$(cat /dev/stdin) -echo "---- begin assembly: ----" -printf "%s\n" "$eqn" +printf "[ok] \teqn: %s\n" "$eqn" echo "\\\documentclass[10pt,fleqn]{standalone} \\\usepackage{standalone,amsmath,amssymb,xcolor} @@ -35,18 +34,18 @@ echo "\\\end{document}" >> $tmp # now this is where the fun begins -latex -interaction=batchmode $tmp +latex -interaction=batchmode $tmp > /dev/null -[ -f tmp.dvi ] || { echo "---- [FATAL] tex output failed ----" ; exit 1 ; } # make sure output exists before continuing +[ -f tmp.dvi ] || { printf "%s \tFATAL: tex output failed\n" "[->]" ; exit 1 ; } # make sure output exists before continuing -echo "[ok] tex finished typesetting" +printf "[ok] \ttex finished typesetting\n" -dvisvgm tmp.dvi -f ttf -T S2 +dvisvgm tmp.dvi -f ttf -T S2 > /dev/null 2>&1 -echo "[ok] conversion to svg" +printf "[ok] \tconversion to svg\n" mv tmp.svg $1 # final move to desired path rm tmp.aux tmp.log tmp.dvi $tmp # cleanup -echo "---- build complete: $1 ----" +printf "%s \tbuild complete: %s\n" "[->]" "$1" |