Changeset 44a88528 for doc/theses/andrew_beach_MMath/cfalab.sty
- Timestamp:
- Mar 25, 2020, 2:08:43 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2a3b019, 63863f8
- Parents:
- 6c6e36c (diff), c72ea7a (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/cfalab.sty
r6c6e36c r44a88528 1 1 % Package for CFA Research Lab. 2 2 % 3 % Made by combining and updating 3 % Made by combining and updating various macro files people had made. 4 % 5 % Internal commands are prefixed with "\cfalab@". 4 6 5 7 % I don't know what the oldest LaTeX2e version with everything needed is. 6 8 \NeedsTeXFormat{LaTeX2e} 7 \ProvidesPackage{cfalab}[2020/03/ 09v0.1 CFA Laboratory LaTeX Tools]9 \ProvidesPackage{cfalab}[2020/03/24 v0.1 CFA Laboratory LaTeX Tools] 8 10 9 11 % Other packages required. 10 12 \RequirePackage{etoolbox} 13 \RequirePackage{listings} 11 14 \RequirePackage{xspace} 12 15 … … 16 19 % by a star (which the command will consume) to disable this behaviour. 17 20 18 % \newsymbolcmd{<command>}{< expansion>}19 % Defines <command> to be a symbol that has the given <expansion>.21 % \newsymbolcmd{<command>}{<replacement text>} 22 % Defines <command> to be a symbol that has the given <replacement text>. 20 23 \newrobustcmd*\newsymbolcmd[2]{\newrobustcmd{#1}{\cfalab@symbol{#2}}} 21 24 \def\cfalab@symbol#1{\@ifnextchar*{#1\cfalab@eatstar}{#1\xspace}} … … 25 28 \newsymbolcmd\CFA{\textsf{C}\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}} 26 29 27 \newcommand\codeC[1]{\texttt{#1}} 30 % The CFA listings language. Based off of ANCI C and including GCC extensions. 31 % The UW dialect is the default (and only so far) dialect of the language. 32 \lstdefinelanguage[UW]{CFA}[ANSI]{C}{ 33 morekeywords={_Alignas, _Alignof, __alignof, __alignof__, asm, __asm, 34 __asm__, __attribute, __attribute__, auto, _Bool, catch, catchResume, 35 choose, _Complex, __complex, __complex__, __const, __const__, 36 coroutine, disable, dtype, enable, exception, __extension__, 37 fallthrough, fallthru, finally, __float80, float80, __float128, 38 float128, forall, ftype, generator, _Generic, _Imaginary, __imag, 39 __imag__, inline, __inline, __inline__, __int128, int128, __label__, 40 monitor, mutex, _Noreturn, one_t, or, otype, restrict, resume, 41 __restrict, __restrict__, __signed, __signed__, _Static_assert, 42 suspend, thread, _Thread_local, throw, throwResume, timeout, trait, 43 try, ttype, typeof, __typeof, __typeof__, virtual, __volatile, 44 __volatile__, waitfor, when, with, zero_t 45 }, 46 moredirectives={defined,include_next}, 47 } 48 \lstset{defaultdialect={[UW]CFA}} 49 50 % The cfalab style defines some common settings useful in different languages. 51 \lstdefinestyle{cfalab}{% 52 columns=fullflexible, 53 basicstyle=\linespread{0.9}\tt, 54 stringstyle=\tt, 55 } 56 57 % \code*[<escape character>]{<code>} 58 % Use the listings package to format a snipit of <code>. 59 % The <escape character> must be a character that does not appear in 60 % <code> and defaults to a backtick. 61 \newcommand*\codeC[2][\`]{\lstinline[language=C]#1#2#1} 62 \newcommand*\codeCFA[2][\`]{\lstinline[language=CFA]#1#2#1} 63 64 % \settextunderscore{(new|old)} 65 % Redefines the underscore either as a new repersentation or the old one. 66 % Not that some other packages (ex. hyperref) can override this. Set it 67 % up after loading them. 68 \let\cfalab@textunderscore@old=\textunderscore 69 \newcommand\cfalab@textunderscore@new{% 70 \leavevmode\makebox[1.2ex][c]{\rule{1ex}{0.075ex}}} 71 \newcommand\settextunderscore[1]{% 72 \renewcommand\textunderscore{\csuse{cfalab@textunderscore@#1}}} 28 73 29 74 \endinput
Note: See TracChangeset
for help on using the changeset viewer.