Skip to content

Commit

Permalink
Tweaks to make latex book
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Jun 25, 2022
1 parent 31eb7c6 commit 27df1a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
2 changes: 0 additions & 2 deletions _output.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ bookdown::bs4_book:
bookdown::pdf_book:
includes:
in_header: latex/preamble.tex
number_sections: false
keep_tex: true
latex_engine: xelatex
citation_package: natbib
template: null
pandoc_args: ["--top-level-division=chapter"]
1 change: 1 addition & 0 deletions index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ twitter-handle: hadley
cover-image: images/cover.png

documentclass: book
classoption: oneside
bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
Expand Down
23 changes: 4 additions & 19 deletions latex/preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
\renewcommand{\figurename}{Figure}
\renewcommand{\tablename}{Table}

\usepackage{framed,color}
\definecolor{shadecolor}{RGB}{242,242,242}

\renewcommand{\textfraction}{0.05}
\renewcommand{\topfraction}{0.8}
\renewcommand{\bottomfraction}{0.8}
Expand Down Expand Up @@ -36,6 +33,10 @@
\usepackage{hyperref}
\let\oldhref\href
\renewcommand{\href}[2]{#2 (\url{#1})}
\urlstyle{tt}

\usepackage{framed,color}
\definecolor{shadecolor}{RGB}{242,242,242}

\makeatletter
\newenvironment{kframe}{%
Expand Down Expand Up @@ -81,19 +82,3 @@
% No widow lines
\widowpenalty=10000
\clubpenalty=10000

\usepackage{makeidx}
\newcommand{\indexc}[1]{\index{#1@\texttt{#1}}}
\makeindex

\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 27df1a9

Please sign in to comment.