Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.
escape(str)public
Escape a LaTeX string
# File lib/rdoc/markup/simple_markup/to_latex.rb, line 64
def escape(str)
# $stderr.print "FE: ", str
s = str.
# sub(/\s+$/, '').
gsub(/([_\${}&%#])/, "#{BS}\\1").
gsub(/\\/, BACKSLASH).
gsub(/\^/, HAT).
gsub(/~/, TILDE).
gsub(/</, LESSTHAN).
gsub(/>/, GREATERTHAN).
gsub(/,,/, ",{},").
gsub(/\`/, BACKQUOTE)
# $stderr.print "-> ", s, "\n"
s
end Related methods
- Instance methods
- accept_blank_line
- accept_heading
- accept_list_end
- accept_list_item
- accept_list_start
- accept_paragraph
- accept_rule
- accept_verbatim
- add_tag
- end_accepting
- escape
- init_tags
- l
- start_accepting
- wrap
- Class methods
- l
- new
- Private methods
-
convert_flow -
convert_heading -
convert_special -
convert_string -
list_end_for -
list_item_start -
list_name -
off_tags -
on_tags