% This is a generated file. Do not edit. % Page size % These settings are optimized for ebooks. % If you want different settings, override them in custom.sty. \setlength{\oddsidemargin}{.25in} \setlength{\evensidemargin}{.25in} \setlength{\textheight}{8in} \setlength{\textwidth}{6.25in} \setlength{\topmargin}{0in} % Font encodings \usepackage[T1]{fontenc} % Be able to include book covers \usepackage{pdfpages} % Be able to define colors \usepackage{xcolor} % Include graphics \usepackage{graphicx} \def\maxwidth#1{\ifdim\Gin@nat@width>#1 #1\else\Gin@nat@width\fi} % Commands included by PolyTeXnic \usepackage{polytexnic_commands} % Syntax highlighting \usepackage{pygments} % American Mathematical Society extensions \usepackage{amsmath} \usepackage{amsfonts} % 'Verbatim' environment \usepackage{fancyvrb} % Be able to resize text relative to other text \usepackage{relsize} % Configure hyperref footnotes \usepackage[hyperfootnotes=false]{hyperref} \hypersetup{hyperfootnotes=false} % Support longtable environment. \usepackage{longtable} % Support strikethrough (via \sout{text}) \usepackage[normalem]{ulem} % Configure fonts \renewcommand{\rmdefault}{ptm} \usepackage{courier} \normalfont % in case the EC fonts aren't available % Links \definecolor{darkblue}{rgb}{0,0.18,0.45} \definecolor{darkgreen}{rgb}{0,0.39,0} % Bizarrely, we need to define the ALL CAPS version of DARKGREEN to account % for some edge cases, whose nature remains myterious. \definecolor{DARKGREEN}{rgb}{0,0.39,0} \hypersetup{colorlinks,linkcolor=darkblue,urlcolor=blue} % Code environments \DefineVerbatimEnvironment% {code}{Verbatim}{fontsize=\relsize{-2.5},fontseries=b} % The metacode environment exists solely to allow meta-discussion of the code % environment, as in % %= lang:latex % \begin{metacode} % %= lang:ruby % \begin{code} % def foo % "bar" % end % \end{code} % \end{metacode} \DefineVerbatimEnvironment% {metacode}{Verbatim}{fontsize=\relsize{-2.5},fontseries=b} % Use a nice font in code environments. \usepackage[scaled=0.92]{helvet} % Fix quotes in code environments \usepackage{upquote} % Filesystem paths \newcommand{\filepath}[1]{\texttt{\small #1}} % Size-constrained images \newcommand{\image}[1]{\begin{center}\includegraphics[width=\maxwidth{0.95\textwidth}]{#1}\end{center}} \newcommand{\imagebox}[1]{\begin{center}\fbox{\includegraphics[width=\maxwidth{0.95\textwidth}]{#1}}\end{center}} \newenvironment{framed_shaded}{% \def\FrameCommand##1{\hskip\@totalleftmargin \fcolorbox{boxcolor}{shadecolor}{##1}% % There is no \@totalrightmargin, so: \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}% \MakeFramed {\advance\hsize-\width \@totalleftmargin\z@ \linewidth\hsize \advance\labelsep\fboxsep \@setminipage\vspace{0.3em}}% }{\vspace{-0.6em}\par\unskip\@minipagefalse\endMakeFramed} \newenvironment{full_framed_shaded}{% \def\FrameCommand{\fboxsep=\FrameSep\fcolorbox{boxcolor}{shadecolor}}% \MakeFramed {\advance\hsize\width \FrameRestore}}% {\endMakeFramed} \newenvironment{container}{% \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep \colorbox{white}{##1}\hskip-\fboxsep % There is no \@totalrightmargin, so: \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}% \MakeFramed {\advance\hsize-\width \@totalleftmargin\z@ \linewidth\hsize \@setminipage}% }{\par\unskip\@minipagefalse\endMakeFramed} % Codelistings \newcounter{codelisting} \numberwithin{codelisting}{chapter} \newenvironment{codelisting}{\refstepcounter{codelisting}\begin{framed_shaded}\vspace{-0.5em}}% {\end{framed_shaded}} % Codelisting captions \usepackage{caption} \DeclareCaptionFormat{listing}{\hspace{-0.2em}\colorbox[gray]{.85}{\hspace{0.1em}\parbox{0.997\textwidth}{#1#2#3}}\vspace{-1.3\baselineskip}} \captionsetup[listing]{format=listing,labelfont=bf,skip=16pt} \DeclareCaptionType{listing} \newcommand{\codecaption}[1]{\captionof{listing}{#1}} % Aside boxes \usepackage{amsthm} \theoremstyle{definition} \newtheorem{aside}{Box}[chapter] \usepackage{framed} \definecolor{shadecolor}{gray}{0.97} \definecolor{boxcolor}{gray}{0.10} \newenvironment{shaded_aside}[2]{\begin{full_framed_shaded}\begin{aside}\label{#2} \textbf{#1}\end{aside}}{\bigskip\end{full_framed_shaded}} % Additional commands \newcommand{\heading}[1]{\textbf{#1}} \newcommand{\kode}[1]{\textcolor{darkgreen}{\textbf{\texttt{#1}}}} % Add custom commands \usepackage{custom}