Changeset 34b6a7b6 for doc/theses/colby_parsons_MMAth/style
- Timestamp:
- Apr 3, 2023, 4:48:47 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, stuck-waitfor-destruct
- Children:
- 1dfc3d0, e8b1f23c
- Parents:
- fa6ca1a (diff), 1689ecf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- doc/theses/colby_parsons_MMAth/style
- Files:
-
- 2 edited
-
cfa-format.tex (modified) (5 diffs)
-
style.tex (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/colby_parsons_MMAth/style/cfa-format.tex
rfa6ca1a r34b6a7b6 9 9 \definecolor{identifierCol}{HTML}{000000} 10 10 11 % from https://gist.github.com/nikolajquorning/92bbbeef32e1dd80105c9bf2daceb89a12 \lstdefinelanguage{sml} {13 morekeywords= {14 EQUAL, GREATER, LESS, NONE, SOME, abstraction, abstype, and, andalso, array, as, before, bool, case, char, datatype, do, else, end, eqtype, exception, exn, false, fn, fun, functor, handle, if, in, include, infix, infixr, int, let, list, local, nil, nonfix, not, o, of, op, open, option, orelse, overload, print, raise, real, rec, ref, sharing, sig, signature, string, struct, structure, substring, then, true, type, unit, val, vector, where, while, with, withtype, word15 },16 morestring=[b]",17 morecomment=[s]{(*}{*)},18 }19 20 \lstdefinelanguage{D}{21 % Keywords22 morekeywords=[1]{23 abstract, alias, align, auto, body, break, cast, catch, class, const,24 continue, debug, delegate, delete, deprecated, do, else, enum, export,25 false, final, finally, for, foreach, foreach_reverse, function, goto, if,26 immutable, import, in, inout, interface, invariant, is, lazy, macro, mixin,27 module, new, nothrow, null, out, override, package, pragma, private,28 protected, public, pure, ref, return, shared, static, struct, super,29 switch, synchronized, template, this, throw, true, try, typedef, typeid,30 typeof, union, unittest, volatile, while, with31 },32 % Special identifiers, common functions33 morekeywords=[2]{enforce},34 % Ugly identifiers35 morekeywords=[3]{36 __DATE__, __EOF__, __FILE__, __LINE__, __TIMESTAMP__, __TIME__, __VENDOR__,37 __VERSION__, __ctfe, __gshared, __monitor, __thread, __vptr, _argptr,38 _arguments, _ctor, _dtor39 },40 % Basic types41 morekeywords=[4]{42 byte, ubyte, short, ushort, int, uint, long, ulong, cent, ucent, void,43 bool, bit, float, double, real, ushort, int, uint, long, ulong, float,44 char, wchar, dchar, string, wstring, dstring, ireal, ifloat, idouble,45 creal, cfloat, cdouble, size_t, ptrdiff_t, sizediff_t, equals_t, hash_t46 },47 % Strings48 morestring=[b]{"},49 morestring=[b]{'},50 morestring=[b]{`},51 % Comments52 comment=[l]{//},53 morecomment=[s]{/*}{*/},54 morecomment=[s][\color{blue}]{/**}{*/},55 morecomment=[n]{/+}{+/},56 morecomment=[n][\color{blue}]{/++}{+/},57 % Options58 sensitive=true59 }60 61 \lstdefinelanguage{rust}{62 % Keywords63 morekeywords=[1]{64 abstract, alignof, as, become, box,65 break, const, continue, crate, do,66 else, enum, extern, false, final,67 fn, for, if, impl, in,68 let, loop, macro, match, mod,69 move, mut, offsetof, override, priv,70 proc, pub, pure, ref, return,71 Self, self, sizeof, static, struct,72 super, trait, true, type, typeof,73 unsafe, unsized, use, virtual, where,74 while, yield75 },76 % Strings77 morestring=[b]{"},78 % Comments79 comment=[l]{//},80 morecomment=[s]{/*}{*/},81 % Options82 sensitive=true83 }84 85 \lstdefinelanguage{pseudo}{86 morekeywords={string,uint,int,bool,float},%87 sensitive=true,%88 morecomment=[l]{//},%89 morecomment=[s]{/*}{*/},%90 morestring=[b]',%91 morestring=[b]",%92 morestring=[s]{`}{`},%93 }%94 95 \newcommand{\KWC}{K-W C\xspace}96 97 \lstdefinestyle{pseudoStyle}{98 escapeinside={@@},99 basicstyle=\linespread{0.9}\sf\footnotesize, % reduce line spacing and use typewriter font100 keywordstyle=\bfseries\color{blue},101 keywordstyle=[2]\bfseries\color{Plum},102 commentstyle=\itshape\color{OliveGreen}, % green and italic comments103 identifierstyle=\color{identifierCol},104 stringstyle=\sf\color{Mahogany}, % use sanserif font105 mathescape=true,106 columns=fixed,107 aboveskip=4pt, % spacing above/below code block108 belowskip=3pt,109 keepspaces=true,110 tabsize=4,111 % frame=lines,112 literate=,113 showlines=true, % show blank lines at end of code114 showspaces=false,115 showstringspaces=false,116 escapechar=\$,117 xleftmargin=\parindentlnth, % indent code to paragraph indentation118 moredelim=[is][\color{red}\bfseries]{**R**}{**R**}, % red highlighting119 % moredelim=* detects keywords, comments, strings, and other delimiters and applies their formatting120 % moredelim=** allows cumulative application121 }122 123 11 \lstdefinestyle{defaultStyle}{ 124 12 escapeinside={@@}, 125 basicstyle=\linespread{0.9}\tt\footnotesize, % reduce line spacing and use typewriter font 126 keywordstyle=\bfseries\color{blue}, 127 keywordstyle=[2]\bfseries\color{Plum}, 128 commentstyle=\itshape\color{OliveGreen}, % green and italic comments 129 identifierstyle=\color{identifierCol}, 130 stringstyle=\sf\color{Mahogany}, % use sanserif font 13 % basicstyle=\linespread{0.9}\tt\footnotesize, % reduce line spacing and use typewriter font 14 basicstyle=\linespread{0.9}\sf, % reduce line spacing and use typewriter 15 % keywordstyle=\bfseries\color{blue}, 16 % keywordstyle=[2]\bfseries\color{Plum}, 17 % commentstyle=\itshape\color{OliveGreen}, % green and italic comments 18 % identifierstyle=\color{identifierCol}, 19 % stringstyle=\sf\color{Mahogany}, % use sanserif font 20 stringstyle=\tt, % use sanserif font 131 21 mathescape=true, 132 columns=fixed, 133 aboveskip=4pt, % spacing above/below code block 134 belowskip=3pt, 22 % columns=fixed, 23 columns=fullflexible, 24 % aboveskip=4pt, % spacing above/below code block 25 % belowskip=3pt, 135 26 keepspaces=true, 136 27 tabsize=4, … … 149 40 \lstdefinestyle{cfaStyle}{ 150 41 escapeinside={@@}, 151 basicstyle=\linespread{0.9}\tt\footnotesize, % reduce line spacing and use typewriter font 152 keywordstyle=\bfseries\color{blue}, 153 keywordstyle=[2]\bfseries\color{Plum}, 154 commentstyle=\sf\itshape\color{OliveGreen}, % green and italic comments 155 identifierstyle=\color{identifierCol}, 156 stringstyle=\sf\color{Mahogany}, % use sanserif font 42 % basicstyle=\linespread{0.9}\tt\footnotesize, % reduce line spacing and use typewriter font 43 basicstyle=\linespread{0.9}\sf, % reduce line spacing and use typewriter font 44 % keywordstyle=\bfseries\color{blue}, 45 % keywordstyle=[2]\bfseries\color{Plum}, 46 % commentstyle=\sf\itshape\color{OliveGreen}, % green and italic comments 47 % identifierstyle=\color{identifierCol}, 48 % stringstyle=\sf\color{Mahogany}, % use sanserif font 49 stringstyle=\tt, % use sanserif font 157 50 mathescape=true, 158 columns=fixed, 159 aboveskip=4pt, % spacing above/below code block 160 belowskip=3pt, 51 % columns=fixed, 52 columns=fullflexible, 53 % aboveskip=4pt, % spacing above/below code block 54 % belowskip=3pt, 161 55 keepspaces=true, 162 56 tabsize=4, … … 166 60 showspaces=false, 167 61 showstringspaces=false, 62 showlines=true, % show blank lines at end of code 168 63 escapechar=\$, 169 64 xleftmargin=\parindentlnth, % indent code to paragraph indentation 170 65 moredelim=[is][\color{red}\bfseries]{**R**}{**R**}, % red highlighting 171 morekeywords=[2]{accept, signal, signal_block, wait, waitfor}, 66 morekeywords=[2]{accept, signal, signal_block, wait, waitfor, waituntil}, 67 abovecaptionskip=5pt, 172 68 } 173 174 % \lstMakeShortInline[basewidth=0.5em,breaklines=true,basicstyle=\normalsize\ttfamily\color{basicCol}]@ % single-character for \lstinline175 % \lstMakeShortInline@176 69 177 70 \lstnewenvironment{ccode}[1][]{ … … 188 81 language = CFA, 189 82 style=cfaStyle, 190 captionpos=b,191 #1192 }193 }{}194 195 \lstnewenvironment{pseudo}[1][]{196 \lstset{197 language = pseudo,198 style=pseudoStyle,199 83 captionpos=b, 200 84 #1 … … 229 113 }{} 230 114 231 \lstnewenvironment{scalacode}[1][]{232 \lstset{233 language = scala,234 style=defaultStyle,235 captionpos=b,236 #1237 }238 }{}239 240 \lstnewenvironment{smlcode}[1][]{241 \lstset{242 language = sml,243 style=defaultStyle,244 captionpos=b,245 #1246 }247 }{}248 249 \lstnewenvironment{dcode}[1][]{250 \lstset{251 language = D,252 style=defaultStyle,253 captionpos=b,254 #1255 }256 }{}257 258 \lstnewenvironment{rustcode}[1][]{259 \lstset{260 language = rust,261 style=defaultStyle,262 captionpos=b,263 #1264 }265 }{}266 267 115 \lstnewenvironment{gocode}[1][]{ 268 116 \lstset{ -
doc/theses/colby_parsons_MMAth/style/style.tex
rfa6ca1a r34b6a7b6 1 \input{common} % bespoke macros used in the document 2 \input{cfa-format} 1 \input{common} 3 2 4 % \CFADefaultStyle 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 } 5 32 6 % \lstset{ 7 % morekeywords=[2]{nomutex,mutex,thread,wait,wait_release,signal,signal_block,accept,monitor,suspend,resume,coroutine}, 8 % keywordstyle=[2]\color{blue}, % second set of keywords for concurency 9 % basicstyle=\linespread{0.9}\tt\small, % reduce line spacing and use typewriter font 10 % stringstyle=\sf\color{Mahogany}, % use sanserif font 11 % commentstyle=\itshape\color{OliveGreen}, % green and italic comments 12 % }% 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
Note:
See TracChangeset
for help on using the changeset viewer.