diff options
Diffstat (limited to 'sandbox/code-block-directive/rst2latex-highlight.py')
-rwxr-xr-x | sandbox/code-block-directive/rst2latex-highlight.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/sandbox/code-block-directive/rst2latex-highlight.py b/sandbox/code-block-directive/rst2latex-highlight.py deleted file mode 100755 index 616ac3ce5..000000000 --- a/sandbox/code-block-directive/rst2latex-highlight.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/python - -# rst2latex-highlight -# =================== -# -# Docutils front-end with syntax highlight. -# -# :Author: David Goodger, a Pygments author|contributor, Guenter Milde -# :Date: $Date: 2008-05-22 08:42:52 +0200 (Do, 22. Mai 2008) $ -# :Copyright: This module has been placed in the public domain. -# -# This is a merge of the docutils_ `rst2latex` front end with an extension -# suggestion taken from the Pygments_ documentation. -# -# :: - -""" -A front end to docutils, producing LaTeX with syntax colouring using pygments - -Generates LaTeX documents from standalone reStructuredText sources. Uses the -`Pygments` syntax highlighter to parse and mark up the content of ``.. -code::` directives. Needs an adapted stylesheet. -""" - -# Requirements -# ------------ -# -# :: - -try: - import locale - locale.setlocale(locale.LC_ALL, '') -except: - pass - -from docutils.core import publish_cmdline, default_description - -# `<pygments_code_block_directive.py>`_ defines and registers a new -# directive `code` that uses the `Pygments`_ syntax highlighter to -# render code in color:: - -import pygments_code_block_directive - -# Call the docutils publisher to render the input as latex:: - -description = __doc__ + default_description -publish_cmdline(writer_name='latex2e', description=description) - - -# .. References: -# .. _docutils: http://docutils.sf.net/ -# .. _pygments: http://pygments.org/ -# .. _Using Pygments in ReST documents: http://pygments.org/docs/rstdirective/ |