From 5aa46e8d12bd92b7d541ddd22fa81a8164deb46f Mon Sep 17 00:00:00 2001 From: milde Date: Wed, 9 May 2012 13:42:58 +0000 Subject: Clean up code-block-directive sandbox project. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7430 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- .../docs/myfunction.py.pseudoxml | 97 ++++++++++++++++++---- 1 file changed, 81 insertions(+), 16 deletions(-) (limited to 'sandbox/code-block-directive/docs/myfunction.py.pseudoxml') diff --git a/sandbox/code-block-directive/docs/myfunction.py.pseudoxml b/sandbox/code-block-directive/docs/myfunction.py.pseudoxml index 04bd2cb05..cf21d2eab 100644 --- a/sandbox/code-block-directive/docs/myfunction.py.pseudoxml +++ b/sandbox/code-block-directive/docs/myfunction.py.pseudoxml @@ -2,22 +2,91 @@ This is a test of the new "code" directive: - Translate this document to HTML with a pygments enhanced frontend, e.g. + Translate this document with a pygments enhanced frontend, e.g. - ../rst2html-highlight.py --stylesheet=../data/pygments-default.css + ../rst2html-highlight.py --stylesheet=../data/pygments-default.css + ../rst2latex-highlight.py --stylesheet=../data/pygments-docutilsroles.sty - ../rst2latex-highlight.py --stylesheet=../data/pygments-docutilsroles.sty + or via the test case in - ../rst2pseudoxml-highlight.py + ../pygments_code_block_directive.py --traceback The example from Docutils TODO list: - - print 'This is Python code.' - for i in range(10): - print i + + + print + + + 'This is Python code.' + + + for + + + i + + + in + + + range + + ( + + 10 + + ): + + + + print + + + i + + Numbered lines: + + + 1 + + # This is Python code, + + + 2 + + # that prints the integers from 0 to 9 + + + 3 + + for + + + i + + + in + + + range + + ( + + 10 + + ): + + + 4 + + + print + + + i Another example: - + 7 @@ -36,23 +105,19 @@ 9 - + """ + 10 - - just a test""" 11 - - - 12 # and now for something completely different - 13 + 12 print -- cgit v1.2.1