diff options
Diffstat (limited to 'doc/tools')
-rw-r--r-- | doc/tools/latex_filter | 43 | ||||
-rw-r--r-- | doc/tools/show_latex_messages | 8 |
2 files changed, 51 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 diff --git a/doc/tools/show_latex_messages b/doc/tools/show_latex_messages new file mode 100644 index 000000000..87b463806 --- /dev/null +++ b/doc/tools/show_latex_messages @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "$1" == "-no-overfull" ]; then + ../tools/latex_filter `wc -l < $2` no < $2 +else + ../tools/latex_filter `wc -l < $1` yes < $1 +fi + |