ast-experimental
stuck-waitfor-destruct
|
Last change
on this file since 46e6e47 was c67957e, checked in by Peter A. Buhr <pabuhr@…>, 3 years ago |
|
add Golang lstlisting environment
|
-
Property mode
set to
100644
|
|
File size:
769 bytes
|
| Line | |
|---|
| 1 | \input{common}
|
|---|
| 2 | \CFAStyle % CFA code-style
|
|---|
| 3 | \lstset{language=CFA} % default language
|
|---|
| 4 |
|
|---|
| 5 | \newcommand{\newtermFont}{\emph}
|
|---|
| 6 | \newcommand{\Newterm}[1]{\newtermFont{#1}}
|
|---|
| 7 |
|
|---|
| 8 | \newcommand{\code}[1]{\lstinline[language=CFA]{#1}}
|
|---|
| 9 | \newcommand{\Go}[1]{\lstinline[language=Go]{#1}}
|
|---|
| 10 | \newcommand{\uC}{$\mu$\CC}
|
|---|
| 11 | \newcommand{\PAB}[1]{{\color{red}PAB: #1}}
|
|---|
| 12 | \newcommand{\CAP}[1]{{\color{orange}CAP: #1}}
|
|---|
| 13 |
|
|---|
| 14 | \newsavebox{\myboxA} % used with subfigure
|
|---|
| 15 | \newsavebox{\myboxB}
|
|---|
| 16 |
|
|---|
| 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 |
|
|---|
| 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.