Skip to content

Instantly share code, notes, and snippets.

@weakish
Created July 27, 2010 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weakish/492511 to your computer and use it in GitHub Desktop.
Save weakish/492511 to your computer and use it in GitHub Desktop.
sandbox

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:

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

% Document title % Document author % Document date


in repo image

test


test this

sandbox

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

test(https://gist.github.com/images/modules/header/logo_gist.png =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

html

* 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

js

<script src="http://gist.github.com/509851.js?file=python_code_style.rst"></script>

GFM test:

Roses are red Violets are blue

perform_complicated_task

http://github.github.com/github-flavored-markdown/preview.html

Main heading

This is some nice restructured text.

  • bullets
  • some bullets

python

print "a bit of code" if x > 0: max(1,2,3)

Some heading

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

Random picture for your joy:

image

@weakish
Copy link
Author

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