Skip to content

Instantly share code, notes, and snippets.

Created July 27, 2010 16:59
What would you like to do?

LaTeX Filter

The AsciiDoc distribution includes a LaTeX filter that translates LaTeX source to PNG image which is automatically inserted into the AsciiDoc output document. Although it can accept any LaTeX source, the primary use is to render mathematical formulae (see the examples below). The filter implements the latex Listing block and Paragraph styles.

This LaTeX paragraph:

$y = \int_0^\infty \gamma^2 \cos(x) dx$

% Document title % Document author % Document date

in repo image


test this


Is it smart?

  1. ``text'' is translated to “text”.

  2. "double-quoted text" becomes “double-quoted text”

  3. 'single-quoted text' becomes ‘single-quoted text’

  4. don't is “don’t.” as well as anything-else’t. (But foo'tbar is just foo'tbar.)

  5. And it's is “it’s,” as well as anything-else’s (except not foo'sbar and the like.)

  6. (tm) becomes ™

  7. (r) becomes ®

  8. (c) becomes ©

  9. 1/4th ? ¼th. Ditto for 1/4 (¼), 1/2 (½), 3/4ths (¾ths), and 3/4 (¾).

  10. ... becomes …

  11. -- becomes —

    • becomes – , but A-B remains A-B.
  12. A^B A^(B+2)

Discount test:

->this is a test<-


test( =20x20)

=hey!= This is a definition list

tag1 : data

a. first item b. second item

aaa bbbb
hello sailor

|aaa|bbbb| |hello|sailor|

  • good
  • bad
  • nice
  • ugly


* emacs:
    The default style (inspired by Emacs 22).
* pastie:
    Style similar to the pastie default style.
* friendly:
    A modern style based on the VIM pyte theme.
* native:
    Pygments version of the "native" vim them


<script src=""></script>

GFM test:

Roses are red Violets are blue


Main heading

This is some nice restructured text.

  • bullets
  • some bullets
print "a bit of code"
if x > 0:

Some heading

Can't say there is a lot of syntax highlighting, yep?

Random picture for your joy:

Copy link

weakish commented Feb 12, 2011

just a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment