-
Notifications
You must be signed in to change notification settings - Fork 0
/
general_sample.tex
283 lines (252 loc) · 10.2 KB
/
general_sample.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
% Sample LaTeX document by Adam Přáda
%******************************************************************************
% DOCUMENT AND FONT SET-UP
%******************************************************************************
% First specify the class of document and body font size
\documentclass[11pt]{article}
% Always type input in UTF-8, which guarantees you can write directly most symbols
\usepackage[utf8]{inputenc}
% Using the T1 for font encoding ensures better non-ASCII chracters (as opposed to old OT1)
\usepackage[T1]{fontenc}
% Next command loads the Latin Modern family of fonts. These look just like LaTeX default Computer Modern, but has more available characters and symbols
\usepackage{lmodern}
% Another good combination of font is Palatino:
%\usepackage{newpxtext}
% with either the default math font:
%\usepackage{newpxmath}
% or the Euler math font, which is very nice
%\usepackage[euler-digits,euler-hat-accent]{eulervm}
% A font designed by Knuth, the author of TeX
%\usepackage{concrete}
%\usepackage[euler-digits,euler-hat-accent]{eulervm} % Mean to go together with the Euler font
% A generally useful package, e.g. if you want to change font colour
\usepackage{xcolor}
% If writing a document in a different language than English, load the babel package
% Automatically translates words like Chaper, Figure, Table, etc.
%\usepackage[czech]{babel}
%******************************************************************************
% PAGE SET-UP
%******************************************************************************
% Choose the right paper format and margins
%\usepackage[a4paper, top=25mm,bottom=25mm, inner=4cm,outer=3cm]{geometry}
% Each of these can also be set in separate commands
\usepackage{geometry}
\geometry{a4paper}
%\geometry{margin=2.5cm}
% If you want to use multiple columns
%\usepackage{multicol}
% For nicer page headers
%\usepackage{fancyhdr} % Load the package
%\pagestyle{fancy} % Make pages fancy
%\fancyhead[LE,RO]{}
%\fancyhead[RE,LO]{\leftmark}
%\fancyhead[RE,LO]{Section \thesection}
%\fancyfoot[CE,CO]{\leftmark}
%\fancyfoot[LE,RO]{\thepage}
% E: Even page
% O: Odd page
% L: Left field
% C: Center field
% R: Right field
% H: Header
% F: Footer
%******************************************************************************
% PARAGRAPHS
%******************************************************************************
% If you do not want your paragraphs to be indented and you want a gap instead
\setlength{\parindent}{0pt}
\setlength{\parskip}{0.5em}
% If you want to use left or right aligned text, then it may be better to use
% this package,
\usepackage{ragged2e}
% that defines new capitalised commands:
% \Centering
% \RaggedLeft
% \RaggedRight
% These generally work better than their lowercase LaTeX counterparts
%******************************************************************************
% FIGURES
%******************************************************************************
% For including images/figures
\usepackage{graphicx}
% If most images are in a different folder to the document
\graphicspath{ {figures/} }
%******************************************************************************
% MATHEMATICS
%******************************************************************************
% Basically a necessary package for typing maths
\usepackage{amssymb}
% For more mathematical symbols
\usepackage{amsmath}
% For bold symbols in mathematics
% => use \bm{} instead of \mathbf or \boldsymbol
% => use \hm instead of \heavysymbol
\usepackage{bm}
% Sometimes it may be useful to load the physics package
%\usepackage{physics}
%******************************************************************************
% LINKS IN THE DOCUMENT
%******************************************************************************
% By default I prefer to have links hidden
\usepackage[hidelinks]{hyperref}
% but you can play with them as well
%\usepackage{hyperref}
%\hypersetup{colorlinks=true,linkcolor=black,filecolor=magenta,urlcolor=blue}
%\urlstyle{same}
%******************************************************************************
% BIBTEX BIBLIOGRAPHY
%******************************************************************************
% I prefer to use the Biber backend
%\usepackage[backend=biber,style=chem-rsc,]{biblatex}
%\addbibresource{bibtex/PhD-first-year_report.bib} %Imports bibliography file
%******************************************************************************
% FOOTNOTES
%******************************************************************************
% I prefer to have footnotes labelled with symbols, to avoid confusion with citations
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
% or cursive letters
%\renewcommand{\thefootnote}{\textit{\alph{footnote}}}
% or roman numerals
%\renewcommand{\thefootnote}{(\roman{footnote})}
% or capital roman numerals?
%\renewcommand{\thefootnote}{(\Roman{footnote})}
%******************************************************************************
% NON-BREAKING HYPHENS
%******************************************************************************
% Always load as the last package
\usepackage[shortcuts]{extdash}
%Standard LaTeX dashes
%- Standard LaTeX hyphen
%-- Standard LaTeX en-dash
%--- Standard LaTeX em-dash
%extdash breakable dashes
%Words hyphened with these dashes can also be broken at other positions than the dash
%\-/ hyphen
%\-- en-dash
%\--- em-dash
%extdash unbreakable dashes
%No line breaks possible at the hyphen
%\=/ hyphen
%\== en-dash
%\=== em-dash
%******************************************************************************
% DOCUMENT BODY
%******************************************************************************
% If you want to use the default document title, then first set the variables
\title{\LaTeX\ sample}
\author{Adam Přáda}
\date{24 July 2019}
% and then start the document and make the title
\begin{document}
\maketitle
\section{Basics}
Standard text. Standard text. Standard text. Standard text. Standard text. Standard text. Standard text.
Only a full empty line creates a full paragraph break.
paragraph break, paragraph break, paragraph break, paragraph break, paragraph break, paragraph break, paragraph break.
Text can be \textnormal{normal}, a.k.a.~\textrm{roman}, \emph{italics} or \textsl{slanted}, \underline{underlined}, \textsf{without serifs}, \texttt{fixed width}, in \textsc{Small Capitals} or just \uppercase{capitals}, \textbf{bold} or \textmd{medium weight}.
You can also have text of different sizes:
{\Huge Huge}
{\huge huge}
{\LARGE LARGE}
{\Large Large}
{\large large}
{\normalsize normalsize}
{\small small}
{\footnotesize footnotesize}
{\scriptsize scriptsize}
{\tiny tiny}
{\fontsize{1.5cm}{2cm}\selectfont custom size}
% font size + leading
% These commands act within given scope. In this case it is given by {}
% Can also change and change back or use only within a different object
% You can end the page intentionally like:
\pagebreak
% or
% \newpage
Sometimes you want to use lists:
\begin{itemize}
\item Item 1
\item Item 2
\begin{itemize}
\item inside item 2
\item inside item 2
\begin{itemize}
\item inside inside
\item inside inside
\end{itemize}
\item inside item 2
\end{itemize}
\item Item 3
\item Item 4
\end{itemize}
or numbered lists
\begin{enumerate}
\item first
\item second
\end{enumerate}
\subsection{Subsection 1}
There are also subsections
\subsubsection{Subsubsection 1}
and subsubsections! Below those, there are only
\paragraph{Paragraphs} Like this one. Like this one. Like this one. Like this one. Like this one. Like this one. Like this one. Like this one. Like this one. Like this one. Like this one. Like this one. Like this one. Like this one.
\pagebreak
\section{Figures}
You also need to have figures, like this nice figure number \ref{fig:qheom_contour}.
\begin{figure} [htp!]
% h = here
% t = top of page, can do 'b' for bottom
% p = separate figure page
% ! = override default LaTeX settings
% LaTeX automatically chooses from the options that we list
\centering
\includegraphics [width=11cm]{qheom_contour.pdf}
\caption{
A contour plot of a wavepacket being equilibrated with a bath in a harmonic potential centered at $q=0$. At $t=0$ the potential is shifted by an addition of a linear term, which creates a new minimum at $q=3/2$~a.u. This is a reproduction of a similar calculation from Tanimura, Wolynes, \emph{Phys.~Rev.~A}, 1991, \textbf{43}, 4131–4142.
}
\label{fig:qheom_contour}
\end{figure}
\section{Mathematics}
An inline equation $x=3$ inside a paragraph. And a separate equation
\begin{equation}
\hat{\rho}_t(q) = \int \mathrm{d}\bm{x}\langle\bm{x}|\hat{\rho}_t(q,\bm{x}) |\bm{x}\rangle,
\end{equation}
The equation does not have to be numbered like
\begin{equation*}
G_t(q(\tau),q'(\tau)) = \exp\left[\frac{\mathrm{i}}{\hbar}\bigl[S_\mathrm{S}(q(\tau);t)-S_\mathrm{S}(q'(\tau);t)\bigr]\right]
\end{equation*}
but if they are numbered
\begin{equation}
\hat{\rho}_t(q) = \int \mathrm{d}\bm{x}\langle\bm{x}|\hat{\rho}_t(q,\bm{x}) |\bm{x}\rangle,
\label{eq:my_equation}
\end{equation}
then you can refer to them as eq.~\ref{eq:my_equation}. Some equations are long and need two lines
\begin{multline}
\frac{\partial \hat{\rho}_{\bm{n}} }{\partial t} =
-\left(
\frac{\mathrm{i}}{\hbar}\hat{\mathcal{L}}
+\sum_{k=0}^{K}n_k \gamma_k
+\hat{\Xi}
\right)\hat{\rho}_{\bm{n}} \\
-\frac{\mathrm{i}}{\hbar}\hat{q}^\times \sum_{k=0}^{K}\hat{\rho}_{\bm{n}_k^\oplus}
-\frac{\mathrm{i}}{\hbar}\sum_{k=0}^{K}n_k\left(C_k\hat{q}\hat{\rho}_{\bm{n}_k^\ominus}-C_k^*\hat{\rho}_{\bm{n}_k^\ominus}\hat{q}\right),
\end{multline}
Sometimes you want to split the equation, but align it nicely
\begin{equation}
\begin{split}
\frac{\partial \rho_{n}(q_i,q_j) }{\partial t} =
&-\left(\frac{\mathrm{i}}{\hbar}\hat{\mathcal{L}}+n \gamma \right)\rho_{n}(q_i,q_j)
-\frac{\mathrm{i}}{\hbar}(q_i - q_j) \rho_{n+1}(q_i,q_j) \\
&-\frac{n_0 \eta\gamma^2}{2}(q_i + q_j) \rho_{n-1}(q_i,q_j) \\
&-\frac{\mathrm{i}}{\hbar}\frac{n \hbar \eta \gamma^2}{2}\cot\left(\frac{\beta\hbar\gamma}{2}\right)(q_i - q_j) \rho_{n-1}(q_i,q_j).
\end{split}
\end{equation}
Sometimes you want to give people a choice
\begin{equation}
H_\mathrm{S}(q_i,q_j) =
\begin{cases}
V(q_i) +\frac{\hbar^2\pi^2}{6 m (\Delta q)^2}& \text{for }i=j, \\
\frac{\hbar^2 }{m (\Delta q)^2 (i-j)^2}(-1)^{i-j} & \text{otherwise,}
\end{cases}
\label{eq:dvr_ham}
\end{equation}
\end{document}