From: Fredrik Tolf Date: Sun, 26 Nov 2017 20:06:58 +0000 (+0100) Subject: Added latexps. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=b87e5c822ea9c7396b02510f4b4396fa82c29c8b;p=utils.git Added latexps. --- diff --git a/latexps b/latexps new file mode 100755 index 0000000..852b87b --- /dev/null +++ b/latexps @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +inf=- +ouf=- + +dir="$(mktemp -d /tmp/latex.XXXXXX)" +trap 'rm -r "$dir"' EXIT + +cat "$inf" >"$dir/file.tex" + +for pass in 1 2; do + (cd "$dir"; latex file.tex >&2) +done + +(cd "$dir"; dvips file) + +if [ "$ouf" = - ]; then + cat "$dir/file.ps" +else + cat "$dir/file.ps" >"$ouf" +fi