Class: Latex2Image::Latex
- Inherits:
-
Object
- Object
- Latex2Image::Latex
- Defined in:
- lib/latex2image/latex.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#formule ⇒ Object
readonly
Returns the value of attribute formule.
Instance Method Summary collapse
-
#initialize(formule) ⇒ Latex
constructor
A new instance of Latex.
- #to_tex ⇒ Object
Constructor Details
#initialize(formule) ⇒ Latex
Returns a new instance of Latex.
7 8 9 10 |
# File 'lib/latex2image/latex.rb', line 7 def initialize(formule) @formule = formule @file = write_file end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
5 6 7 |
# File 'lib/latex2image/latex.rb', line 5 def file @file end |
#formule ⇒ Object (readonly)
Returns the value of attribute formule.
5 6 7 |
# File 'lib/latex2image/latex.rb', line 5 def formule @formule end |
Instance Method Details
#to_tex ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/latex2image/latex.rb', line 12 def to_tex %{ \\documentclass[fleqn]{article} \\DeclareMathSizes{20}{20}{20}{20} \\usepackage{amssymb,amsmath,bm} \\usepackage[latin1]{inputenc} \\begin{document} \\thispagestyle{empty} \\begin{equation*} #{@formule} \\end{equation*} \\end{document} } end |