aboutsummaryrefslogtreecommitdiff
path: root/structure/00-header.tex
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-06-06 08:17:18 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-06-06 08:17:18 -0300
commit515bdd658d91020c73f82b70ff001015b359adc0 (patch)
treee7c62578e2ef61bf7c9a46de91d92d37620553fe /structure/00-header.tex
downloadbookup-515bdd658d91020c73f82b70ff001015b359adc0.tar.gz
bookup-515bdd658d91020c73f82b70ff001015b359adc0.tar.bz2
Initial import
Diffstat (limited to 'structure/00-header.tex')
-rw-r--r--structure/00-header.tex81
1 files changed, 81 insertions, 0 deletions
diff --git a/structure/00-header.tex b/structure/00-header.tex
new file mode 100644
index 0000000..48b7150
--- /dev/null
+++ b/structure/00-header.tex
@@ -0,0 +1,81 @@
+% Bookdown LaTeX header file
+
+% Inclusion of external PDF documents (such as a cover image)
+% See https://www.ctan.org/pkg/pdfpages
+\usepackage{pdfpages}
+
+% To properly handle URLs in bibliographies
+% See https://tex.stackexchange.com/questions/484176/biblatex-overflowing-url
+\usepackage{xurl}
+
+% PDF bookmarks
+% See https://ctan.org/pkg/bookmark
+% https://texdoc.org/serve/bookmark.pdf/0
+\usepackage[depth=2]{bookmark}
+
+% Indexing
+% See https://en.wikibooks.org/wiki/LaTeX/Indexing
+% https://www.ctan.org/pkg/makeidx
+% https://bookdown.org/yihui/bookdown/latex-index.html
+%\usepackage{imakeidx}
+\usepackage{makeidx}
+\makeindex
+
+% No matter what is said in the docs, this was required
+% But maybe because tufte::tufte_book was being used instead of bookdown::tufte_book2
+% So perhaps this is not needed anymore
+% See https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html#theorems
+% https://ctan.math.illinois.edu/macros/latex/contrib/thmtools/doc/thmtools-manual.pdf
+\usepackage{amsthm,thmtools}
+
+% Bookdown docs recommends to not mess with this
+% See https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html#theorems
+%\newtheorem{definition}{Definição}[chapter]
+%\newtheorem{hiphotesis}{Hipótese}[chapter]
+%\newtheorem{conjecture}{Conjectura}[chapter]
+%\newtheorem{demonstration}{Demonstração}[chapter]
+%\newtheorem{etimology}{Etimologia}[chapter]
+
+% Fix positions of margin notes
+% See https://ctan.org/pkg/marginfix
+% https://tex.stackexchange.com/questions/119726/horizontal-margins-for-margin-notes-in-the-tufte-classes
+% https://tex.stackexchange.com/questions/624033/long-sidenotes-break-marginfix-or-how-to-make-breakable-sidenotes
+\usepackage{marginfix}
+
+% Workaround to theorems work correctly
+% Maybe this is not needed anymore
+% See https://stackoverflow.com/questions/46942352/r-bookdown-document-with-theorem-does-not-render-when-output-file-is-specified
+\let\BeginKnitrBlock\begin \let\EndKnitrBlock\end
+
+% Set page size
+%
+% This command conflicts with something and gives an error
+%\usepackage[paperwidth=6in, paperheight=9in]{geometry}
+%
+% This command needs tuning for the margins
+%\newgeometry{paperwidth=6in, paperheight=9in}
+%
+% This also needs tuning
+% See https://tex.stackexchange.com/questions/201893/change-paper-size-in-tufte-book-class#380699
+%\newgeometry{
+% % showframe,
+% paperwidth=6in,
+% paperheight=9in,
+% left=0.55in,
+% right=0.45in,
+% top=.5in,
+% bottom=.5in,
+% marginparsep=0.25in,
+% marginparwidth=0.65in,
+% includemp,
+% includehead,
+% % The text width and height are calculated automatically.
+%}
+%
+% This should work, but we're setting this at 00-header.md
+%\newgeometry{b5paper}
+
+% Coverpage and copyright notice before title in R bookdown
+% See https://stackoverflow.com/questions/45963505/coverpage-and-copyright-notice-before-title-in-r-bookdown
+\let\oldmaketitle\maketitle
+\AtBeginDocument{\let\maketitle\relax}