This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
00_sample_chapter.tex
118 lines (84 loc) · 4.13 KB
/
00_sample_chapter.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
\chapter*{Sample Section}
\section{This is a section}
\subsection{This is a subsection}
\subsubsection{This is a subsubsection}
Note that subsubsection will not be included in the table of cotents.
Text.\\ %\\to start a new line
\verb!\\to start a new line!
A better practice when writing long sections is to start a new \emph{paragraph}.
Emphasise: use \emph{normal emph} (\verb!\emph{normal emph}!), self-defined \empha{red emph} (\verb|\empha{red emph}|, and self-defined \emphb{blue emph} (\verb|\emphb{blue emph}|). Typically, I use the blue emph to highlight \emphb{new concepts} (\verb|\emphb{new concepts}|) in main lines.
\textbf{Bold text} (\verb|\textbf{Bold text}|)
\textit{Italic text} or \emph{Italic Text} (\verb|\textit{Italic text}|)
\textcolor{red}{Coloured text} (\verb|\textcolor{red}{Coloured text}|)
Inline equation:$x+y=z$ (\verb!$x+y=z$!)
Displayed equation:
\begin{itemize}
\item coloured equation (\verb!$$\color{red} x+y=z$$!)$$\color{red} x+y=z$$
\item fraction (\verb|$$\frac{1}{a}$$|)$$\frac{1}{a}$$
\item summation (\verb|$$\sum_{i=1}^{T}$$|)$$\sum_{i=1}^{T}$$
\item special notations $$\infty \partial$$
\item greek letters $$\alpha \beta \gamma \sigma \delta \phi \psi \epsilon$$
\item arrows $$\rightarrow \Rightarrow$$
\item underbrace (\verb|$$\underbrace{expression}_{text}$$|)$$\underbrace{expression}_{text}$$
\item max (\verb|$$\max_{\alpha} x+y$$|)$$\max_{\alpha} x+y$$
\item relations (\verb|$$\approx > \neq \geq \leq$$|)$$\approx > \neq \geq \leq$$
\item Tilde/hat $$\Tilde{\alpha} \hat{\alpha}_i^2 \times X$$
\end{itemize}
Displayed equation with reference label (\verb|\label{} or \tag{} under \begin{equation}| label for reference, tag for display):
\begin{equation}
\color{blue}%you can set a color. My practice is to colour important equations red.
\label{eqn:1}%set a label for reference. No need to label if you don't want to refer to it later
\tag{Equation Tag}%delete this line if you want to use auto-generated number
x+y=z
\end{equation}
Unordered list:
\begin{itemize}
\item item 1
\item item 2
\end{itemize}
Ordered list:
\begin{enumerate}
\item item 1
\item item 2
\end{enumerate}
Insert figure:
\begin{figure}[H]%option [H] means "strictly here"
\centering
\includegraphics[width=2in]{images/ch1/card_1.png}%[scale option]{path and file name of the figure}
\caption{an example}%caption
\label{fig:label}%label for referencing. No need to include this if you don't need to refer back
\end{figure}
Code:\\
\verb|\begin{figure}[H]%option [H] means "strictly here"|\\
\verb|\centering|\\
\verb|\includegraphics[width=2in]{images/ch1/card_1.png}%[scale option]{path and file name}|\\
\verb|\caption{an example}%caption|\\
\verb|\label{fig:label}%label for referencing. No need to include this if you don't need to refer back|\\
\verb|\end{figure}|
\section{123123}
\begin{itemize}
\item this is an item
\item this is another item
\begin{itemize}
\item another
\end{itemize}
\end{itemize}
\begin{enumerate}
\item 12
\item sjaiwjiodajo
\end{enumerate}
\begin{equation}
x+y
\end{equation}
\begin{equation*}
x+y
\end{equation*}
$$x+y$$
this fraction $\frac{a}{b}$
\begin{figure}[H]
\centering
\includegraphics[width=4.5in]{images/ch11/2.png}
\caption{This is a graph}
\label{123123}
\end{figure}
\ref{123123}