diff --git a/_quarto.yml b/_quarto.yml index 33e7a6032..42d9a3edb 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -58,6 +58,9 @@ format: date-meta: today pdf: documentclass: krantz + include-in-header: latex/preamble.tex + include-before-body: latex/before_body.tex + include-after-body: latex/after_body.tex keep-tex: true epub: cover-image: cover.png diff --git a/latex/after_body.tex b/latex/after_body.tex new file mode 100644 index 000000000..72a0faaba --- /dev/null +++ b/latex/after_body.tex @@ -0,0 +1,2 @@ +\backmatter +\printindex diff --git a/latex/before_body.tex b/latex/before_body.tex new file mode 100644 index 000000000..aed903048 --- /dev/null +++ b/latex/before_body.tex @@ -0,0 +1,14 @@ +% you may need to leave a few empty pages before the dedication page + +%\cleardoublepage\newpage\thispagestyle{empty}\null +%\cleardoublepage\newpage\thispagestyle{empty}\null +%\cleardoublepage\newpage +\thispagestyle{empty} + +\begin{center} +To our daughter, Maisie. +%\includegraphics{images/dedication.pdf} +\end{center} + +\setlength{\abovedisplayskip}{-5pt} +\setlength{\abovedisplayshortskip}{-5pt} diff --git a/latex/preamble.tex b/latex/preamble.tex new file mode 100644 index 000000000..c8afa330b --- /dev/null +++ b/latex/preamble.tex @@ -0,0 +1,66 @@ +\usepackage{booktabs} +\usepackage{longtable} +\usepackage[bf,singlelinecheck=off]{caption} +\captionsetup[table]{labelsep=space} +\captionsetup[figure]{labelsep=space} +\usepackage[scale=.8]{sourcecodepro} + +\usepackage{framed,color} +\definecolor{shadecolor}{RGB}{248,248,248} + +\renewcommand{\textfraction}{0.05} +\renewcommand{\topfraction}{0.8} +\renewcommand{\bottomfraction}{0.8} +\renewcommand{\floatpagefraction}{0.75} + +\renewenvironment{quote}{\begin{VF}}{\end{VF}} +\usepackage[pagebackref=true]{hyperref} +\renewcommand*\backref[1]{\ifx#1\relax \else (Cited on #1) \fi} +\let\oldhref\href +\renewcommand{\href}[2]{#2\footnote{\url{#1}}} + +\makeatletter +\newenvironment{kframe}{% +\medskip{} +\setlength{\fboxsep}{.8em} + \def\at@end@of@kframe{}% + \ifinner\ifhmode% + \def\at@end@of@kframe{\end{minipage}}% + \begin{minipage}{\columnwidth}% + \fi\fi% + \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep + \colorbox{shadecolor}{##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\endMakeFramed% + \at@end@of@kframe} +\makeatother + +\renewenvironment{Shaded}{\begin{kframe}}{\end{kframe}} + +\usepackage{makeidx} +\makeindex + +% to create a "see also" that appears at the bottom of the +% subentries and with no page number, do the following: +% \index{Main entry!zzzzz@\igobble|seealso{Other item}} + +\newcommand{\ii}[1]{{\it #1}} +\newcommand{\nn}[1]{#1n} + +\def\igobble#1{} + +\urlstyle{tt} + +\usepackage{amsthm} +\makeatletter +\def\thm@space@setup{% + \thm@preskip=8pt plus 2pt minus 4pt + \thm@postskip=\thm@preskip +} +\makeatother + +\frontmatter