File: latex_literal_block_listings.py

package info (click to toggle)
python-docutils 0.19%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,668 kB
  • sloc: python: 45,630; lisp: 14,475; xml: 1,789; javascript: 1,032; sh: 130; makefile: 104
file content (25 lines) | stat: -rw-r--r-- 839 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
22
23
24
25
# 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['stylesheet'] = 'docutils'
settings_overrides['syntax_highlight'] = 'none'
settings_overrides['legacy_column_widths'] = True
settings_overrides['use_latex_citations'] = False

settings_overrides['literal_block_env'] = 'lstlisting'
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}}
"""