 @$escape_for_tex = ( S ) ->
   ### TAINT should preserve raw text from before replacements ###
   return $ ( event, send ) =>
-    return send event unless select event, '.', 'text'
-    [ type, name, raw_text, meta, ] = event
-    text = raw_text
-    for [ pattern, replacement, ] in @$escape_for_tex._replacements
-      text = text.replace pattern, replacement
-    send [ type, name, text, meta, ]
-
-#-----------------------------------------------------------------------------------------------------------
-@$escape_for_tex._replacements = [
-  [ /// \x01        ///g,  '\x01\x02',              ]
-  [ /// \x5c        ///g,  '\x01\x01',              ]
-  [ ///  \{         ///g,  '\\{',                   ]
-  [ ///  \}         ///g,  '\\}',                   ]
-  [ ///  \$         ///g,  '\\$',                   ]
-  [ ///  \#         ///g,  '\\#',                   ]
-  [ ///  %          ///g,  '\\%',                   ]
-  [ ///  _          ///g,  '\\_',                   ]
-  [ ///  \^         ///g,  '\\textasciicircum{}',   ]
-  [ ///  ~          ///g,  '\\textasciitilde{}',    ]
-  [ ///  &          ///g,  '\\&',                   ]
-  [ /// \x01\x01    ///g,  '\\textbackslash{}',     ]
-  [ /// \x01\x02    ///g,  '\x01',                  ]
-  ]
+    return send event unless select event, '.', Σ_glyph_description
+    [ type, name, description, meta, ]  = event
+    { uchr, rsg, }                      = description
+    return send event unless rsg is 'u-latn'
+    switch uchr
+      when '\\' then return send [ 'tex', '\\textbackslash{}',    ]
+      when '{'  then return send [ 'tex', '\\{',                  ]
+      when '}'  then return send [ 'tex', '\\}',                  ]
+      when '$'  then return send [ 'tex', '\\$',                  ]
+      when '#'  then return send [ 'tex', '\\#',                  ]
+      when '%'  then return send [ 'tex', '\\%',                  ]
+      when '_'  then return send [ 'tex', '\\_',                  ]
+      when '^'  then return send [ 'tex', '\\textasciicircum{}',  ]
+      when '~'  then return send [ 'tex', '\\textasciitilde{}',   ]
+      when '&'  then return send [ 'tex', '\\&',                  ]
+    return send event
 
 #-----------------------------------------------------------------------------------------------------------
 @$format_cjk = ( S ) ->

        send [ '.', 'text', glyph, meta, ]
    return null


#===========================================================================================================
#

is_stamped                = MD_READER.is_stamped.bind  MD_READER
#...........................................................................................................
MKNCR                     = require '../../mingkwai-ncr'
Σ_glyph_description       = Symbol 'glyph-description'


#===========================================================================================================
