Verbatim Environments


Text within a verbatim block appears exactly as type, including whitespace. This is useful when inserting code into a document




A verbatim block takes any text entered and typsets it exactly as it was entered. White space is preserved and the font changes. This is typically done to display code, since the whitespace may preserve readability.

For HTML documents, this is done by opening a "<p ...>" tag with font family "monospace" and font "courier". These are applicable until lazy.verbatim.end is called and the "</p>" tag is placed, closing the verbatim environment.

It should be noted that HTML code in this forced environment will still not render whitespace as in the LaTeX verbatim environment. This can be enforced by running the text in the environment through a function like gsub(" ", "&nbsp ", [text]) (&nbsp is the HTML character for a non-breaking space).


  • lazy.verbatim.end:


Benjamin Nutter

Want to suggest features or report bugs for Use the GitHub issue tracker.

comments powered by Disqus