Debian Codegraph @

doc/tools/latex_filter

raw symbols SCIP
1 #!/bin/sh
2
3 # First argument is the number of lines to treat
4 # Second argument is optional and, if it is "no", overfull are not displayed
5
6 i=$1
7 nooverfull=$2
8 error=0
9 verbose=0
10 chapter=""
11 file=""
12 while : ; do
13 read -r line;
14 case $line in
15 "! "*)
16 echo $line $file;
17 error=1
18 verbose=1
19 ;;
20 "LaTeX Font Info"*|"LaTeX Info"*|"Underfull "*)
21 verbose=0
22 ;;
23 "Overfull "*)
24 verbose=0
25 if [ "$nooverfull" != "no" ]; then echo $line $file; fi
26 ;;
27 "LaTeX "*)
28 verbose=0
29 echo $line $chapter
30 ;;
31 "["*|"Chapter "*)
32 verbose=0
33 ;;
34 "(./"*)
35 file="(file `echo $line | cut -b 4- | cut -d' ' -f 1`)"
36 verbose=0
37 ;;
38 *)
39 if [ $verbose = 1 ]; then echo $line; fi
40 esac;
41 if [ "$i" = "0" ]; then break; else i=`expr $i - 1`; fi;
42 done
43 exit $error