Module: RTeX::Helpers
- Defined in:
- lib/rtex/helpers.rb
Instance Method Summary collapse
- #latex_escape(*args) ⇒ Object (also: #l)
- #latex_simple_format(*args) ⇒ Object (also: #sf)
Instance Method Details
#latex_escape(*args) ⇒ Object Also known as: l
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/rtex/helpers.rb', line 3 def latex_escape(*args) # Since Rails' I18n implementation aliases l() to localize(), LaTeX # escaping should only be done if RTeX is doing the rendering. # Otherwise, control should be be passed to localize(). if Thread.current[:_rendering_rtex] RTeX::Document.escape(*args) else localize(*args) end end |
#latex_simple_format(*args) ⇒ Object Also known as: sf
14 15 16 |
# File 'lib/rtex/helpers.rb', line 14 def latex_simple_format(*args) RTeX::Document.simple_format(*args) end |