1\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} 2\usepackage{geometry} 3\usepackage{xcolor} 4\usepackage{graphicx} 5\usepackage[labelformat=empty]{caption} 6\usepackage{afterpage} 7 8\newcommand\blankpage{% 9 \null 10 \thispagestyle{empty}% 11 \addtocounter{page}{-1}% 12 \newpage} 13 14$if(fontfamily)$ 15\usepackage{$fontfamily$} 16$else$ 17\usepackage{lmodern} 18$endif$ 19$if(linestretch)$ 20\usepackage{setspace} 21\setstretch{$linestretch$} 22$endif$ 23\usepackage{amssymb,amsmath} 24\usepackage{ifxetex,ifluatex} 25\usepackage{fixltx2e} % provides \textsubscript 26\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 27 \usepackage[T1]{fontenc} 28 \usepackage[utf8]{inputenc} 29$if(euro)$ 30 \usepackage{eurosym} 31$endif$ 32\else % if luatex or xelatex 33 \ifxetex 34 \usepackage{mathspec} 35 \usepackage{xltxtra,xunicode} 36 \else 37 \usepackage{fontspec} 38 \fi 39 \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} 40 \newcommand{\euro}{€} 41$if(mainfont)$ 42 \setmainfont{$mainfont$} 43$endif$ 44$if(sansfont)$ 45 \setsansfont{$sansfont$} 46$endif$ 47$if(monofont)$ 48 %\setmonofont[Mapping=tex-ansi]{$monofont$} 49 % custom override 50$endif$ 51 52$if(mathfont)$ 53 \setmathfont(Digits,Latin,Greek){$mathfont$} 54$endif$ 55 56\usepackage{fontspec} 57\setmainfont[Ligatures=Common, 58 ItalicFont={Adobe Garamond Pro Italic}] 59 {Adobe Garamond Pro} 60\setmonofont[Ligatures=NoCommon]{Source Code Pro} 61 62\fi 63% use upquote if available, for straight quotes in verbatim environments 64\IfFileExists{upquote.sty}{\usepackage{upquote}}{} 65% use microtype if available 66\IfFileExists{microtype.sty}{% 67\usepackage{microtype} 68\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 69}{} 70$if(geometry)$ 71\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} 72$endif$ 73$if(lang)$ 74\ifxetex 75 \usepackage{polyglossia} 76 \setmainlanguage{$mainlang$} 77\else 78 \usepackage[shorthands=off,$lang$]{babel} 79\fi 80$endif$ 81$if(natbib)$ 82\usepackage{natbib} 83\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 84$endif$ 85$if(biblatex)$ 86\usepackage{biblatex} 87$if(biblio-files)$ 88\bibliography{$biblio-files$} 89$endif$ 90$endif$ 91$if(listings)$ 92\usepackage{listings} 93$endif$ 94$if(lhs)$ 95\lstnewenvironment{code}{\lstset{language=C++,basicstyle=\small\ttfamily}}{} 96$endif$ 97$if(highlighting-macros)$ 98$highlighting-macros$ 99$endif$ 100$if(verbatim-in-note)$ 101\usepackage{fancyvrb} 102\VerbatimFootnotes 103$endif$ 104$if(tables)$ 105\usepackage{longtable,booktabs} 106$endif$ 107$if(graphics)$ 108\usepackage{graphicx} 109% Redefine \includegraphics so that, unless explicit options are 110% given, the image width will not exceed the width or the height of the page. 111% Images get their normal width if they fit onto the page, but 112% are scaled down if they would overflow the margins. 113\makeatletter 114\def\ScaleWidthIfNeeded{% 115 \ifdim\Gin@nat@width>\linewidth 116 \linewidth 117 \else 118 \Gin@nat@width 119 \fi 120} 121\def\ScaleHeightIfNeeded{% 122 \ifdim\Gin@nat@height>0.9\textheight 123 0.9\textheight 124 \else 125 \Gin@nat@width 126 \fi 127} 128\makeatother 129\setkeys{Gin}{width=\ScaleWidthIfNeeded,height=\ScaleHeightIfNeeded,keepaspectratio}% 130$endif$ 131\ifxetex 132 \usepackage[setpagesize=false, % page size defined by xetex 133 unicode=false, % unicode breaks when used with xetex 134 xetex]{hyperref} 135\else 136 \usepackage[unicode=true]{hyperref} 137\fi 138\hypersetup{breaklinks=true, 139 bookmarks=true, 140 pdfauthor={$author-meta$}, 141 pdftitle={$title-meta$}, 142 colorlinks=true, 143 citecolor=$if(citecolor)$$citecolor$$else$blue$endif$, 144 urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, 145 linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, 146 pdfborder={0 0 0}} 147\urlstyle{same} % don't use monospace font for urls 148$if(links-as-notes)$ 149% Make links footnotes instead of hotlinks: 150\renewcommand{\href}[2]{#2\footnote{\url{#1}}} 151$endif$ 152$if(strikeout)$ 153\usepackage[normalem]{ulem} 154% avoid problems with \sout in headers with hyperref: 155\pdfstringdefDisableCommands{\renewcommand{\sout}{}} 156$endif$ 157\setlength{\parindent}{0pt} 158\setlength{\parskip}{6pt plus 2pt minus 1pt} 159\setlength{\emergencystretch}{3em} % prevent overfull lines 160\providecommand{\tightlist}{% 161 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 162$if(numbersections)$ 163\setcounter{secnumdepth}{5} 164$else$ 165\setcounter{secnumdepth}{0} 166$endif$ 167$if(verbatim-in-note)$ 168\VerbatimFootnotes % allows verbatim text in footnotes 169$endif$ 170 171$if(title)$ 172\title{$title$$if(subtitle)$\\\vspace{0.5em}{\large $subtitle$}$endif$} 173$endif$ 174$if(author)$ 175\author{$for(author)$$author$$sep$ \and $endfor$} 176$endif$ 177\date{$date$} 178$for(header-includes)$ 179$header-includes$ 180$endfor$ 181 182\begin{document} 183$if(title)$ 184% ---------- 185% Title page 186% ---------- 187 188\begin{titlepage} 189 190\definecolor{titlepagecolor}{cmyk}{1,.60,0,.40} 191\definecolor{namecolor}{cmyk}{1,.50,0,.10} 192\newgeometry{left=7.5cm} %defines the geometry for the titlepage 193\pagecolor{titlepagecolor} 194\begin{figure} 195 \centering 196 \includegraphics[width=3.2in]{img/c-plus-plus_logo.eps} 197\end{figure} 198 199\color{white} 200\makebox[0pt][l]{\rule{1.3\textwidth}{1pt}} 201\par 202\noindent 203{\huge \textsf{C++ Insights}} 204\par 205\noindent 206{\textit{\textsf{Some stuff that is good to know}}} 207%\textbf{\textsf{Something}} \textcolor{namecolor}{\textsf{Else}} 208\vfill 209\noindent 210%{\huge \textsf{C++ Insights}} 211\vskip\baselineskip 212\noindent 213{\huge \textsf{Gregory Popovitch}} 214\par 215\textsf{Feb 2019 (Draft)} 216 217\end{titlepage} 218\pagecolor{white} 219\restoregeometry % restores the geometry 220 221% Filler page 222%\null 223%\thispagestyle{empty} 224%\addtocounter{page}{-1} 225%\newpage 226 227% Subtitle page 228%\vfill{3in} 229%\begin{centering} 230%{\HUGE \textsf{C++ Insights}} 231%\end{centering} 232 233%\thispagestyle{empty} 234%\addtocounter{page}{-1} 235%\newpage 236 237% Copyright page 238\thispagestyle{empty} 239\addtocounter{page}{-1} 240 241\begin{minipage}[b]{0.9\textwidth} 242\footnotesize\raggedright 243\setlength{\parskip}{0.5\baselineskip} 244 245\begin{textsf} 246{\textbf{C++ Insights}}\\ 247by Gregory Popovitch 248 249\par 250Copyright \copyright\ 2019. \\ 251\href{http://www.tbd.com}{www.tbd.com} 252 253\par 254(c) copyright 2019, Steven Gregory Popovitch 255\end{textsf} 256\end{minipage} 257\vspace*{2\baselineskip} 258\cleardoublepage 259 260$endif$ 261$if(abstract)$ 262\begin{abstract} 263$abstract$ 264\end{abstract} 265$endif$ 266 267$for(include-before)$ 268$include-before$ 269 270$endfor$ 271$if(toc)$ 272{ 273\hypersetup{linkcolor=black} 274\setcounter{tocdepth}{$toc-depth$} 275\tableofcontents 276} 277\pagebreak 278$endif$ 279$if(lot)$ 280\listoftables 281$endif$ 282$if(lof)$ 283\listoffigures 284$endif$ 285$body$ 286 287$if(natbib)$ 288$if(biblio-files)$ 289$if(biblio-title)$ 290$if(book-class)$ 291\renewcommand\bibname{$biblio-title$} 292$else$ 293\renewcommand\refname{$biblio-title$} 294$endif$ 295$endif$ 296\bibliography{$biblio-files$} 297 298$endif$ 299$endif$ 300$if(biblatex)$ 301\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 302 303$endif$ 304$for(include-after)$ 305$include-after$ 306 307$endfor$ 308\end{document} 309