Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/LaTeXmacros/common.tex

    re94eeb9 r2b878b4  
    1111%% Created On       : Sat Apr  9 10:06:17 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Sun Feb 14 15:52:46 2021
    14 %% Update Count     : 524
     13%% Last Modified On : Thu Jan 28 19:01:57 2021
     14%% Update Count     : 494
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    3737
    3838\usepackage{xspace}
    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
     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
    5048\newcommand{\Csharp}{C\raisebox{-0.7ex}{\Large$^\sharp$}\xspace} % C# symbolic name
    5149
    5250%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    5351
    54 % remove special-character warning in PDF side-bar names
    5552\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 
    7053% parindent is relative, i.e., toggled on/off in environments like itemize, so store the value for
    7154% use rather than use \parident directly.
     
    9881    \vskip 50\p@
    9982  }}
    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}}
     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}}
    10285\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
    10386\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{-2.0ex \@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries}}
     
    146129% The star version does not lowercase the index information, e.g., \newterm*{IBM}.
    147130\newcommand{\newtermFontInline}{\emph}
    148 \newcommand{\newterm}{\protect\@ifstar\@snewterm\@newterm}
     131\newcommand{\newterm}{\@ifstar\@snewterm\@newterm}
    149132\newcommand{\@newterm}[2][\@empty]{\lowercase{\def\temp{#2}}{\newtermFontInline{#2}}\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
    150133\newcommand{\@snewterm}[2][\@empty]{{\newtermFontInline{#2}}\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
     
    252235\newcommand{\LstKeywordStyle}[1]{{\lst@basicstyle{\lst@keywordstyle{#1}}}}
    253236\newcommand{\LstCommentStyle}[1]{{\lst@basicstyle{\lst@commentstyle{#1}}}}
    254 \newcommand{\LstStringStyle}[1]{{\lst@basicstyle{\lst@stringstyle{#1}}}}
    255237
    256238\newlength{\gcolumnposn}                                % temporary hack because lstlisting does not handle tabs correctly
     
    278260xleftmargin=\parindentlnth,                             % indent code to paragraph indentation
    279261extendedchars=true,                                             % allow ASCII characters in the range 128-255
    280 escapechar=\$,                                                  % LaTeX escape in CFA code §...§ (section symbol), emacs: C-q M-'
    281 mathescape=false,                                               % LaTeX math escape in CFA code $...$
     262escapechar=§,                                                   % LaTeX escape in CFA code §...§ (section symbol), emacs: C-q M-'
     263mathescape=true,                                                % LaTeX math escape in CFA code $...$
    282264keepspaces=true,                                                %
    283265showstringspaces=false,                                 % do not show spaces with cup
    284266showlines=true,                                                 % show blank lines at end of code
    285267aboveskip=4pt,                                                  % spacing above/below code block
    286 belowskip=0pt,
     268belowskip=-2pt,
    287269numberstyle=\footnotesize\sf,                   % numbering style
    288270% replace/adjust listing characters that look bad in sanserif
     
    294276
    295277\ifdefined\CFALatin% extra Latin-1 escape characters
    296 \lstnewenvironment{cfa}[1][]{% necessary
     278\lstnewenvironment{cfa}[1][]{
    297279\lstset{
    298280language=CFA,
    299 moredelim=**[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-^
     281moredelim=**[is][\color{red}]{®}{®},    % red highlighting ®...® (registered trademark symbol) emacs: C-q M-.
     282moredelim=**[is][\color{blue}]{ß}{ß},   % blue highlighting ß...ß (sharp s symbol) emacs: C-q M-_
     283moredelim=**[is][\color{OliveGreen}]{¢}{¢}, % green highlighting ¢...¢ (cent symbol) emacs: C-q M-"
     284moredelim=[is][\lstset{keywords={}}]{¶}{¶}, % keyword escape ¶...¶ (pilcrow symbol) emacs: C-q M-^
     285% replace/adjust listing characters that look bad in sanserif
     286add to literate={`}{\ttfamily\upshape\hspace*{-0.1ex}`}1
    304287}% lstset
    305 \lstset{#1}% necessary
     288\lstset{#1}
    306289}{}
    307290% inline code ©...© (copyright symbol) emacs: C-q M-)
    308291\lstMakeShortInline©                                    % single-character for \lstinline
    309292\else% regular ASCI characters
    310 \lstnewenvironment{cfa}[1][]{% necessary
     293\lstnewenvironment{cfa}[1][]{
    311294\lstset{
    312295language=CFA,
     
    315298moredelim=**[is][\color{red}]{@}{@},    % red highlighting @...@
    316299}% lstset
    317 \lstset{#1}% necessary
     300\lstset{#1}
    318301}{}
    319302% inline code @...@ (at symbol)
Note: See TracChangeset for help on using the changeset viewer.