forked from fmarier/user-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlv
More file actions
executable file
·24 lines (19 loc) · 667 Bytes
/
lv
File metadata and controls
executable file
·24 lines (19 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Usage:
# lv work_report03
filename="$(basename "$1" .tex)"
function cleanup {
mv -f "$filename.ps" "$filename.aux" "$filename.bbl" "$filename.blg" "$filename.log" "$filename.dvi" "$filename.lof" "$filename.toc" texput.log /tmp 2> /dev/null
echo "$(untex -a -e -m -o "$filename.tex" | wc -w)" words
}
function terminate {
cleanup
exit 1
}
latex "$filename.tex" || terminate
bibtex "$filename"
latex "$filename.tex" || terminate # Second pass for references and table of contents
latex "$filename.tex" || terminate # Third pass for bibliography
dvipdfm -z 9 -p "$(cat /etc/papersize)" "$filename.dvi"
evince "$filename.pdf" &
cleanup