Changeset 3c17a10


Ignore:
Timestamp:
Apr 2, 2023, 7:58:34 AM (20 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
1e6cecb
Parents:
75bd041
Message:

updated style to remove some 800-lb gorilla macros

Location:
doc/theses/colby_parsons_MMAth
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/colby_parsons_MMAth/style/cfa-format.tex

    r75bd041 r3c17a10  
    88\definecolor{keywordCol}{HTML}{000000}
    99\definecolor{identifierCol}{HTML}{000000}
    10 
    11 % from https://gist.github.com/nikolajquorning/92bbbeef32e1dd80105c9bf2daceb89a
    12 \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, word
    15   },
    16   morestring=[b]",
    17   morecomment=[s]{(*}{*)},
    18 }
    19 
    20 \lstdefinelanguage{D}{
    21   % Keywords
    22   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, with
    31   },
    32   % Special identifiers, common functions
    33   morekeywords=[2]{enforce},
    34   % Ugly identifiers
    35   morekeywords=[3]{
    36     __DATE__, __EOF__, __FILE__, __LINE__, __TIMESTAMP__, __TIME__, __VENDOR__,
    37     __VERSION__, __ctfe, __gshared, __monitor, __thread, __vptr, _argptr,
    38     _arguments, _ctor, _dtor
    39   },
    40   % Basic types
    41   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_t
    46   },
    47   % Strings
    48   morestring=[b]{"},
    49   morestring=[b]{'},
    50   morestring=[b]{`},
    51   % Comments
    52   comment=[l]{//},
    53   morecomment=[s]{/*}{*/},
    54   morecomment=[s][\color{blue}]{/**}{*/},
    55   morecomment=[n]{/+}{+/},
    56   morecomment=[n][\color{blue}]{/++}{+/},
    57   % Options
    58   sensitive=true
    59 }
    60 
    61 \lstdefinelanguage{rust}{
    62   % Keywords
    63   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, yield
    75   },
    76   % Strings
    77   morestring=[b]{"},
    78   % Comments
    79   comment=[l]{//},
    80   morecomment=[s]{/*}{*/},
    81   % Options
    82   sensitive=true
    83 }
    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 font
    100   keywordstyle=\bfseries\color{blue},
    101   keywordstyle=[2]\bfseries\color{Plum},
    102   commentstyle=\itshape\color{OliveGreen},                  % green and italic comments
    103   identifierstyle=\color{identifierCol},
    104   stringstyle=\sf\color{Mahogany},                                % use sanserif font
    105   mathescape=true,
    106   columns=fixed,
    107   aboveskip=4pt,                                  % spacing above/below code block
    108   belowskip=3pt,
    109   keepspaces=true,
    110   tabsize=4,
    111   % frame=lines,
    112   literate=,
    113   showlines=true,                                 % show blank lines at end of code
    114   showspaces=false,
    115   showstringspaces=false,
    116   escapechar=\$,
    117   xleftmargin=\parindentlnth,                     % indent code to paragraph indentation
    118   moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
    119   % moredelim=* detects keywords, comments, strings, and other delimiters and applies their formatting
    120   % moredelim=** allows cumulative application
    121 }
    12210
    12311\lstdefinestyle{defaultStyle}{
     
    17260}
    17361
    174 % \lstMakeShortInline[basewidth=0.5em,breaklines=true,basicstyle=\normalsize\ttfamily\color{basicCol}]@  % single-character for \lstinline
    175 % \lstMakeShortInline@
    176 
    17762\lstnewenvironment{ccode}[1][]{
    17863  \lstset{
     
    18873    language = CFA,
    18974    style=cfaStyle,
    190     captionpos=b,
    191     #1
    192   }
    193 }{}
    194 
    195 \lstnewenvironment{pseudo}[1][]{
    196   \lstset{
    197     language = pseudo,
    198     style=pseudoStyle,
    19975    captionpos=b,
    20076    #1
     
    229105}{}
    230106
    231 \lstnewenvironment{scalacode}[1][]{
    232   \lstset{
    233     language = scala,
    234     style=defaultStyle,
    235     captionpos=b,
    236     #1
    237   }
    238 }{}
    239 
    240 \lstnewenvironment{smlcode}[1][]{
    241   \lstset{
    242     language = sml,
    243     style=defaultStyle,
    244     captionpos=b,
    245     #1
    246   }
    247 }{}
    248 
    249 \lstnewenvironment{dcode}[1][]{
    250   \lstset{
    251     language = D,
    252     style=defaultStyle,
    253     captionpos=b,
    254     #1
    255   }
    256 }{}
    257 
    258 \lstnewenvironment{rustcode}[1][]{
    259   \lstset{
    260     language = rust,
    261     style=defaultStyle,
    262     captionpos=b,
    263     #1
    264   }
    265 }{}
    266 
    267107\lstnewenvironment{gocode}[1][]{
    268108  \lstset{
  • doc/theses/colby_parsons_MMAth/thesis.tex

    r75bd041 r3c17a10  
    1414
    1515% Latex packages used in the document.
    16 \usepackage[T1]{fontenc}                                        % allow Latin1 (extended ASCII) characters
    17 \usepackage{textcomp}
    18 \usepackage[latin1]{inputenc}
    19 \usepackage{fullpage,times,comment}
    2016\usepackage{epic,eepic}
    21 \usepackage{upquote}                                            % switch curled `'" to straight
    2217\usepackage{dirtytalk}
    23 \usepackage{calc}
    2418\usepackage{xspace}
    25 % \usepackage[labelformat=simple]{subfig}
    26 % \renewcommand{\thesubfigure}{(\alph{subfigure})}
    2719\usepackage{subcaption}
    28 % \usepackage{subfigure}
    2920\usepackage{graphicx}
    3021\usepackage{tabularx}
    31 \usepackage{multicol}
    3222\usepackage[acronym]{glossaries}
    33 \usepackage{varioref}
    3423\usepackage{listings}                                           % format program code
    3524\usepackage[flushmargin]{footmisc}                              % support label/reference in footnote
    36 \usepackage{latexsym}                                           % \Box glyph
    3725\usepackage{mathptmx}                                           % better math font with "times"
    3826\usepackage[usenames]{color}
     
    4129\usepackage{fancyhdr}
    4230\usepackage{float}
    43 \usepackage{siunitx}
    44 \sisetup{ binary-units=true }
    4531\input{style}                                                   % bespoke macros used in the document
    46 \usepackage{url}
    4732\usepackage[dvips,plainpages=false,pdfpagelabels,pdfpagemode=UseNone,colorlinks=true,pagebackref=true,linkcolor=blue,citecolor=blue,urlcolor=blue,pagebackref=true,breaklinks=true]{hyperref}
    48 \usepackage{breakurl}
    4933\urlstyle{rm}
     34% \usepackage{breakurl} % used to avoid line breaks inside urls -> uncomment later if needed
    5035
    5136\usepackage{tikz}
    5237\def\checkmark{\tikz\fill[scale=0.4](0,.35) -- (.25,0) -- (1,.7) -- (.25,.15) -- cycle;}
    5338
    54 \setlength{\topmargin}{-0.45in}                         % move running title into header
     39% Setting up the page margins...
     40\setlength{\textheight}{9in}
     41\setlength{\topmargin}{-0.45in}
    5542\setlength{\headsep}{0.25in}
     43% uWaterloo thesis requirements specify a minimum of 1 inch (72pt) margin at the
     44% top, bottom, and outside page edges and a 1.125 in. (81pt) gutter margin (on binding side).
     45% While this is not an issue for electronic viewing, a PDF may be printed, and so we have the same page layout for both printed and electronic versions, we leave the gutter margin in.
     46% Set margins to minimum permitted by uWaterloo thesis regulations:
     47\setlength{\marginparwidth}{0pt} % width of margin notes
     48% N.B. If margin notes are used, you must adjust \textwidth, \marginparwidth
     49% and \marginparsep so that the space left between the margin notes and page
     50% edge is less than 15 mm (0.6 in.)
     51\setlength{\marginparsep}{0pt} % width of space between body text and margin notes
     52\setlength{\evensidemargin}{0.125in} % Adds 1/8 in. to binding side of all
     53% even-numbered pages when the "twoside" printing option is selected
     54\setlength{\oddsidemargin}{0.125in} % Adds 1/8 in. to the left of all pages when "oneside" printing is selected, and to the left of all odd-numbered pages when "twoside" printing is selected
     55\setlength{\textwidth}{6.375in} % assuming US letter paper (8.5 in. x 11 in.) and side margins as above
     56\raggedbottom
     57
     58% The following statement specifies the amount of space between paragraphs. Other reasonable specifications are \bigskipamount and \smallskipamount.
     59\setlength{\parskip}{\medskipamount}
    5660
    5761\newsavebox{\myboxA}                                    % used with subfigure
Note: See TracChangeset for help on using the changeset viewer.