Ignore:
Timestamp:
Mar 17, 2020, 2:23:22 PM (19 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
1ef166d
Parents:
2c052c0
Message:

cfalab.sty's \newsymbolcmd now accepts commands instead of letters and uses fewer internal macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/cfalab.sty

    r2c052c0 rbce76d1  
    1616% by a star (which the command will consume) to disable this behaviour.
    1717
    18 % \newsymbolcmd{<name>}{<expansion>}
    19 %    Creates a symbol with <name> that has the given <expansion>. Note that
    20 %    the name must be given as a series of letters, not as an escaped name.
    21 \newrobustcmd*\newsymbolcmd[2]{
    22     \csdef{#1}{\cfalab@symbol{#1}}
    23     \expandafter\robustify\csname #1\endcsname
    24     \csdef{cfalab@symbol@#1}{#2}
    25 }
    26 \def\cfalab@symbol#1{\@ifnextchar*{\cfalab@symstar{#1}}{\cfalab@symnostar{#1}}}
    27 \def\cfalab@symstar#1*{\csuse{cfalab@symbol@#1}}
    28 \def\cfalab@symnostar#1{\csuse{cfalab@symbol@#1}\xspace}
     18% \newsymbolcmd{<command>}{<expansion>}
     19%    Defines <command> to be a symbol that has the given <expansion>.
     20\newrobustcmd*\newsymbolcmd[2]{\newrobustcmd{#1}{\cfalab@symbol{#2}}}
     21\def\cfalab@symbol#1{\@ifnextchar*{#1\cfalab@eatstar}{#1\xspace}}
     22\def\cfalab@eatstar*{}
    2923
    3024% Cforall with the forall symbol.
    31 \newsymbolcmd{CFA}{\textsf{C}\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}}
     25\newsymbolcmd\CFA{\textsf{C}\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}}
    3226
    3327\newcommand\codeC[1]{\texttt{#1}}
Note: See TracChangeset for help on using the changeset viewer.