1 | %%
|
---|
2 | %% This is file `listings-python.prf',
|
---|
3 | %% generated with the docstrip utility.
|
---|
4 | %%
|
---|
5 | %% The original source files were:
|
---|
6 | %%
|
---|
7 | %% lstdrvrs.dtx (with options: `python-prf')
|
---|
8 | %%
|
---|
9 | %% The listings package is copyright 1996--2004 Carsten Heinz, and
|
---|
10 | %% continued maintenance on the package is copyright 2006--2007 Brooks
|
---|
11 | %% Moses. From 2013 on the maintenance is done by Jobst Hoffmann.
|
---|
12 | %% The drivers are copyright 1997/1998/1999/2000/2001/2002/2003/2004/2006/
|
---|
13 | %% 2007/2013 any individual author listed in this file.
|
---|
14 | %%
|
---|
15 | %% This file is distributed under the terms of the LaTeX Project Public
|
---|
16 | %% License from CTAN archives in directory macros/latex/base/lppl.txt.
|
---|
17 | %% Either version 1.3 or, at your option, any later version.
|
---|
18 | %%
|
---|
19 | %% This file is completely free and comes without any warranty.
|
---|
20 | %%
|
---|
21 | %% Send comments and ideas on the package, error reports and additional
|
---|
22 | %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>.
|
---|
23 | %%
|
---|
24 | \ProvidesFile{listings-python.prf}
|
---|
25 | [2015/06/04 1.6 listings language file]
|
---|
26 | \usepackage{xcolor}
|
---|
27 | \usepackage{textcomp}
|
---|
28 |
|
---|
29 | %% Actual colors from idlelib/config-highlight.def --> corrected to ``web-safe''
|
---|
30 | %% strings = #00aa00 / 0,170,0 (a darker green)
|
---|
31 | %% builtins = #900090 / 144,0,144 (purple-ish)
|
---|
32 | %% keywords = #FF7700 / 255,119,0 (quite close to plain `orange')
|
---|
33 | %% Corrected to ``web-safe''
|
---|
34 | \definecolor{purple2}{RGB}{153,0,153} % there's actually no standard purple
|
---|
35 | \definecolor{green2}{RGB}{0,153,0} % a darker green
|
---|
36 |
|
---|
37 | \lstdefinestyle{python-idle-code}{%
|
---|
38 | language=Python, % the language
|
---|
39 | basicstyle=\normalsize\ttfamily, % size of the fonts for the code
|
---|
40 | % Color settings to match IDLE style
|
---|
41 | keywordstyle=\color{orange}, % core keywords
|
---|
42 | keywordstyle={[2]\color{purple2}}, % built-ins
|
---|
43 | stringstyle=\color{green2},
|
---|
44 | commentstyle=\color{red},
|
---|
45 | upquote=true, % requires textcomp
|
---|
46 | }
|
---|
47 | \endinput
|
---|
48 | %%
|
---|
49 | %% End of file `listings-python.prf'.
|
---|