mirror of
https://github.com/sdiehl/wiwinwlh.git
synced 2024-10-26 20:57:32 +03:00
220 lines
5.0 KiB
Plaintext
220 lines
5.0 KiB
Plaintext
\documentclass[10pt,openright]{$documentclass$}
|
|
\usepackage{geometry}
|
|
\usepackage{resources/dtrt}
|
|
\geometry{
|
|
%a4paper,
|
|
%total={21.59cm,27.94cm},
|
|
%total={21cm,25cm},
|
|
papersize={21cm,25cm},
|
|
top=1.5cm,
|
|
bottom=1.5cm,
|
|
inner=1.91cm,
|
|
outer=6.68cm,
|
|
% For pdf
|
|
left=1.5cm,
|
|
right=1.5cm,
|
|
% For print
|
|
%marginparwidth=4cm,
|
|
%marginparsep=0.8cm
|
|
}
|
|
\usepackage{lmodern}
|
|
\usepackage{xcolor}
|
|
\usepackage{hyperref}
|
|
\hypersetup{%
|
|
colorlinks=false, % hyperlinks will be black
|
|
linkbordercolor=red, % hyperlink borders will be red
|
|
pdfborderstyle={/S/U/W 1} % border style will be underline of width 1pt
|
|
}
|
|
\usepackage{amssymb,amsmath}
|
|
\usepackage{framed}
|
|
\usepackage{fancyvrb}
|
|
\usepackage{fancyhdr}
|
|
|
|
\pagestyle{fancy}
|
|
\fancyhf{}
|
|
\fancyhead[RE,LO]{\leftmark}
|
|
\fancyhead[LE,RO]{\thepage}
|
|
|
|
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{#1}}{}}
|
|
|
|
\usepackage{csvsimple}
|
|
\usepackage{catchfile}
|
|
|
|
% Syntax Higlighting
|
|
\usepackage{listings}
|
|
|
|
\usepackage{resources/haskell}
|
|
|
|
\lstset{
|
|
language=haskell,
|
|
frame=ltb,
|
|
framerule=0pt,
|
|
xleftmargin=15pt,
|
|
framexleftmargin=16pt,
|
|
framextopmargin=25pt,
|
|
framexbottommargin=25pt,
|
|
stepnumber=1,
|
|
numbers=left,
|
|
numbersep=5pt,
|
|
numberstyle=\ttfamily\tiny\color[gray]{0.3},
|
|
belowcaptionskip=\bigskipamount,
|
|
captionpos=b,
|
|
escapeinside={*'}{'*},
|
|
tabsize=2,
|
|
emphstyle={\bf},
|
|
commentstyle=\it,
|
|
stringstyle=\mdseries\rmfamily,
|
|
showspaces=false,
|
|
keywordstyle=\bfseries\rmfamily,
|
|
columns=fullflexible,
|
|
basicstyle=\small\sffamily,
|
|
showstringspaces=false,
|
|
morecomment=[l]\%,
|
|
}
|
|
|
|
\usepackage{etoolbox}
|
|
\makeatletter
|
|
%\patchcmd{\chapter}{\newpage \newpage}{}{}{}
|
|
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage{ifxetex,ifluatex}
|
|
\usepackage{fontspec}
|
|
\setmainfont[Ligatures=Common,
|
|
ItalicFont={Adobe Garamond Pro Italic}]
|
|
{Adobe Garamond Pro}
|
|
\setmonofont[Ligatures=NoCommon, Scale=0.8]{Source Code Pro}
|
|
|
|
\urlstyle{same}
|
|
|
|
$if(tables)$
|
|
\usepackage{longtable,booktabs}
|
|
$endif$
|
|
$if(graphics)$
|
|
\usepackage{graphicx,grffile}
|
|
\makeatletter
|
|
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
|
|
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
|
|
\makeatother
|
|
% Scale images if necessary, so that they will not overflow the page
|
|
% margins by default, and it is still possible to overwrite the defaults
|
|
% using explicit options in \includegraphics[width, height, ...]{}
|
|
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
|
|
$endif$
|
|
$if(links-as-notes)$
|
|
% Make links footnotes instead of hotlinks:
|
|
\renewcommand{\href}[2]{#2\footnote{\url{#1}}}
|
|
$endif$
|
|
$if(strikeout)$
|
|
\usepackage[normalem]{ulem}
|
|
% avoid problems with \sout in headers with hyperref:
|
|
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
|
|
$endif$
|
|
$if(indent)$
|
|
$else$
|
|
\IfFileExists{parskip.sty}{%
|
|
\usepackage{parskip}
|
|
}{% else
|
|
\setlength{\parindent}{0pt}
|
|
\setlength{\parskip}{6pt plus 2pt minus 1pt}
|
|
}
|
|
$endif$
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
|
\providecommand{\tightlist}{%
|
|
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
|
$if(numbersections)$
|
|
\setcounter{secnumdepth}{5}
|
|
$else$
|
|
\setcounter{secnumdepth}{0}
|
|
$endif$
|
|
$if(subparagraph)$
|
|
$else$
|
|
% Redefines (sub)paragraphs to behave more like sections
|
|
\ifx\paragraph\undefined\else
|
|
\let\oldparagraph\paragraph
|
|
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
|
|
\fi
|
|
\ifx\subparagraph\undefined\else
|
|
\let\oldsubparagraph\subparagraph
|
|
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
|
|
\fi
|
|
$endif$
|
|
$if(dir)$
|
|
\ifxetex
|
|
% load bidi as late as possible as it modifies e.g. graphicx
|
|
$if(latex-dir-rtl)$
|
|
\usepackage[RTLdocument]{bidi}
|
|
$else$
|
|
\usepackage{bidi}
|
|
$endif$
|
|
\fi
|
|
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
|
|
\TeXXeTstate=1
|
|
\newcommand{\RL}[1]{\beginR #1\endR}
|
|
\newcommand{\LR}[1]{\beginL #1\endL}
|
|
\newenvironment{RTL}{\beginR}{\endR}
|
|
\newenvironment{LTR}{\beginL}{\endL}
|
|
\fi
|
|
$endif$
|
|
$for(header-includes)$
|
|
$header-includes$
|
|
$endfor$
|
|
|
|
\date{$date$}
|
|
|
|
\begin{document}
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
\begin{titlepage}
|
|
\definecolor{titlepagecolor}{HTML}{FDF6E3}
|
|
\definecolor{namecolor}{cmyk}{1,.50,0,.10}
|
|
\pagecolor{titlepagecolor}
|
|
|
|
\vspace*{\stretch{1.0}}
|
|
\begin{center}
|
|
\Huge\textbf{What I Wish I Knew When Learning Haskell}\\
|
|
\vspace*{\stretch{0.5}}
|
|
\Large\textit{Stephen Diehl}
|
|
\end{center}
|
|
\vspace*{\stretch{2.0}}
|
|
|
|
\begin{figure}
|
|
\centering
|
|
\includegraphics[height=3in,width=3in]{img/cover.ps}
|
|
\end{figure}
|
|
|
|
\end{titlepage}
|
|
\pagecolor{white}
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
\textbf{Date}: \today \\
|
|
\textbf{Git Commit:} \texttt{\input{.git/ORIG_HEAD}}
|
|
|
|
\newpage
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
$for(include-before)$
|
|
$include-before$
|
|
|
|
$endfor$
|
|
$if(toc)$
|
|
{
|
|
$if(colorlinks)$
|
|
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
|
|
$endif$
|
|
\setcounter{tocdepth}{$toc-depth$}
|
|
\tableofcontents
|
|
|
|
\newpage
|
|
|
|
}
|
|
$endif$
|
|
|
|
$body$
|
|
|
|
$for(include-after)$
|
|
$include-after$
|
|
$endfor$
|
|
|
|
\end{document}
|