Dolda2000 GitWeb
/
utils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
acmecert: Reorganized a bit.
[utils.git]
/
latexps
1
#!/bin/sh
2
3
set -e
4
5
inf=-
6
ouf=-
7
8
dir="$(mktemp -d /tmp/latex.XXXXXX)"
9
trap 'rm -r "$dir"' EXIT
10
11
cat "$inf" >"$dir/file.tex"
12
13
for pass in 1 2; do
14
(cd "$dir"; latex file.tex >&2)
15
done
16
17
(cd "$dir"; dvips file)
18
19
if [ "$ouf" = - ]; then
20
cat "$dir/file.ps"
21
else
22
cat "$dir/file.ps" >"$ouf"
23
fi