| 1 |
\documentclass{caesar_book} |
| 2 |
% |
| 3 |
% !BIB TS-program = biber |
| 4 |
% |
| 5 |
% -- use dummy graphics |
| 6 |
\usepackage{mwe} |
| 7 |
|
| 8 |
%auto generate the bib file |
| 9 |
\usepackage{filecontents} |
| 10 |
% |
| 11 |
\begin{filecontents}{\jobname.bib} |
| 12 |
@book{Tufte2006, |
| 13 |
author = {Edward R. Tufte}, |
| 14 |
title = {Beautiful Evidence}, |
| 15 |
year = {2006}, |
| 16 |
publisher = {Graphics Press, {LLC}}, |
| 17 |
isbn = {0-9613921-7-7} |
| 18 |
} |
| 19 |
|
| 20 |
@book{Tufte1990, |
| 21 |
author = {Edward R. Tufte}, |
| 22 |
title = {Envisioning Information}, |
| 23 |
publisher = {Graphics Press}, |
| 24 |
year = {1990}, |
| 25 |
isbn = {0-9613921-1-8} |
| 26 |
} |
| 27 |
\end{filecontents} |
| 28 |
|
| 29 |
% -- language: English -- |
| 30 |
% |
| 31 |
\usepackage{csquotes} |
| 32 |
\usepackage[english]{babel} |
| 33 |
% -- biblatex -- |
| 34 |
\usepackage[backend=biber,style=philosophy-classic]{biblatex} % xxx |
| 35 |
% the .bib file with the references |
| 36 |
\addbibresource{\jobname.bib} |
| 37 |
|
| 38 |
% Information about the book |
| 39 |
% to be put on the title page |
| 40 |
\title{Caesar Quick start} |
| 41 |
\author{Andy Thomas} |
| 42 |
\publisher{Bielefeld University} |
| 43 |
|
| 44 |
\begin{document} |
| 45 |
% no page numbering in front matter |
| 46 |
\frontmatter |
| 47 |
% generate the title page |
| 48 |
\maketitlepage |
| 49 |
% show the table of contents |
| 50 |
\tableofcontents |
| 51 |
% start to number the pages |
| 52 |
\mainmatter |
| 53 |
% The first chapter with annotation and citations |
| 54 |
\chapter{Quick start} |
| 55 |
% |
| 56 |
We compiled a minimal example file to show the basic use of the caesar class, which allows the typesetting of (science) textbooks or theses. The class itself is a reference implementation of the \emph{sidenotes} package. The package provides the additional functionality\sidenote{namely the use of marginal material such as this note or even figures or tables.} and the class gives sensible default values for page margins, chapter formatting and such. The caesar class is derived from the standard \LaTeX-book class and a little bit of experience with the standard class might be very helpful. In this example, biblatex is used for the references. |
| 57 |
|
| 58 |
The first pages of the book (the frontmatter) are not numbered, the numbering starts after the \texttt{mainmatter} macro, which is called after the generation of the title page. The layout has ample margins to allow annotations. A main feature and the package is the sidenote, which is a footnote in the margin and can be placed with the \texttt{sidenote} macro.\sidenote{All information is on the same page, no turning of pages is necessary.} It is very similar to \texttt{footnote} and tries to emulate its behavior. The sidenote moves up or down (floats) to not overlap with other floats in the margin and all the sidenotes are subsequently numbered. |
| 59 |
|
| 60 |
References can be put in the margin as well.\sidecite[For the ideas behind all this, please see:][ and more work by Tufte.]{Tufte1990,Tufte2006} The macro was named \texttt{sidecite} and is defined with two optional parameters (prefix and postfix) similar to \texttt{cite} taken from the biblatex package. The next two sections describe the different options for the use of figures and tables in a document. We start with a couple of figures. |
| 61 |
% A section with a couple of figures |
| 62 |
\section{Figures} |
| 63 |
% |
| 64 |
\begin{marginfigure}% |
| 65 |
\includegraphics[width=\marginparwidth]{example-image-a}% |
| 66 |
\caption{A small rectangle put in the margin.\label{rectangle}}% |
| 67 |
\end{marginfigure}% |
| 68 |
% |
| 69 |
There are three basic options to include figures in a document. The first option is a small figure and its caption in the margin. Figure \ref{rectangle} shows that with a gray rectangle framing the letter \emph{A}. We simply use the \texttt{marginfigure} environment instead of the \texttt{figure} one. |
| 70 |
|
| 71 |
The next alternative is a figure in the text frame. The figure is placed using the regular \LaTeX-figure environment and its caption, which is displayed in figure~\ref{rectangle2}. |
| 72 |
% |
| 73 |
\begin{figure}[htbp]% |
| 74 |
\includegraphics[height=180pt,width=\textwidth]{example-image-b}% |
| 75 |
\caption{A larger rectangle in the main area of the text, i.e.\ it does not span into the margin.}% |
| 76 |
\label{rectangle2}% |
| 77 |
\end{figure}% |
| 78 |
% |
| 79 |
|
| 80 |
In case that a wider figure is needed, the third option spans over the text as well as the margin area. Here, the common \texttt{figure*} environment can be used. The figure options make it easy to choose the appropriate size for a given input file. |
| 81 |
% |
| 82 |
\begin{figure*}[htbp] |
| 83 |
\includegraphics[height=180pt,width=400pt]{example-image-c}% |
| 84 |
\caption{An even larger rectangle. This is the widest figure option. Both, the text as well as the margin width are used for the diagram.} |
| 85 |
\label{rectangle3} |
| 86 |
\end{figure*} |
| 87 |
% |
| 88 |
|
| 89 |
% Next section with a variety of tables |
| 90 |
\section{Tables} |
| 91 |
The same set of options (small, normal and wide) are also available for tables. The first option is a small table in the margin, this \texttt{margintable} is shown in table \ref{table1}. |
| 92 |
% |
| 93 |
\begin{margintable}% |
| 94 |
\begin{tabular}{lll}% |
| 95 |
A&B&C\\% |
| 96 |
0.50&0.47&0.48\\% |
| 97 |
\end{tabular}% |
| 98 |
\vspace{2pt} |
| 99 |
\caption{A couple of numbers in a table in the margin.\label{table1}}% |
| 100 |
\end{margintable}% |
| 101 |
|
| 102 |
Table \ref{table2} displays a larger table with more numbers. This is done using regular \LaTeX-macros for placing the table along with its caption. |
| 103 |
% |
| 104 |
\begin{table}[htbp]% |
| 105 |
\begin{tabular}{lllllllll}% |
| 106 |
A&B&C&D&E&F&G&H&I\\% |
| 107 |
0.50&0.47&0.48&0.50&0.47&0.48&0.60&0.39&1.00\\% |
| 108 |
\end{tabular}% |
| 109 |
\vspace{2pt}% |
| 110 |
\captionsetup{width=\textwidth, justification=justified}% |
| 111 |
\caption{A couple of numbers in a larger table. This table spans the usual text width.\label{table2}}% |
| 112 |
\end{table}% |
| 113 |
|
| 114 |
The \texttt{table*} environment is also defined in analogy to \texttt{figure*} and is demonstrated in table \ref{table3}. |
| 115 |
% |
| 116 |
\begin{table*}[h!] |
| 117 |
\begin{tabular}{lllllllllllll}% |
| 118 |
A&B&C&D&E&F&G&H&I&J&K&L&M\\% |
| 119 |
0.50&0.47&0.48&0.50&0.47&0.48&0.60&0.39&1.00&0.50&0.47&0.48&0.60\\% |
| 120 |
\end{tabular}% |
| 121 |
\vspace{2pt} |
| 122 |
\caption{Even more numbers in a big table are shown here. This table spans across the full page, text width plus margin.\label{table3}}% |
| 123 |
\end{table*} |
| 124 |
|
| 125 |
% |
| 126 |
\section{More information} |
| 127 |
\marginpar{It is also possible to put a comment in the margin without a corresponding mark in the text with \texttt{marginpar}.} This is a short example file to show the features of the caesar class together with the sidenotes package. Sometimes it is necessary to compile the document up to 3 times in order to get the alignment of all objects correctly. |
| 128 |
% |
| 129 |
\printbibliography[heading=bibintoc] |
| 130 |
% |
| 131 |
\end{document} |