Changes in doc/LaTeXmacros/common.tex [9724df0:b52d900]
- File:
-
- 1 edited
-
doc/LaTeXmacros/common.tex (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/LaTeXmacros/common.tex
r9724df0 rb52d900 11 11 %% Created On : Sat Apr 9 10:06:17 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Mon Jun 20 09:35:20201614 %% Update Count : 1 7813 %% Last Modified On : Sat Apr 9 10:06:39 2016 14 %% Update Count : 1 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 17 17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 18 18 19 \setlength{\textheight}{9in}20 %\oddsidemargin 0.0in21 \renewcommand{\topfraction}{0.8} % float must be greater than X of the page before it is forced onto its own page22 \renewcommand{\bottomfraction}{0.8} % float must be greater than X of the page before it is forced onto its own page23 \renewcommand{\floatpagefraction}{0.8} % float must be greater than X of the page before it is forced onto its own page24 \renewcommand{\textfraction}{0.0} % the entire page maybe devoted to floats with no text on the page at all25 26 \lefthyphenmin=427 \righthyphenmin=428 29 \usepackage{pslatex} % reduce size of san serif font30 31 \usepackage[ignoredisplayed]{enumitem} % do not affect trivlist32 \setlist{labelsep=1ex}% global33 \setlist[itemize]{topsep=0.5ex,parsep=0.25ex,itemsep=0.25ex,listparindent=\parindent,leftmargin=\parindent}% global34 \setlist[itemize,1]{label=\textbullet}% local35 %\renewcommand{\labelitemi}{{\raisebox{0.25ex}{\footnotesize$\bullet$}}}36 \setlist[enumerate]{listparindent=\parindent}% global37 \setlist[enumerate,2]{leftmargin=\parindent,labelsep=*,align=parleft,label=\alph*.}% local38 \setlist[description]{listparindent=\parindent,leftmargin=\parindent,labelsep=*}39 40 19 % Names used in the document. 41 20 42 \newcommand{\CFA}{C$\mathbf\forall$\xspace} % set language symbolic name43 \newcommand{\CFL}{Cforall\xspace} % set language text name44 \newcommand{\CC}{ \rmC\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name21 \newcommand{\CFA}{C$\mathbf\forall$\xspace} % set language symbolic name 22 \newcommand{\CFL}{Cforall\xspace} % set language text name 23 \newcommand{\CC}{C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name 45 24 \def\c11{ISO/IEC C} % C11 name (cannot have numbers in latex command name) 46 25 … … 48 27 49 28 \makeatletter 50 % parindent is relative, i.e., toggled on/off in environments like itemize, so store the value for51 % use rather than use \parident directly.52 \newlength{\parindentlnth}53 \setlength{\parindentlnth}{\parindent}54 55 29 % allow escape sequence in lstinline 56 30 %\usepackage{etoolbox} 57 31 %\patchcmd{\lsthk@TextStyle}{\let\lst@DefEsc\@empty}{}{}{\errmessage{failed to patch}} 58 32 59 \usepackage{pslatex} % reduce size of san serif font 60 \usepackage{relsize} % must be after change to small or selects old size 33 % make fontsize "small" slightly larger, specifically for san serif (helvetica) in program code 34 \renewcommand\small{% 35 \@setfontsize\small{8.5}{11}% 36 \abovedisplayskip 8.5pt \@plus 3pt \@minus 4pt 37 \abovedisplayshortskip \z@ \@plus 2pt 38 \belowdisplayshortskip 4pt \@plus 2pt \@minus 2pt 39 \def\@listi{\leftmargin\leftmargini 40 \topsep 4pt \@plus 2pt \@minus 2pt 41 \parsep 2pt \@pluspt \@minuspt 42 \itemsep \parsep}% 43 \belowdisplayskip \abovedisplayskip 44 } 45 \usepackage{relsize} % must be after change to small or selects old size 61 46 62 47 % reduce size of chapter/section titles … … 81 66 \vskip 50\p@ 82 67 }} 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}}68 \renewcommand\section{\@startsection{section}{1}{\z@}{-3.0ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\large\bfseries}} 69 \renewcommand\subsection{\@startsection{subsection}{2}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}} 85 70 \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}} 86 71 \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{-2.0ex \@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries}} … … 90 75 \newcommand{\definition}[1]{\textbf{\hyperpage{#1}}} 91 76 \newcommand{\see}[1]{\emph{see} #1} 77 78 % reduce bullet size and spacing for "itemize" macro 79 \renewcommand{\labelitemi}{{\raisebox{0.25ex}{\footnotesize$\bullet$}}} 80 \renewenvironment{itemize}{\begin{list}{\labelitemi}{\topsep=5pt\itemsep=5pt\parsep=0pt}}{\end{list}} 92 81 93 82 % Define some commands that produce formatted index entries suitable for cross-references. … … 120 109 \newcommand{\@sIndex}[2][\@empty]{#2\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi} 121 110 122 \newcommand{\Indexc}[1]{\lstinline$#1$\index{#1@\lstinline$#1$}}123 \newcommand{\indexc}[1]{\index{#1@\lstinline$#1$}}124 125 111 \newcommand{\newtermFontInline}{\emph} 126 112 \newcommand{\newterm}{\@ifstar\@snewterm\@newterm} … … 130 116 131 117 \newenvironment{quote2}{% 132 \list{}{\lstset{resetmargins=true ,aboveskip=0pt,belowskip=0pt}\topsep=4pt\parsep=0pt\leftmargin=\parindent\rightmargin\leftmargin}%118 \list{}{\lstset{resetmargins=true}\leftmargin=\parindent\rightmargin\leftmargin}% 133 119 \item\relax 134 120 }{% … … 136 122 }% quote2 137 123 \newenvironment{rationale}{% 138 \begin{quot e2}\noindent$\Box$\enspace124 \begin{quotation}\noindent$\Box$\enspace 139 125 }{% 140 \hfill\enspace$\Box$\end{quot e2}126 \hfill\enspace$\Box$\end{quotation} 141 127 }% 142 128 143 129 % blocks and titles 144 130 \newcommand{\define}[1]{\emph{#1\/}\index{#1}} 131 \newcommand{\rewrite}{\(\Rightarrow\)} 145 132 \newcommand{\rewriterules}{\paragraph{Rewrite Rules}~\par\noindent} 146 133 \newcommand{\examples}{\paragraph{Examples}~\par\noindent} … … 150 137 151 138 % BNF macros 152 \newenvironment{syntax}{ 153 \paragraph{Syntax} 154 \begin{quote2} 155 \begin{description}[noitemsep,leftmargin=\parindentlnth] 156 }{ 157 \end{description} 158 \end{quote2} 159 } 160 % \def\syntax{\paragraph{Syntax}\trivlist\parindent=.5in\item[\hskip.5in]} 161 %\let\endsyntax=\endtrivlist 162 \newcommand{\lhs}[1]{\item[\emph{#1:}\index{#1@{\emph{#1}}|italic}]~\ignorespaces} 163 \newcommand{\oldlhs}[1]{\item[\emph{#1:}\index{#1@{\emph{#1}}|italic}~\dots]~} 164 \newcommand{\rhs}{\hfil\newline} 165 \newcommand{\nonterm}[1]{\emph{#1}\index{#1@{\emph{#1}}|italic}} 139 \def\syntax{\paragraph{Syntax}\trivlist\parindent=.5in\item[\hskip.5in]} 140 \let\endsyntax=\endtrivlist 141 \newcommand{\lhs}[1]{\par{\emph{#1:}}\index{#1@{\emph{#1}}|italic}} 142 \newcommand{\rhs}{\hfil\break\hbox{\hskip1in}} 143 \newcommand{\oldlhs}[1]{\emph{#1: \ldots}\index{#1@{\emph{#1}}|italic}} 144 \newcommand{\nonterm}[1]{\emph{#1\/}\index{#1@{\emph{#1}}|italic}} 166 145 \newcommand{\opt}{$_{opt}$\ } 167 146 … … 200 179 fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert, 201 180 _Thread_local,throw,throwResume,trait,try,typeof,__typeof,__typeof__,}, 181 moredelim=**[is][\color{red}]{`}{`}, % red highlighting of program text 202 182 }% 203 183 … … 205 185 language=CFA, 206 186 columns=flexible, 207 basicstyle=\linespread{0.9}\sf, 208 stringstyle=\tt, 187 basicstyle=\sf\relsize{-1}, 209 188 tabsize=4, 210 xleftmargin=\parindentlnth, 211 extendedchars=true, 212 escapechar=§, 189 xleftmargin=\parindent, 190 escapechar=@, 213 191 mathescape=true, 214 192 keepspaces=true, 215 193 showstringspaces=false, 216 194 showlines=true, 217 aboveskip=4pt, 218 belowskip=3pt, 219 moredelim=**[is][\color{red}]{®}{®}, % red highlighting 220 moredelim=**[is][\color{blue}]{ß}{ß}, % blue highlighting 221 moredelim=**[is][\color{OliveGreen}]{¢}{¢}, % green highlighting 222 moredelim=[is][\lstset{keywords={}}]{¶}{¶}, % temporarily turn off keywords 223 % replace/adjust listing characters that look bad in sanserif 224 literate={-}{\raisebox{-0.15ex}{\texttt{-}}}1 {^}{\raisebox{0.6ex}{$\scriptscriptstyle\land\,$}}1 225 {~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 {_}{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}1 {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1 226 {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {...}{$\dots$}2, 195 aboveskip=6pt, 196 belowskip=4pt, 197 literate={\\`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}1, % escape \`, otherwise used for red highlighting 227 198 }% 228 199 229 \lstMakeShortInline© % single-character for \lstinline 200 \makeatletter 201 % replace/adjust listings characters that look bad in sanserif 202 \lst@CCPutMacro 203 \lst@ProcessOther{"22}{\lst@ttfamily{"}{\raisebox{0.3ex}{\ttfamily\upshape "}}} % replace double quote 204 \lst@ProcessOther{"27}{\lst@ttfamily{'}{\raisebox{0.3ex}{\ttfamily\upshape '\hspace*{-2pt}}}} % replace single quote 205 \lst@ProcessOther{"2D}{\lst@ttfamily{-}{\ttfamily\upshape -}} % replace minus 206 \lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than 207 \lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than 208 \lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % replace circumflex 209 \lst@ProcessOther{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore 210 \lst@ProcessOther{"60}{\lst@ttfamily{`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}} % replace backquote 211 \lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % replace tilde 212 %\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde 213 \@empty\z@\@empty % NECESSARY DO NOT REMOVE 214 \makeatother 230 215 231 216 % Local Variables: %
Note:
See TracChangeset
for help on using the changeset viewer.