1998-11-24 13:38:49 -04:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# Script to fix general entities that got translated from the LaTeX as empty
|
|
|
|
# elements. Mostly pretty bogus, but works like a charm!
|
1998-11-30 18:30:29 -04:00
|
|
|
#
|
|
|
|
# Removes the leading XML PI that identifies the XML version, since most of
|
|
|
|
# the XML files are not used as top-level documents.
|
1998-11-24 13:38:49 -04:00
|
|
|
|
|
|
|
if [ "$1" ]; then
|
|
|
|
exec <"$1"
|
|
|
|
shift 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" ]; then
|
|
|
|
exec >"$1"
|
|
|
|
shift 1
|
|
|
|
fi
|
|
|
|
|
1999-01-14 17:44:56 -04:00
|
|
|
sed '
|
|
|
|
s|<ABC/>|ABC|g
|
|
|
|
s|<ASCII/>|ASCII|g
|
|
|
|
s|<C/>|C|g
|
|
|
|
s|<Cpp/>|C++|g
|
|
|
|
s|<EOF/>|EOF|g
|
|
|
|
s|<LaTeX/>|LaTeX|g
|
|
|
|
s|<NULL/>|NULL|g
|
|
|
|
s|<POSIX/>|POSIX|g
|
|
|
|
s|<UNIX/>|Unix|g
|
|
|
|
s|<e/>|\\|g
|
1998-11-30 10:36:26 -04:00
|
|
|
s|<geq/>|\≥|g
|
1998-11-25 15:28:02 -04:00
|
|
|
s|<ldots/>|\&hellip|g
|
1998-11-30 10:36:26 -04:00
|
|
|
s|<leq/>|\≤|g
|
1999-01-29 12:29:25 -04:00
|
|
|
s|<version/>|\&version;|g
|
1999-01-14 17:44:56 -04:00
|
|
|
s|<ABC>|ABC|g
|
|
|
|
s|<ASCII>|ASCII|g
|
|
|
|
s|<C>|C|g
|
|
|
|
s|<Cpp>|C++|g
|
|
|
|
s|<EOF>|EOF|g
|
|
|
|
s|<LaTeX>|LaTeX|g
|
|
|
|
s|<NULL>|NULL|g
|
|
|
|
s|<POSIX>|POSIX|g
|
|
|
|
s|<UNIX>|Unix|g
|
|
|
|
s|<e>|\\|g
|
1998-12-10 00:56:00 -04:00
|
|
|
s|<geq>|\≥|g
|
|
|
|
s|<ldots>|\&hellip|g
|
|
|
|
s|<leq>|\≤|g
|
1999-01-29 12:29:25 -04:00
|
|
|
s|<version>|\&version;|g
|
1998-11-24 13:38:49 -04:00
|
|
|
' || exit $?
|