Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/to_latex.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#latex! ⇒ Object
Convert a string to latex without escaping.
-
#latex? ⇒ Boolean
Tells if this is a string converted to latex.
-
#to_latex ⇒ Object
Convert a string to latex with escaping special characters.
Instance Method Details
#latex! ⇒ Object
Convert a string to latex without escaping. Despite the bang, this is NOT destructive, it returns a new object.
66 67 68 |
# File 'lib/to_latex.rb', line 66 def latex! ToLatex::LatexString.new self end |
#latex? ⇒ Boolean
Tells if this is a string converted to latex
71 72 73 |
# File 'lib/to_latex.rb', line 71 def latex? false end |
#to_latex ⇒ Object
Convert a string to latex with escaping special characters.
60 61 62 |
# File 'lib/to_latex.rb', line 60 def to_latex ToLatex::LatexString.new ToLatex.escape(self) end |