blob: e63289a102c9e9c22043ee15600bfb993b5ec00b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/csh
# converts from TeX writing to ISO Latin 1 (ISO 8859/1)
if ($#argv < 2) then
echo 'Usage: tex2iso <from-file> <to-file>'
echo 'Reads from <from-file> and writes to <to-file>'
echo 'Substitutes characters in ISO Latin 1 (ISO 8859/1) for'
echo 'the following character sequences in TeX writing'
echo -n \\\`A \\\'A \\^A \\~A \\\"A \{\\AA\} \{\\AE\} \\c C\
echo \\\`E \\\'E \\^E \\\"E \\\`I \\\'I \\^I \\\"I
echo -n \{\\DH\} \\~N \\\`O \\\'O \\^O \\~O \\\"O \{\\O\}\
echo \\\`U \\\'U \\^U \\\"U \\\'Y \{\\TH\}
echo -n \\\`a \\\'a \\^a \\~a \\\"a \{\\aa\} \{\\ae\} \\c c\
echo \\\`e \\\'e \\^e \\\"e \\\`\{\\i\} \\\'\{\\i\} \\^\{\\i\} \\\"\{\\i\}
echo -n \{\\dh\} \\~n \\\`o \\\'o \\^o \\~o \\\"o \{\\o\}\
echo \\\`u \\\'u \\^u \\\"u \\\'y \{\\th\} \{\\ss\}
echo \{\\S\} \\\? \{\\pound\}
echo 'No substitution is done for character sequences that may occur'
echo 'in equations, \\! << >> \pm \cdot.'
exit(1)
endif
awk '{print}' $1 | sed -f /local/bin/textoiso_subst >$2
|