Dolda2000 GitWeb
/
utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c3fcb10
)
Added latexps.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 26 Nov 2017 20:06:58 +0000
(21:06 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 26 Nov 2017 20:06:58 +0000
(21:06 +0100)
latexps
[new file with mode: 0755]
patch
|
blob
diff --git a/latexps
b/latexps
new file mode 100755
(executable)
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