Skip to content
Snippets Groups Projects
Commit 54329ac4 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart
Browse files

Utility to add the stylesheet "s0" definition to an RTF file.

 This stylesheet must be present for Applixware to be happy generating
 a ToC. M$Word does not seem to care one way or the other.
parent c6cbf569
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
# fixrtf
# Repair (slightly) damaged RTF generated by jade
# Applixware wants the s0 stylesheet defined, whereas
# M$Word does not care about it.
# (c) 2001, Thomas Lockhart, PostgreSQL Inc.
flist=$@
if [ "$flist" = "" ] ; then
flist=*.rtf
fi
for f in $flist ; do
echo -n "Repairing $f..."
if [ -r $f ] ; then
(sed 's/{\\stylesheet{\\s1/{\\stylesheet{\\s0 Normal 0;}{\\s1/g' $f > $f.new \
&& mv -f $f.new $f \
&& echo " done") || echo " failed"
else
echo " file not found"
fi
done
exit
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment