File: pythonhighlight.cwl

package info (click to toggle)
texstudio 4.8.9%2Bds-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 109,164 kB
  • sloc: cpp: 109,508; xml: 18,668; ansic: 8,977; python: 357; javascript: 177; sh: 147; makefile: 52
file content (39 lines) | stat: -rw-r--r-- 837 bytes parent folder | download | duplicates (2)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# pythonhighlight package
# Matthew Bertucci 2024/03/18

#include:listings
#include:xcolor

commentcolour#B
stringcolour#B
keywordcolour#B
exceptioncolour#B
commandcolour#B
numpycolour#B
literatecolour#B
promptcolour#B
specmethodcolour#B

\framemargin#*
\pythonprompt#*
\literatecolour{text}#*

#keyvals:\lstset,\begin{lstlisting},\lstinputlisting,\lstdefinelanguage,\lstdefinestyle
style=pythonhighlight-style
#endkeyvals

#keyvals:\lstinline,\lstMakeShortInline,\lstdefinelanguage,\lstdefinestyle
style=pythonhighlight-inline-style
#endkeyvals

\inputpythonfile{file}
\inputpythonfile{file}[start num]
\inputpythonfile{file}[start num][end num]
\begin{python}#V
\begin{python}[options]#V
\end{python}
\pyth|%<text%>|
\pyth{verbatimSymbol}#S

# deprecated
\inputpython{file}{start num}{end num}#S