Ignore:
Timestamp:
Mar 4, 2021, 7:40:25 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
77d601f
Parents:
342af53 (diff), a5040fe (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/LaTeXmacros/common.tex

    r342af53 r8e4aa05  
    1111%% Created On       : Sat Apr  9 10:06:17 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Mon Oct  5 09:34:46 2020
    14 %% Update Count     : 464
     13%% Last Modified On : Sun Feb 14 15:52:46 2021
     14%% Update Count     : 524
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    3232\setlist[enumerate]{listparindent=\parindent}% global
    3333\setlist[enumerate,2]{leftmargin=\parindent,labelsep=*,align=parleft,label=\alph*.}% local
    34 \setlist[description]{itemsep=0pt,listparindent=\parindent,leftmargin=\parindent,labelsep=1.5ex}
     34\setlist[description]{topsep=0.5ex,itemsep=0pt,listparindent=\parindent,leftmargin=\parindent,labelsep=1.5ex}
    3535
    3636% Names used in the document.
    3737
    3838\usepackage{xspace}
    39 \newcommand{\CFAIcon}{\textsf{C}\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}\xspace} % Cforall symbolic name
    40 \newcommand{\CFA}{\protect\CFAIcon}             % safe for section/caption
    41 \newcommand{\CFL}{\textrm{Cforall}\xspace} % Cforall symbolic name
    42 \newcommand{\Celeven}{\textrm{C11}\xspace} % C11 symbolic name
    43 \newcommand{\CC}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}\xspace} % C++ symbolic name
    44 \newcommand{\CCeleven}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}11\xspace} % C++11 symbolic name
    45 \newcommand{\CCfourteen}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}14\xspace} % C++14 symbolic name
    46 \newcommand{\CCseventeen}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}17\xspace} % C++17 symbolic name
    47 \newcommand{\CCtwenty}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}20\xspace} % C++20 symbolic name
     39\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
     43\newcommand{\CCIcon}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}} % C++ icon
     44\newcommand{\CC}{\protect\CCIcon\xspace}                        % C++ symbolic name
     45% 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
    4850\newcommand{\Csharp}{C\raisebox{-0.7ex}{\Large$^\sharp$}\xspace} % C# symbolic name
    4951
    5052%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    5153
     54% remove special-character warning in PDF side-bar names
    5255\makeatletter
     56\@ifpackageloaded{hyperref}{
     57  \pdfstringdefDisableCommands{
     58  \def\CFA{\CFL}
     59  \def\Celeven{C11\xspace}
     60  \def\CC{C++\xspace}
     61  \def\CCeleven{C++11\xspace}
     62  \def\CCfourteen{C++14\xspace}
     63  \def\CCseventeen{C++17\xspace}
     64  \def\CCtwenty{C++20\xspace}
     65  \def\Csharp{C\#\xspace}
     66  \def\lstinline{\xspace}% must use {} as delimiters, e.g., \lstinline{...}
     67  }{}
     68}
     69
    5370% parindent is relative, i.e., toggled on/off in environments like itemize, so store the value for
    5471% use rather than use \parident directly.
     
    8198    \vskip 50\p@
    8299  }}
    83 \renewcommand\section{\@startsection{section}{1}{\z@}{-3.5ex \@plus -1ex \@minus -.2ex}{1.75ex \@plus .2ex}{\normalfont\large\bfseries}}
    84 \renewcommand\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex \@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
     100\renewcommand\section{\@startsection{section}{1}{\z@}{-3.0ex \@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}{\normalfont\large\bfseries}}
     101\renewcommand\subsection{\@startsection{subsection}{2}{\z@}{-2.75ex \@plus -1ex \@minus -.2ex}{1.25ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
    85102\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
    86103\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{-2.0ex \@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries}}
     
    89106\newcommand{\italic}[1]{\emph{\hyperpage{#1}}}
    90107\newcommand{\Definition}[1]{\textbf{\hyperpage{#1}}}
    91 \newcommand{\see}[1]{\emph{see}~#1}
     108\newcommand{\see}[1]{(see #1)}
    92109
    93110% Define some commands that produce formatted index entries suitable for cross-references.
     
    129146% The star version does not lowercase the index information, e.g., \newterm*{IBM}.
    130147\newcommand{\newtermFontInline}{\emph}
    131 \newcommand{\newterm}{\@ifstar\@snewterm\@newterm}
     148\newcommand{\newterm}{\protect\@ifstar\@snewterm\@newterm}
    132149\newcommand{\@newterm}[2][\@empty]{\lowercase{\def\temp{#2}}{\newtermFontInline{#2}}\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
    133150\newcommand{\@snewterm}[2][\@empty]{{\newtermFontInline{#2}}\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
     
    229246\usepackage{listings}                                                                   % format program code
    230247\usepackage{lstlang}
     248\usepackage{calc}                                                                               % latex arithmetic
     249
    231250\makeatletter
    232 
    233251\newcommand{\LstBasicStyle}[1]{{\lst@basicstyle{#1}}}
    234252\newcommand{\LstKeywordStyle}[1]{{\lst@basicstyle{\lst@keywordstyle{#1}}}}
    235253\newcommand{\LstCommentStyle}[1]{{\lst@basicstyle{\lst@commentstyle{#1}}}}
     254\newcommand{\LstStringStyle}[1]{{\lst@basicstyle{\lst@stringstyle{#1}}}}
    236255
    237256\newlength{\gcolumnposn}                                % temporary hack because lstlisting does not handle tabs correctly
     
    259278xleftmargin=\parindentlnth,                             % indent code to paragraph indentation
    260279extendedchars=true,                                             % allow ASCII characters in the range 128-255
    261 escapechar=§,                                                   % LaTeX escape in CFA code §...§ (section symbol), emacs: C-q M-'
    262 mathescape=true,                                                % LaTeX math escape in CFA code $...$
     280escapechar=\$,                                                  % LaTeX escape in CFA code §...§ (section symbol), emacs: C-q M-'
     281mathescape=false,                                               % LaTeX math escape in CFA code $...$
    263282keepspaces=true,                                                %
    264283showstringspaces=false,                                 % do not show spaces with cup
    265284showlines=true,                                                 % show blank lines at end of code
    266285aboveskip=4pt,                                                  % spacing above/below code block
    267 belowskip=3pt,
     286belowskip=0pt,
     287numberstyle=\footnotesize\sf,                   % numbering style
    268288% replace/adjust listing characters that look bad in sanserif
    269289literate={-}{\makebox[1ex][c]{\raisebox{0.4ex}{\rule{0.75ex}{0.1ex}}}}1 {^}{\raisebox{0.6ex}{$\scriptscriptstyle\land\,$}}1
     
    274294
    275295\ifdefined\CFALatin% extra Latin-1 escape characters
    276 \lstnewenvironment{cfa}[1][]{
     296\lstnewenvironment{cfa}[1][]{% necessary
    277297\lstset{
    278298language=CFA,
    279 moredelim=**[is][\color{red}]{®}{®},    % red highlighting ®...® (registered trademark symbol) emacs: C-q M-.
    280 moredelim=**[is][\color{blue}]{ß}{ß},   % blue highlighting ß...ß (sharp s symbol) emacs: C-q M-_
    281 moredelim=**[is][\color{OliveGreen}]{¢}{¢}, % green highlighting ¢...¢ (cent symbol) emacs: C-q M-"
    282 moredelim=[is][\lstset{keywords={}}]{¶}{¶}, % keyword escape ¶...¶ (pilcrow symbol) emacs: C-q M-^
    283 % replace/adjust listing characters that look bad in sanserif
    284 add to literate={`}{\ttfamily\upshape\hspace*{-0.1ex}`}1
     299moredelim=**[is][\color{red}]{@}{@},    % red highlighting @...@
     300%moredelim=**[is][\color{red}]{®}{®},   % red highlighting ®...® (registered trademark symbol) emacs: C-q M-.
     301%moredelim=**[is][\color{blue}]{ß}{ß},  % blue highlighting ß...ß (sharp s symbol) emacs: C-q M-_
     302%moredelim=**[is][\color{OliveGreen}]{¢}{¢}, % green highlighting ¢...¢ (cent symbol) emacs: C-q M-"
     303%moredelim=[is][\lstset{keywords={}}]{¶}{¶}, % keyword escape ¶...¶ (pilcrow symbol) emacs: C-q M-^
    285304}% lstset
    286 \lstset{#1}
     305\lstset{#1}% necessary
    287306}{}
    288307% inline code ©...© (copyright symbol) emacs: C-q M-)
    289308\lstMakeShortInline©                                    % single-character for \lstinline
    290309\else% regular ASCI characters
    291 \lstnewenvironment{cfa}[1][]{
     310\lstnewenvironment{cfa}[1][]{% necessary
    292311\lstset{
    293312language=CFA,
    294313escapechar=\$,                                                  % LaTeX escape in CFA code
     314mathescape=false,                                               % LaTeX math escape in CFA code $...$
    295315moredelim=**[is][\color{red}]{@}{@},    % red highlighting @...@
    296316}% lstset
    297 \lstset{#1}
     317\lstset{#1}% necessary
    298318}{}
    299319% inline code @...@ (at symbol)
Note: See TracChangeset for help on using the changeset viewer.