-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimlatex
More file actions
21 lines (18 loc) · 740 Bytes
/
Copy pathvimlatex
File metadata and controls
21 lines (18 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#
# $Platon: vimconfig/vim/vimlatex,v 1.2 2003-11-03 08:20:21 rajo Exp $
#
# remove a few problems with the output of the latex compiler.
# 1. sometimes the compiler splits a single linenumber into multiple lines.
# therefore join lines when the first ends in '\d\+' and the second starts
# with the same
# 2. sometimes there are more than 2 closing or opening brackets in the
# same line. vim's 'efm' cannot handle the case where multiple files
# have to be popped in the same line. therefore if a line has more than
# 1 ( or), push them to the next line.
latex '\nonstopmode' "\\input\{$*\}" | \
sed -e '/[0-9]\+$/{N;s/\n\([0-9]\+\)/\1/;}' | \
sed -e 's/(/\
(/g' | \
sed -e 's/)/)\
/g'