1 % Stylesheet for pygments enhanced reStructured Text
2 % ==================================================
4 % :Author: Günter Milde
5 % :Contact: milde@users.berlios.de
6 % :Revision: $Revision: 5534 $
7 % :Date: $Date: 2005-06-28$
8 % :Copyright: © 2007, 2009 G. Milde,
9 % Released without warranties or conditions of any kind
10 % under the terms of the Apache License, Version 2.0
11 % http://www.apache.org/licenses/LICENSE-2.0
13 % This example style sheet provides syntax highlight for documents generated
14 % with the `rst2latex-highlight` pygments-enhanced Docutils front end.
17 % Separate paragraphs by vertical space
18 % -------------------------------------
20 % This is not required for syntax highlight, but usually a good idea for
21 % documents with lots of source code.
26 % Highlight code blocks
27 % ---------------------
29 % Pygments_ has an option to generate stylesheets for HTML and LaTeX.
30 % However, the "kryptic" codes used for HTML and LaTeX differ, so that
31 % the output of the command
32 % `pygmentize -S default -f latex -O commandprefix=docutilsrole`
33 % fails to work with rst2latex-highlight.
39 % Standard Postscript fonts
40 \usepackage[sc
]{mathpazo
}
41 \RequirePackage[scaled=
.95]{helvet
} % scaled to fit Palatino
43 % Courier monotype fonts with bold and italic variants
44 % \usepackage{courier}
46 \renewcommand{\ttdefault}{txtt
}
49 \newcommand\DUrolek[1]{\textbf{\textbf{#1}}}
51 \newcommand\DUrolenf[1]{\textcolor[rgb
]{0.00,
0.25,
0.82}{#1}}
53 % \newcommand\DUrolep[1]{\textcolor[rgb]{0.72,0.53,0.04}{#1}}
55 \newcommand\DUroles[1]{\textcolor[rgb
]{0.40,
0.40,
0.40}{\textit{#1}}}
57 % \newcommand\DUrolemf[1]{\textcolor[rgb]{0.00,0.53,0.00}{#1}}
59 \newcommand\DUrolear[1]{\textcolor[rgb
]{0.72,
0.53,
0.04}{#1}}
63 % All STANDARD_TYPES below may appear in the output. (But only the ones
64 % you like to style need to be defined :-)
75 % Keyword.Constant: 'kc',
76 % Keyword.Declaration: 'kd',
77 % Keyword.Pseudo: 'kp',
78 % Keyword.Reserved: 'kr',
82 % Name.Attribute: 'na',
84 % Name.Builtin.Pseudo: 'bp',
86 % Name.Constant: 'no',
87 % Name.Decorator: 'nd',
89 % Name.Exception: 'ne',
90 % Name.Function: 'nf',
91 % Name.Property: 'py',
93 % Name.Namespace: 'nn',
96 % Name.Variable: 'nv',
97 % Name.Variable.Class: 'vc',
98 % Name.Variable.Global: 'vg',
99 % Name.Variable.Instance: 'vi',
102 % Literal.Date: 'ld',
105 % String.Backtick: 'sb',
108 % String.Double: 's2',
109 % String.Escape: 'se',
110 % String.Heredoc: 'sh',
111 % String.Interpol: 'si',
112 % String.Other: 'sx',
113 % String.Regex: 'sr',
114 % String.Single: 's1',
115 % String.Symbol: 'ss',
118 % Number.Float: 'mf',
120 % Number.Integer: 'mi',
121 % Number.Integer.Long: 'il',
125 % Operator.Word: 'ow',
130 % Comment.Multiline: 'cm',
131 % Comment.Preproc: 'cp',
132 % Comment.Single: 'c1',
133 % Comment.Special: 'cs',
136 % Generic.Deleted: 'gd',
137 % Generic.Emph: 'ge',
138 % Generic.Error: 'gr',
139 % Generic.Heading: 'gh',
140 % Generic.Inserted: 'gi',
141 % Generic.Output: 'go',
142 % Generic.Prompt: 'gp',
143 % Generic.Strong: 'gs',
144 % Generic.Subheading: 'gu',
145 % Generic.Traceback: 'gt',