Changeset edc6ea2 for doc/theses/andrew_beach_MMath/cfalab.sty
- Timestamp:
- Apr 28, 2021, 2:02:23 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- c1136c56
- Parents:
- df24d37
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/cfalab.sty
rdf24d37 redc6ea2 26 26 27 27 % \newsymbolcmd{<command>}{<replacement text>} 28 % 28 % Defines <command> to be a symbol that has the given <replacement text>. 29 29 \newrobustcmd*\newsymbolcmd[2]{\newrobustcmd{#1}{\cfalab@symbol{#2}}} 30 30 \def\cfalab@symbol#1{\@ifnextchar*{#1\cfalab@eatstar}{#1\xspace}} … … 50 50 51 51 % \colour{<colour>}{<text>} 52 % Just \colo ur but using the LaTeX style instead of TeX style command.52 % Just \color but using the LaTeX style instead of TeX style command. 53 53 \newcommand*\colour[2]{{\color{#1}#2}} 54 54 … … 60 60 \newrobustcmd*\codePy[1]{\lstinline[language=Python]{#1}} 61 61 62 % Use the listings package to format a block of CFA code. 63 % Extra listings options can be passed in as an optional argument. 62 64 \lstnewenvironment{cfa}[1][]{\lstset{language=CFA}\lstset{#1}}{} 63 65 … … 124 126 % show blank lines at end of code 125 127 showlines=true, 126 aboveskip=4pt, % spacing above/below code block 128 % spacing above/below code block 129 aboveskip=4pt, 127 130 belowskip=0pt, 128 131 % numbering style … … 137 140 } 138 141 139 \newcommand{\abbrevFont}{\textit} % set empty for no italics 140 \@ifundefined{eg}{ 141 \newcommand{\EG}{\abbrevFont{e}.\abbrevFont{g}.} 142 \newcommand*{\eg}{% 143 \@ifnextchar{,}{\EG}% 144 {\@ifnextchar{:}{\EG}% 145 {\EG,\xspace}}% 146 }}{}% 147 \@ifundefined{ie}{ 148 \newcommand{\IE}{\abbrevFont{i}.\abbrevFont{e}.} 149 \newcommand*{\ie}{% 150 \@ifnextchar{,}{\IE}% 151 {\@ifnextchar{:}{\IE}% 152 {\IE,\xspace}}% 153 }}{}% 154 \@ifundefined{etc}{ 155 \newcommand{\ETC}{\abbrevFont{etc}} 156 \newcommand*{\etc}{% 157 \@ifnextchar{.}{\ETC}% 158 {\ETC.\xspace}% 159 }}{}% 160 \@ifundefined{etal}{ 161 \newcommand{\ETAL}{\abbrevFont{et}~\abbrevFont{al}} 162 \newcommand*{\etal}{% 163 \@ifnextchar{.}{\protect\ETAL}% 164 {\protect\ETAL.\xspace}% 165 }}{}% 166 \@ifundefined{viz}{ 167 \newcommand{\VIZ}{\abbrevFont{viz}} 168 \newcommand*{\viz}{% 169 \@ifnextchar{.}{\VIZ}% 170 {\VIZ.\xspace}% 171 }}{}% 142 % A couple of abbreviations are provided. Just ones someone liked. 143 % 144 % Abbreviation formatting commands (renew to customize): 145 \newcommand{\abbrevFont}{\textit} 146 % 147 % Abbreviations that, if not followed by a comma or colon, add a comma. 148 \newrobustcmd*\cfalab@abbrev@comma{% 149 \@ifnextchar{,}{}{\@ifnextchar{:}{}{,\xspace}}} 150 \providerobustcmd*\eg{\abbrevFont{e}.\abbrevFont{g}.\cfalab@abbrev@comma} 151 \providerobustcmd*\ie{\abbrevFont{i}.\abbrevFont{e}.\cfalab@abbrev@comma} 152 % 153 % Abbreviations that, if not followed by a period, add a period. 154 \newrobustcmd*\cfalab@abbrev@period{\@ifnextchar{.}{}{.\xspace}} 155 \providerobustcmd*\etc{\abbrevFont{etc}\cfalab@abbrev@period} 156 \providerobustcmd*\etal{\abbrevFont{et}~\abbrevFont{al}\cfalab@abbrev@period} 157 \providerobustcmd*\viz{\abbrevFont{viz}\cfalab@abbrev@period} 172 158 173 159 \endinput
Note: See TracChangeset
for help on using the changeset viewer.