Skip to content

Commit 072174f

Browse files
author
Thomas G. Lockhart
committed
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 <refentry> tags. Use on reference.rtf, generated by "make reference.rtf".
1 parent 90f4d0f commit 072174f

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

doc/src/sgml/fixrtf

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,35 @@
55
# M$Word does not care about it.
66
# (c) 2001, Thomas Lockhart, PostgreSQL Inc.
77

8-
flist=$@
8+
flist=""
9+
RPAT=""
10+
for i in $@ ; do
11+
case "$i" in
12+
-r|--refentry)
13+
RPAT='-e s/\\\keepn/\\\keep/g'
14+
;;
15+
-?|--help)
16+
echo "$0 [--refentry] <rtf file> ..."
17+
exit 0
18+
;;
19+
-*)
20+
echo "Command $i not recognized"
21+
$0 --help
22+
exit 1
23+
;;
24+
*)
25+
flist="$flist $i"
26+
esac
27+
done
28+
929
if [ "$flist" = "" ] ; then
1030
flist=*.rtf
1131
fi
1232

1333
for f in $flist ; do
14-
echo -n "Repairing $f..."
34+
echo -n "Repairing '$f' ..."
1535
if [ -r $f ] ; then
16-
(sed 's/{\\stylesheet{\\s1/{\\stylesheet{\\s0 Normal 0;}{\\s1/g' $f > $f.new \
36+
(sed -e 's/{\\stylesheet{\\s1/{\\stylesheet{\\s0 Normal 0;}{\\s1/g' $RPAT $f > $f.new \
1737
&& mv -f $f.new $f \
1838
&& echo " done") || echo " failed"
1939
else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy