File: latex_literal_block_listings.py

package info (click to toggle)
python-docutils 0.16%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,864 kB
  • sloc: python: 45,783; lisp: 14,475; xml: 1,785; javascript: 1,032; sh: 140; makefile: 111
file content (21 lines) | stat: -rw-r--r-- 692 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Source and destination file names.
test_source = "latex_literal_block.txt"
test_destination = "latex_literal_block_listings.tex"

# Keyword parameters passed to publish_file.
reader_name = "standalone"
parser_name = "rst"
writer_name = "latex"

# Extra setting we need
settings_overrides['literal_block_env'] = 'lstlisting'
settings_overrides['syntax_highlight'] = 'none'
settings_overrides['latex_preamble'] = r"""
% PDF Standard Fonts
\usepackage{mathptmx} % Times
\usepackage[scaled=.90]{helvet}
\usepackage{courier}
% LaTeX syntax highlight with "listings":
\lstloadlanguages{[LaTeX]TeX} %  comma separated list of languages
\newcommand{\DUCLASSlatex}{\lstset{language=[LaTeX]TeX}}
"""