ast-experimental
Last change
on this file since 8599415 was
c67957e,
checked in by Peter A. Buhr <pabuhr@…>, 17 months ago
|
add Golang lstlisting environment
|
-
Property mode set to
100644
|
File size:
769 bytes
|
Rev | Line | |
---|
[9a5a2cd] | 1 | \input{common} |
---|
[9432499] | 2 | \CFAStyle % CFA code-style |
---|
| 3 | \lstset{language=CFA} % default language |
---|
[9a5a2cd] | 4 | |
---|
[39b2403] | 5 | \newcommand{\newtermFont}{\emph} |
---|
| 6 | \newcommand{\Newterm}[1]{\newtermFont{#1}} |
---|
| 7 | |
---|
[9363b1b] | 8 | \newcommand{\code}[1]{\lstinline[language=CFA]{#1}} |
---|
[ca8c91ce] | 9 | \newcommand{\Go}[1]{\lstinline[language=Go]{#1}} |
---|
[9a5a2cd] | 10 | \newcommand{\uC}{$\mu$\CC} |
---|
[39b2403] | 11 | \newcommand{\PAB}[1]{{\color{red}PAB: #1}} |
---|
[c0527f8] | 12 | \newcommand{\CAP}[1]{{\color{orange}CAP: #1}} |
---|
[39b2403] | 13 | |
---|
| 14 | \newsavebox{\myboxA} % used with subfigure |
---|
| 15 | \newsavebox{\myboxB} |
---|
[9a5a2cd] | 16 | |
---|
[c67957e] | 17 | \lstnewenvironment{Golang}[1][] |
---|
| 18 | {\lstset{language=Go,literate={<-}{\makebox[2ex][c]{\textless\raisebox{0.4ex}{\rule{0.8ex}{0.075ex}}}}2, |
---|
| 19 | moredelim=**[is][\protect\color{red}]{@}{@}}\lstset{#1}} |
---|
| 20 | {} |
---|
| 21 | |
---|
[39b2403] | 22 | \lstnewenvironment{java}[1][] |
---|
| 23 | {\lstset{language=java,moredelim=**[is][\protect\color{red}]{@}{@}}\lstset{#1}} |
---|
| 24 | {} |
---|
Note: See
TracBrowser
for help on using the repository browser.