| Module | MaRuKu::Out::Latex |
| In: |
lib/maruku.rb
lib/maruku/ext/math/to_latex.rb lib/maruku/output/to_latex.rb |
| Latex_preamble_enc_cjk | = | "\\usepackage[C40]{fontenc} \\usepackage[cjkjis]{ucs} \\usepackage[utf8x]{inputenc}" | ||
| Latex_preamble_enc_utf8 | = | "\\usepackage{ucs} \\usepackage[utf8x]{inputenc}" | ||
| SAFE_CHARS | = | Set.new(('a'..'z').to_a + ('A'..'Z').to_a) | ||
| LATEX_ADD_SLASH | = | %w({ } $ & # _ %) | These are TeX‘s special characters | |
| LATEX_TO_CHARCODE | = | %w(^ ~ > <) | These, we transform to {\tt \char<ascii code>} | |
| OtherGoodies | = | { /(\s)LaTeX/ => '\1\\LaTeX\\xspace ', # XXX not if already \LaTeX } | other things that are good on the eyes |
Attribute: latex_use_listings
Scope: document
Output: latex
Summary: Support for `listings` package.
Related: code_show_spaces, code_background_color, lang, code_lang
If the `latex_use_listings` attribute is specified, then
code block are rendered using the `listings` package.
Otherwise, a standard `verbatim` environment is used.
* If the `lang` attribute for the code block has been specified,
it gets passed to the `listings` package using the `lstset` macro.
The default lang for code blocks is specified through
the `code_lang` attribute.
\lstset{language=ruby}
Please refer to the documentation of the `listings` package for
supported languages.
If a language is not supported, the `listings` package will emit
a warning during the compilation. Just press enter and nothing
wrong will happen.
* If the `code_show_spaces` is specified, than spaces and tabs will
be shown using the macro:
\lstset{showspaces=true,showtabs=true}
* The background color is given by `code_background_color`.