-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathlatex_tricks.tex
107 lines (79 loc) · 2.09 KB
/
latex_tricks.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
% n choose m
\[
\cdot{365 \choose 15}
\]
% big parenthesis or brackets
\[
\left( X \right)
\]
% union ∪
$\cup$
% intersection ∩
$\cap$
% limit as N goes to infinity
$\lim_{N \to +\infty}$
% italics
\emph{blah blah}
% plus or minux
\pm
% quotation marks quotes
``blah blah''
% space in math mode
\text{ blah blah}
% listing code
\begin{lstlisting}
\end{lstlisting}
% ⟨i⟩ left and right angle brackets
\langle i \rangle
% asterisk in math mode
$\ast$
% sumatorio
$\sum_{i=1}^t$
% partial derivative
$\partial$
% ô hat circumflex
\hat{o}
% tilde
\tilde{a} \acute{a} \bar{a} \dot{a} \breve{a} \check{a} \grave{a} \vec{a} \ddot{a}
% go back to text mode literal verbatim text during math
$\log_2 \frac{2^{-∆Ct}\mbox{ target genes}}{2^{-∆Ct}\mbox{ housekeeping gene}}$
$\log_2 \frac{2^{-∆Ct}\text{ target genes}}{2^{-∆Ct}\text{ housekeeping gene}}$
% literal text, don't interpret, allow all spaces and indentations
\begin{verbatim}
\end{verbatim}
% insert image
\begin{figure}[h!]
\centering
\includegraphics[width=1\textwidth]{biogenesis.png}
\caption{miRNA biogenesis}
% \label{fig:biogenesis}
\end{figure}
% reference figure
Figure~\ref{fig:mds}
% Figure positioning
h Place the float here, i.e., approximately at the same point it occurs in the source text (however, not exactly at the spot)
t Position at the top of the page.
b Position at the bottom of the page.
p Put on a special page for floats only.
! Override internal parameters LaTeX uses for determining "good" float positions.
H Places the float at precisely the location in the LaTeX code. Requires the float package,[1] e.g., \usepackage{float}. This is somewhat equivalent to h!.
% Less than or greater than
<
>
% Less than or equal to ≤
\leq
% comment or annotate an equation
\intertext{$u=S(t); du=S'(t)dt$}
% matrix
\begin{align*}
begin{pmatrix}
1 & 0\\
-1 & 0\\
0 & 1 \\
0 & -1 \\
\end{pmatrix}
\end{align*}
% square root cubic
$\sqrt[3]{x+y}$
% citations
http://blog.mendeley.com/tipstricks/howto-use-mendeley-to-create-citations-using-latex-and-bibtex/