[9a5a2cd] | 1 | \input{common} |
---|
| 2 | |
---|
| 3 | \lstdefinestyle{defaultStyle}{ |
---|
| 4 | escapeinside={@@}, |
---|
| 5 | % basicstyle=\linespread{0.9}\tt\footnotesize, % reduce line spacing and use typewriter font |
---|
| 6 | basicstyle=\linespread{0.9}\sf, % reduce line spacing and use typewriter font |
---|
| 7 | % keywordstyle=\bfseries\color{blue}, |
---|
| 8 | % keywordstyle=[2]\bfseries\color{Plum}, |
---|
| 9 | % commentstyle=\sf\itshape\color{OliveGreen}, % green and italic comments |
---|
| 10 | % identifierstyle=\color{identifierCol}, |
---|
| 11 | % stringstyle=\sf\color{Mahogany}, % use sanserif font |
---|
| 12 | stringstyle=\tt, % use sanserif font |
---|
| 13 | mathescape=true, |
---|
| 14 | % columns=fixed, |
---|
| 15 | columns=fullflexible, |
---|
| 16 | % aboveskip=4pt, % spacing above/below code block |
---|
| 17 | % belowskip=3pt, |
---|
| 18 | keepspaces=true, |
---|
| 19 | tabsize=4, |
---|
| 20 | % frame=lines, |
---|
| 21 | literate=, |
---|
| 22 | showlines=true, % show blank lines at end of code |
---|
| 23 | showspaces=false, |
---|
| 24 | showstringspaces=false, |
---|
| 25 | showlines=true, % show blank lines at end of code |
---|
| 26 | escapechar=\$, |
---|
| 27 | xleftmargin=\parindentlnth, % indent code to paragraph indentation |
---|
| 28 | moredelim=[is][\color{red}\bfseries]{**R**}{**R**}, % red highlighting |
---|
| 29 | morekeywords=[2]{accept, signal, signal_block, wait, waitfor, waituntil}, |
---|
| 30 | abovecaptionskip=5pt, |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | \lstdefinestyle{cfaStyle}{ |
---|
| 34 | escapeinside={@@}, |
---|
| 35 | basicstyle=\linespread{0.9}\sf, % reduce line spacing and use typewriter font |
---|
| 36 | stringstyle=\tt, % use sanserif font |
---|
| 37 | mathescape=true, |
---|
| 38 | columns=fullflexible, |
---|
| 39 | keepspaces=true, |
---|
| 40 | tabsize=4, |
---|
| 41 | literate=, |
---|
| 42 | showlines=true, % show blank lines at end of code |
---|
| 43 | showspaces=false, |
---|
| 44 | showstringspaces=false, |
---|
| 45 | showlines=true, % show blank lines at end of code |
---|
| 46 | escapechar=\$, |
---|
| 47 | xleftmargin=\parindentlnth, % indent code to paragraph indentation |
---|
| 48 | moredelim=[is][\color{red}\bfseries]{**R**}{**R**}, % red highlighting |
---|
| 49 | morekeywords=[2]{accept, signal, signal_block, wait, waitfor, waituntil}, |
---|
| 50 | abovecaptionskip=5pt, |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | \lstnewenvironment{cfacode}[1][]{ |
---|
| 54 | \lstset{ |
---|
| 55 | language = CFA, |
---|
| 56 | style=cfaStyle, |
---|
| 57 | captionpos=b, |
---|
| 58 | #1 |
---|
| 59 | } |
---|
| 60 | }{} |
---|
| 61 | |
---|
| 62 | \lstnewenvironment{cppcode}[1][]{ |
---|
| 63 | \lstset{ |
---|
| 64 | language = c++, |
---|
| 65 | style=defaultStyle, |
---|
| 66 | captionpos=b, |
---|
| 67 | #1 |
---|
| 68 | } |
---|
| 69 | }{} |
---|
| 70 | |
---|
| 71 | \newcommand{\code}[1]{\lstinline[language=CFA,style=cfaStyle]{#1}} |
---|
| 72 | \newcommand{\uC}{$\mu$\CC} |
---|
| 73 | |
---|