Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/LaTeXmacros/common.tex

    r28572e8 re94eeb9  
    1111%% Created On       : Sat Apr  9 10:06:17 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Sat May  8 08:48:37 2021
    14 %% Update Count     : 540
     13%% Last Modified On : Sun Feb 14 15:52:46 2021
     14%% Update Count     : 524
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    3838\usepackage{xspace}
    3939\newcommand{\CFAIcon}{\textsf{C}\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}} % Cforall icon
    40 \newcommand{\CFA}{\protect\CFAIcon\xspace}                              % CFA symbolic name
    41 \newcommand{\CFL}{\textrm{Cforall}\xspace}                              % Cforall non-icon name
    42 \newcommand{\Celeven}{\textrm{C11}\xspace}                              % C11 symbolic name
     40\newcommand{\CFA}{\protect\CFAIcon\xspace}                      % CFA symbolic name
     41\newcommand{\CFL}{\textrm{Cforall}\xspace}                      % Cforall non-icon name
     42\newcommand{\Celeven}{\textrm{C11}\xspace}                      % C11 symbolic name
    4343\newcommand{\CCIcon}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}} % C++ icon
    44 \newcommand{\CC}[1][]{\protect\CCIcon{#1}\xspace}               % C++ symbolic name
     44\newcommand{\CC}{\protect\CCIcon\xspace}                        % C++ symbolic name
    4545% numbers disallowed in latex variables names => use number names
    46 \newcommand{\CCeleven}{\protect\CCIcon{11}\xspace}              % C++11 symbolic name
    47 \newcommand{\CCfourteen}{\protect\CCIcon{14}\xspace}    % C++14 symbolic name
    48 \newcommand{\CCseventeen}{\protect\CCIcon{17}\xspace}   % C++17 symbolic name
    49 \newcommand{\CCtwenty}{\protect\CCIcon{20}\xspace}              % C++20 symbolic name
     46\newcommand{\CCeleven}{\protect\CCIcon{11}\xspace}      % C++11 symbolic name
     47\newcommand{\CCfourteen}{\protect\CCIcon{14}\xspace} % C++14 symbolic name
     48\newcommand{\CCseventeen}{\protect\CCIcon{17}\xspace} % C++17 symbolic name
     49\newcommand{\CCtwenty}{\protect\CCIcon{20}\xspace}      % C++20 symbolic name
    5050\newcommand{\Csharp}{C\raisebox{-0.7ex}{\Large$^\sharp$}\xspace} % C# symbolic name
    5151
     
    102102\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
    103103\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{-2.0ex \@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries}}
    104 \renewcommand\subparagraph{\@startsection{subparagraph}{4}{\z@}{-1.5ex \@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries\itshape}}
    105104
    106105% index macros
     
    153152% Latin abbreviation
    154153\newcommand{\abbrevFont}{\textit}                       % set empty for no italics
    155 % If not followed by a comma or colon, add a comma.
    156 \newcommand{\CheckCommaColon}{\@ifnextchar{,}{}{\@ifnextchar{:}{}{,\xspace}}}
    157 % If not followed by a period, add a period.
    158 \newcommand{\CheckPeriod}{\@ifnextchar{.}{}{.\xspace}}
    159 
    160154\@ifundefined{eg}{
    161155\newcommand{\EG}{\abbrevFont{e}.\abbrevFont{g}.}
    162 \newcommand{\eg}{\EG\CheckCommaColon}
    163 }{}%
     156\newcommand*{\eg}{%
     157        \@ifnextchar{,}{\EG}%
     158                {\@ifnextchar{:}{\EG}%
     159                        {\EG,\xspace}}%
     160}}{}%
    164161\@ifundefined{ie}{
    165162\newcommand{\IE}{\abbrevFont{i}.\abbrevFont{e}.}
    166 \newcommand{\ie}{\IE\CheckCommaColon}
    167 }{}%
     163\newcommand*{\ie}{%
     164        \@ifnextchar{,}{\IE}%
     165                {\@ifnextchar{:}{\IE}%
     166                        {\IE,\xspace}}%
     167}}{}%
    168168\@ifundefined{etc}{
    169169\newcommand{\ETC}{\abbrevFont{etc}}
    170 \newcommand{\etc}{\ETC\CheckPeriod}
    171 }{}%
     170\newcommand*{\etc}{%
     171        \@ifnextchar{.}{\ETC}%
     172        {\ETC.\xspace}%
     173}}{}%
    172174\@ifundefined{etal}{
    173175\newcommand{\ETAL}{\abbrevFont{et}~\abbrevFont{al}}
    174 \newcommand{\etal}{\ETAL\CheckPeriod}
    175 }{}%
     176\newcommand*{\etal}{%
     177        \@ifnextchar{.}{\protect\ETAL}%
     178                {\protect\ETAL.\xspace}%
     179}}{}%
    176180\@ifundefined{viz}{
    177181\newcommand{\VIZ}{\abbrevFont{viz}}
    178 \newcommand{\viz}{\VIZ\CheckPeriod}
    179 }{}%
     182\newcommand*{\viz}{%
     183        \@ifnextchar{.}{\VIZ}%
     184                {\VIZ.\xspace}%
     185}}{}%
    180186\makeatother
    181187
     
    278284showlines=true,                                                 % show blank lines at end of code
    279285aboveskip=4pt,                                                  % spacing above/below code block
    280 belowskip=2pt,
     286belowskip=0pt,
    281287numberstyle=\footnotesize\sf,                   % numbering style
    282288% replace/adjust listing characters that look bad in sanserif
     
    291297\lstset{
    292298language=CFA,
    293 %moredelim=**[is][\color{red}]{@}{@},   % red highlighting @...@
    294 moredelim=**[is][\color{red}]{®}{®},    % red highlighting ®...® (registered trademark symbol) emacs: C-q M-.
     299moredelim=**[is][\color{red}]{@}{@},    % red highlighting @...@
     300%moredelim=**[is][\color{red}]{®}{®},   % red highlighting ®...® (registered trademark symbol) emacs: C-q M-.
    295301%moredelim=**[is][\color{blue}]{ß}{ß},  % blue highlighting ß...ß (sharp s symbol) emacs: C-q M-_
    296302%moredelim=**[is][\color{OliveGreen}]{¢}{¢}, % green highlighting ¢...¢ (cent symbol) emacs: C-q M-"
Note: See TracChangeset for help on using the changeset viewer.