Skip to content

Commit 3e652e1

Browse files
committed
improvements suggested by mykel
1 parent 4c30850 commit 3e652e1

File tree

5 files changed

+52
-24
lines changed

5 files changed

+52
-24
lines changed

book.tex

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
% biber book
77
% lualatex book
88

9-
\documentclass[fullbook]{book_template}
9+
\documentclass[fullbook]{tufte_algorithms_book}
10+
11+
\title{Textbook Template}
12+
\author[LastnameOne and LastnameTwo]{Author A. LastnameOne \\ Author B. LastnameTwo}
13+
\date{2019}
1014

1115
\begin{document}
1216
\frontmatter

chapter/appendix/julia.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ \subsection{Booleans}
2828
\end{juliaverbatim}
2929
The left-hand side of the equal sign is the variable name, and the right hand side is the value.
3030

31-
We can make assignments in the Julia console. The console will return a response to the expression being evaulated.
31+
We can make assignments in the Julia console. The console will return a response to the expression being evaluated.
3232
\begin{juliaconsole}
3333
x = true
3434
y = false

chapter/introduction.tex

+40-8
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ \chapter{Introduction}
22
\label{ch:introduction}
33

44
Welcome to the book template!
5-
6-
\todo{This is something that I still need to do.}
7-
8-
\tim{This is a comment that Tim inserted.}
9-
\mykel{And this is Mykel. Go ahead and add new commands associated with your own names by editing \texttt{book.cls}.}
10-
115
This template is based on our previous book.\cite{Kochenderfer2019}
126

137
\section{Using Julia}
@@ -74,7 +68,7 @@ \section{Using Julia}
7468
}
7569
\end{figure}
7670
77-
Of course, there is nothing stopping you from inserting tikzpictures directly.
71+
Of course, there is nothing stopping you from inserting tikzpictures directly, as shown in \cref{fig:sample_tikzpicture}.
7872
\begin{figure}
7973
\centering
8074
\begin{tikzpicture}[x=1cm, y=1cm]
@@ -87,4 +81,42 @@ \section{Using Julia}
8781
\label{fig:sample_tikzpicture}
8882
A figure made using the \texttt{tikzpicture} environment.
8983
}
90-
\end{figure}
84+
\end{figure}
85+
86+
Figures can also be placed in the margins, as with
87+
\begin{marginfigure}
88+
\begin{jlcode}
89+
p = let
90+
Axis(Plots.Linear(x->sin(x) + x, 0:10, style="solid, pastelBlue, mark=none"),
91+
width="5cm", height="5cm", xlabel=L"x", ylabel=L"f(x)")
92+
end
93+
plot(p)
94+
\end{jlcode}
95+
\begin{center}
96+
\plot{fig/sample_marginfigure}
97+
\end{center}
98+
\caption{
99+
\label{fig:sample_marginfigure}
100+
A \texttt{marginfigure} in the margin.
101+
}
102+
\end{marginfigure}
103+
104+
105+
The \texttt{pythontex} package also supports
106+
\begin{juliaconsole}
107+
x = true
108+
y = false
109+
typeof(x)
110+
\end{juliaconsole}
111+
112+
\section{Custom Environments}
113+
114+
example
115+
116+
problem / solution
117+
118+
\section{Math Notation}
119+
120+
\section{Custom Commands}
121+
122+
\todo{This is something that I still need to do.}

titlepage.tex

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
\makeatletter
12
\begin{titlepage}
23
{\Huge
34
\noindent
4-
Textbook Template Title Page}
5+
\@title}
56
\end{titlepage}
67

78
\cleardoublepage
@@ -10,12 +11,11 @@
1011
\vfill
1112
{\Huge
1213
\noindent
13-
Textbook Template
14+
\@title
1415
}\\[0.5in]
1516
{\Large
1617
\noindent
17-
Mykel J. Kochenderfer\\
18-
Tim A. Wheeler
18+
\@author
1919
}
2020
\vfill
2121
{\large
@@ -24,4 +24,5 @@
2424
Cambridge, Massachusetts\\
2525
London, England
2626
}\\[1in]
27+
\makeatother
2728

book_template.cls tufte_algorithms_book.cls

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\ProvidesClass{book_template}
1+
\ProvidesClass{tufte_algorithms_book}
22
\RequirePackage{luatex85}
33

44
\LoadClass[justified,nobib,titlepage]{tufte-book}
@@ -14,10 +14,6 @@
1414
}
1515
\ProcessOptions\relax
1616

17-
\title{Textbook Template}
18-
\author[Kochenderfer and Wheeler]{Mykel J. Kochenderfer \& Tim A. Wheeler}
19-
\date{2019}
20-
2117
\expandafter\def\csname PY@tok@err\endcsname{}
2218

2319
\geometry{
@@ -106,11 +102,6 @@
106102

107103
\newcommand{\todo}[1]{\textbf{\textcolor{magenta}{#1}}}
108104
\newcommand{\needcite}{\todo{cite}}
109-
\newcommand{\tim}[1]{\textbf{\textcolor{teal}{#1}}}
110-
\newcommand{\mykel}[1]{\textbf{\textcolor{orange}{#1}}}
111-
\newcommand{\todof}[1]{\sidenote{\todo{#1}}}
112-
\newcommand{\timf}[1]{\sidenote{\tim{#1}}}
113-
\newcommand{\mykelf}[1]{\sidenote{\mykel{#1}}}
114105

115106
\newcommand{\siyear}[1]{\num[group-minimum-digits=999]{#1}}
116107
\newcommand{\siyearrange}[2]{\siyear{#1}--\siyear{#2}}

0 commit comments

Comments
 (0)