Changes in doc/LaTeXmacros/common.tex [1d4580a:5479e63]
- File:
-
- 1 edited
-
doc/LaTeXmacros/common.tex (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/LaTeXmacros/common.tex
r1d4580a r5479e63 11 11 %% Created On : Sat Apr 9 10:06:17 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Sun Aug 14 08:27:29201614 %% Update Count : 2 3113 %% Last Modified On : Tue Jul 12 20:37:57 2016 14 %% Update Count : 206 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 18 17 19 \setlength{\textheight}{9in} 18 20 %\oddsidemargin 0.0in 19 \renewcommand{\topfraction}{0.8} % float must be greater than X of the page before it is forced onto its own page20 \renewcommand{\bottomfraction}{0.8} % float must be greater than X of the page before it is forced onto its own page21 \renewcommand{\topfraction}{0.8} % float must be greater than X of the page before it is forced onto its own page 22 \renewcommand{\bottomfraction}{0.8} % float must be greater than X of the page before it is forced onto its own page 21 23 \renewcommand{\floatpagefraction}{0.8} % float must be greater than X of the page before it is forced onto its own page 22 \renewcommand{\textfraction}{0.0} % the entire page maybe devoted to floats with no text on the page at all23 24 \lefthyphenmin=4 % hyphen only after 4 characters24 \renewcommand{\textfraction}{0.0} % the entire page maybe devoted to floats with no text on the page at all 25 26 \lefthyphenmin=4 25 27 \righthyphenmin=4 26 28 … … 36 38 % Names used in the document. 37 39 38 \newcommand{\CFA}{C$\mathbf\forall$\xspace} % set language symbolic name39 \newcommand{\CFL}{Cforall\xspace} % set language text name40 \newcommand{\CFA}{C$\mathbf\forall$\xspace} % set language symbolic name 41 \newcommand{\CFL}{Cforall\xspace} % set language text name 40 42 \newcommand{\CC}{\rm C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name 41 \newcommand{\CCeleven}{\rm C\kern-.1em\hbox{+\kern-.25em+}11\xspace} % C++11 symbolic name 42 \newcommand{\Celeven}{C11\xspace} % C11 symbolic name 43 \def\c11{ISO/IEC C} % C11 name (cannot have numbers in latex command name) 43 44 44 45 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 50 51 \setlength{\parindentlnth}{\parindent} 51 52 52 \newlength{\gcolumnposn} % temporary hack because lstlisting does handle tabs correctly53 \newlength{\gcolumnposn} 53 54 \newlength{\columnposn} 54 55 \setlength{\gcolumnposn}{2.5in} … … 61 62 %\patchcmd{\lsthk@TextStyle}{\let\lst@DefEsc\@empty}{}{}{\errmessage{failed to patch}} 62 63 63 \usepackage{pslatex} % reduce size of san serif font64 \usepackage{relsize} % must be after change to small or selects old size64 \usepackage{pslatex} % reduce size of san serif font 65 \usepackage{relsize} % must be after change to small or selects old size 65 66 66 67 % reduce size of chapter/section titles … … 118 119 119 120 % inline text and lowercase index: \Index{inline and lowercase index text} 121 % inline text and as-in index: \Index[as-is index text]{inline text} 122 % inline text but index with different as-is text: \Index[index text]{inline text} 120 123 \newcommand{\Index}{\@ifstar\@sIndex\@Index} 121 % inline text and as-in index: \Index[as-is index text]{inline text}122 124 \newcommand{\@Index}[2][\@empty]{\lowercase{\def\temp{#2}}#2\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi} 123 % inline text but index with different as-is text: \Index[index text]{inline text}124 125 \newcommand{\@sIndex}[2][\@empty]{#2\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi} 125 126 126 % inline text and code index (cannot use ©)127 % cannot use © 127 128 \newcommand{\Indexc}[1]{\lstinline$#1$\index{#1@\lstinline$#1$}} 128 % code index (cannot use ©)129 129 \newcommand{\indexc}[1]{\index{#1@\lstinline$#1$}} 130 130 … … 136 136 \newcommand{\@newterm}[2][\@empty]{\lowercase{\def\temp{#2}}{\newtermFontInline{#2}}\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi} 137 137 \newcommand{\@snewterm}[2][\@empty]{{\newtermFontInline{#2}}\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi} 138 139 % Latin abbreviation140 \newcommand{\abbrevFont}{\textit} % set empty for no italics141 \newcommand*{\eg}{%142 \@ifnextchar{,}{\abbrevFont{e}.\abbrevFont{g}.}%143 {\@ifnextchar{:}{\abbrevFont{e}.\abbrevFont{g}.}%144 {\abbrevFont{e}.\abbrevFont{g}.,\xspace}}%145 }%146 \newcommand*{\ie}{%147 \@ifnextchar{,}{\abbrevFont{i}.\abbrevFont{e}.}%148 {\@ifnextchar{:}{\abbrevFont{i}.\abbrevFont{e}.}%149 {\abbrevFont{i}.\abbrevFont{e}.,\xspace}}%150 }%151 \newcommand*{\etc}{%152 \@ifnextchar{.}{\abbrevFont{etc}}%153 {\abbrevFont{etc}.\xspace}%154 }%155 \newcommand{\etal}{%156 \@ifnextchar{.}{\abbrevFont{et~al}}%157 {\abbrevFont{et al}.\xspace}%158 }%159 138 \makeatother 160 139 … … 165 144 \endlist 166 145 }% quote2 167 168 146 \newenvironment{rationale}{% 169 147 \begin{quote2}\noindent$\Box$\enspace … … 209 187 \newcommand{\VPageref}[2][page]{\ifx#1\@empty\else{#1}\nobreakspace\fi\pageref{#2}} 210 188 211 % Go programming language : https://github.com/julienc91/listings-golang/blob/master/listings-golang.sty189 % Go programming language 212 190 \lstdefinelanguage{Golang}{ 213 191 morekeywords=[1]{package,import,func,type,struct,return,defer,panic, recover,select,var,const,iota,},% … … 225 203 } 226 204 227 % CFA programming language, based on ANSI C (with some gcc additions)205 % CFA programming language, based on ANSI C 228 206 \lstdefinelanguage{CFA}[ANSI]{C}{ 229 207 morekeywords={_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto, 230 208 _Bool,catch,catchResume,choose,_Complex,__complex,__complex__,__const,__const__,disable,dtype,enable,__extension__, 231 fallthr ough,fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert,209 fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert, 232 210 _Thread_local,throw,throwResume,trait,try,typeof,__typeof,__typeof__,}, 233 211 }% … … 236 214 language=CFA, 237 215 columns=fullflexible, 238 basicstyle=\linespread{0.9}\sf, % reduce line spacing and use sanserif font239 stringstyle=\tt, % use typewriter font240 tabsize=4, % 4 space tabbing241 xleftmargin=\parindentlnth, % indent code to paragraph indentation242 extendedchars=true, % allow ASCII characters in the range 128-255243 escapechar=§, % escape to latex in CFA code244 mathescape=true, % allow $...$ LaTeX math escapes in code245 %keepspaces=true, % 246 showstringspaces=false, % do not show spaces with cup247 showlines=true, % show blank lines at end of code248 aboveskip=4pt, % spacing above/below code block216 basicstyle=\linespread{0.9}\sf, 217 stringstyle=\tt, 218 tabsize=4, 219 xleftmargin=\parindentlnth, 220 extendedchars=true, 221 escapechar=§, 222 mathescape=true, 223 keepspaces=true, 224 showstringspaces=false, 225 showlines=true, 226 aboveskip=4pt, 249 227 belowskip=3pt, 250 moredelim=**[is][\color{red}]{®}{®}, % red highlighting251 moredelim=**[is][\color{blue}]{ß}{ß}, % blue highlighting228 moredelim=**[is][\color{red}]{®}{®}, % red highlighting 229 moredelim=**[is][\color{blue}]{ß}{ß}, % blue highlighting 252 230 moredelim=**[is][\color{OliveGreen}]{¢}{¢}, % green highlighting 253 231 moredelim=[is][\lstset{keywords={}}]{¶}{¶}, % temporarily turn off keywords … … 255 233 literate={-}{\raisebox{-0.15ex}{\texttt{-}}}1 {^}{\raisebox{0.6ex}{$\scriptscriptstyle\land\,$}}1 256 234 {~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 {_}{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}1 {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1 257 {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 ,235 {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {...}{$\dots$}2, 258 236 }% 259 237 … … 263 241 \renewcommand\thebibliography[1]{ 264 242 \Oldthebibliography{#1} 265 \setlength{\parskip}{0pt} % reduce vertical spacing between references243 \setlength{\parskip}{0pt} % reduce vertical spacing between references 266 244 \setlength{\itemsep}{5pt plus 0.3ex} 267 245 }%
Note:
See TracChangeset
for help on using the changeset viewer.