From: Thomas G. Lockhart Date: Fri, 20 Apr 2001 15:50:25 +0000 (+0000) Subject: Add option --refentry to change \keepn (keep with next paragraph) to X-Git-Tag: REL7_1_1~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=072174f94160a96a8afa96e81a467f88e799f7de;p=postgresql Add option --refentry to change \keepn (keep with next paragraph) to \keep (keep current paragraph together). This fixes most troubles with reference pages marked up with tags. Use on reference.rtf, generated by "make reference.rtf". --- diff --git a/doc/src/sgml/fixrtf b/doc/src/sgml/fixrtf index a6a701f6db..2c1172408c 100755 --- a/doc/src/sgml/fixrtf +++ b/doc/src/sgml/fixrtf @@ -5,15 +5,35 @@ # M$Word does not care about it. # (c) 2001, Thomas Lockhart, PostgreSQL Inc. -flist=$@ +flist="" +RPAT="" +for i in $@ ; do + case "$i" in + -r|--refentry) + RPAT='-e s/\\\keepn/\\\keep/g' + ;; + -?|--help) + echo "$0 [--refentry] ..." + exit 0 + ;; + -*) + echo "Command $i not recognized" + $0 --help + exit 1 + ;; + *) + flist="$flist $i" + esac +done + if [ "$flist" = "" ] ; then flist=*.rtf fi for f in $flist ; do - echo -n "Repairing $f..." + echo -n "Repairing '$f' ..." if [ -r $f ] ; then - (sed 's/{\\stylesheet{\\s1/{\\stylesheet{\\s0 Normal 0;}{\\s1/g' $f > $f.new \ + (sed -e 's/{\\stylesheet{\\s1/{\\stylesheet{\\s0 Normal 0;}{\\s1/g' $RPAT $f > $f.new \ && mv -f $f.new $f \ && echo " done") || echo " failed" else