Skip to content

Commit

Permalink
20240513 - latex includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Petersen committed May 13, 2024
1 parent 3ea5791 commit fc94590
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions latex/after_body.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\backmatter
\printindex
14 changes: 14 additions & 0 deletions latex/before_body.tex
Original file line number Diff line number Diff line change
@@ -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}
66 changes: 66 additions & 0 deletions latex/preamble.tex
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fc94590

Please sign in to comment.