diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-01-18 20:56:21 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-01-18 20:56:21 +0000 |
commit | 85237f65161cb9cd10119197c65c84f65f0262ee (patch) | |
tree | 263ba9669e047ea32cf6734a878d747e26c7f2be /doc/tools/latex_filter | |
parent | 05b31844f683c3bc81b371c94be5cc6f6f4edf61 (diff) |
Backporting from v8.2 to trunk:
- Filtering of doc compilation messages (11793,11795,11796).
- Fixing bug #1925 and cleaning around bug #1894 (11796, 11801).
- Adding some tests.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11802 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'doc/tools/latex_filter')
-rw-r--r-- | doc/tools/latex_filter | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/tools/latex_filter b/doc/tools/latex_filter new file mode 100644 index 000000000..4b6e1a869 --- /dev/null +++ b/doc/tools/latex_filter @@ -0,0 +1,43 @@ +#!/bin/sh + +# First argument is the number of lines to treat +# Second argument is optional and, if it is "no", overfull are not displayed + +i=$1 +nooverfull=$2 +error=0 +verbose=0 +chapter="" +file="" +while : ; do + read -r line; + case $line in + "! "*) + echo $line $file; + error=1 + verbose=1 + ;; + "LaTeX Font Info"*|"LaTeX Info"*|"Underfull "*) + verbose=0 + ;; + "Overfull "*) + verbose=0 + if [ "$nooverfull" != "no" ]; then echo $line $file; fi + ;; + "LaTeX "*) + verbose=0 + echo $line $chapter + ;; + "["*|"Chapter "*) + verbose=0 + ;; + "(./"*) + file="(file `echo $line | cut -b 4- | cut -d' ' -f 1`)" + verbose=0 + ;; + *) + if [ $verbose == 1 ]; then echo $line; fi + esac; + if [ "$i" == "0" ]; then break; else i=`expr $i - 1`; fi; +done +exit $error |