package provide stead 2.0

# fichier accents7bitsLatex2Iso.tcl
# 
# maj par 
#   04/12/2007 (diam) : transformation en filtre sans effet de bord
#   15/12/2000 (diam) : 
#       - correction de regsub pour utiliser ***= dans les 
#         pour stead83 (i.e expression literale dans regsub)
#       - coor bug dans les min circ (transformé en Maj circ) 
#   06/05/1996 (diam)
# 
# procédure permettant de transformer les caracteres 7 bits Latex 
# en 8bits ISO. 


# Version filtre 
proc accents7bitsLatex2Iso {text} {
   set {tex2iso(\'e)}     é
   set {tex2iso(\'{e})}   é
   set {tex2iso(\`e)}     è
   set {tex2iso(\`{e})}   è
   set {tex2iso(\^e)}     ê
   set {tex2iso(\^{e})}   ê
   set {tex2iso(\"e)}     ë
   set {tex2iso(\"{e})}   ë
   set {tex2iso(\`a)}     à
   set {tex2iso(\`{a})}   à
   set {tex2iso(\^a)}     â
   set {tex2iso(\^{a})}   â
   set {tex2iso(\^\i)}    î
   set {tex2iso(\^{\i})}  î
   set {tex2iso(\"\i)}    ï
   set {tex2iso(\"{\i})}  ï
   set {tex2iso(\`u)}     ù
   set {tex2iso(\`{u})}   ù
   set {tex2iso(\^u)}     û
   set {tex2iso(\^{u})}   û
   set {tex2iso(\^o)}     ô
   set {tex2iso(\^{o})}   ô
   set {tex2iso(\cc)}     ç
   set {tex2iso(\c{c})}   ç
   set {tex2iso(\'E)}     É
   set {tex2iso(\'{E})}   É
   set {tex2iso(\`E)}     È
   set {tex2iso(\`{E})}   È
   set {tex2iso(\^E)}     Ê
   set {tex2iso(\^{E})}   Ê
   set {tex2iso(\"E)}     Ë
   set {tex2iso(\"{E})}   Ë
   set {tex2iso(\`A)}     À
   set {tex2iso(\`{A})}   À
   set {tex2iso(\^A)}     Â
   set {tex2iso(\^{A})}   Â
   set {tex2iso(\^\I)}    Î
   set {tex2iso(\^{\I})}  Î
   set {tex2iso(\"\I)}    Ï
   set {tex2iso(\"{\I})}  Ï
   set {tex2iso(\`U)}     Ù
   set {tex2iso(\`{U})}   Ù
   set {tex2iso(\^U)}     Û
   set {tex2iso(\^{U})}   Û
   set {tex2iso(\^O)}     Ô
   set {tex2iso(\^{O})}   Ô
   set {tex2iso(\cC)}     Ç
   set {tex2iso(\c{C})}   Ç


   foreach TexString [array names tex2iso] {
   
       # Utilise le remplacement literal dees nouvelles regexp (>= tcl8.1) 
       regsub -all -- "***=$TexString" $text $tex2iso($TexString) text
   }
   return $text
}

return
########################################################################
########################################################################
########################################################################
