From b87e5c822ea9c7396b02510f4b4396fa82c29c8b Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 26 Nov 2017 21:06:58 +0100 Subject: [PATCH] Added latexps. --- latexps | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 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 -- 2.11.0