#!/bin/sh
sed '/A\\hfil/,/\\IeC {\\cyra }\\hfil/{
/\\IeC {\\cyra }\\hfil/b
H
d
}
/\\end{theindex}/{
s/\\end{theindex}/\\indexspace/
G
$a\
\\end{theindex}
}'
