Class | Kramdown::Converter::Latex |
In: |
lib/kramdown/converter/latex.rb
|
Parent: | Base |
Converts an element tree to LaTeX.
This converter uses ideas from other Markdown-to-LaTeX converters like Pandoc and Maruku.
You can customize this converter by sub-classing it and overriding the convert_NAME methods. Each such method takes the following parameters:
The return value of such a method has to be a string containing the element el formatted correctly as LaTeX markup.
TYPOGRAPHIC_SYMS | = | { :mdash => '---', :ndash => '--', :hellip => '\ldots{}', :laquo_space => '\guillemotleft{}~', :raquo_space => '~\guillemotright{}', :laquo => '\guillemotleft{}', :raquo => '\guillemotright{}' |
ESCAPE_MAP | = | { "^" => "\\^{}", "\\" => "\\textbackslash{}", "~" => "\\ensuremath{\\sim}", "|" => "\\textbar{}", "<" => "\\textless{}", ">" => "\\textgreater{}" |
Wrap the text inside a LaTeX environment of type type. The element el is passed on to the method attribute_list — the resulting string is appended to both the \begin and the \end lines of the LaTeX environment for easier post-processing of LaTeX environments.