original_string: function _escape_tex($tex)
      {
          $tex = str_replace("\\", "\\\\", $tex);
          $tex = str_replace('#', '\#', $tex);
          $tex = str_replace('$', '\$', $tex);
          $tex = str_replace('%', '\%', $tex);
          $tex = str_replace('^', '\^', $tex);
          $tex = str_replace('&', '\&', $tex);
          $tex = str_replace('_', '\_', $tex);
          $tex = str_replace('{', '\{', $tex);
          $tex = str_replace('}', '\}', $tex);
          return ($tex);
      }
code: function _escape_tex($tex)
      {
          $tex = str_replace("\\", "\\\\", $tex);
          $tex = str_replace('#', '\#', $tex);
          $tex = str_replace('$', '\$', $tex);
          $tex = str_replace('%', '\%', $tex);
          $tex = str_replace('^', '\^', $tex);
          $tex = str_replace('&', '\&', $tex);
          $tex = str_replace('_', '\_', $tex);
          $tex = str_replace('{', '\{', $tex);
          $tex = str_replace('}', '\}', $tex);
          return ($tex);
      }
code_tokens: function _escape_tex ( $ tex ) { $ tex = str_replace ( "\\" , "\\\\" , $ tex ) ; $ tex = str_replace ( '#' , '\#' , $ tex ) ; $ tex = str_replace ( '$' , '\$' , $ tex ) ; $ tex = str_replace ( '%' , '\%' , $ tex ) ; $ tex = str_replace ( '^' , '\^' , $ tex ) ; $ tex = str_replace ( '&' , '\&' , $ tex ) ; $ tex = str_replace ( '_' , '\_' , $ tex ) ; $ tex = str_replace ( '{' , '\{' , $ tex ) ; $ tex = str_replace ( '}' , '\}' , $ tex ) ; return ( $ tex ) ; }
docstring: Returns a string with special TeX characters escaped.
  
  This method is to be used with any method which is exporting TeX, such
  as the bibTex method. A series of string replace operations are
  performed on the input string, and the escaped string is returned.
  
  This code is taken from the Text_Wiki Pear package.
  
  @author Jeremy Cowgar <jeremy@cowgar.com>
  
  @access private
  @param string $txt the TeX string
  @return string the escaped TeX string
docstring_tokens: Returns a string with special TeX characters escaped .