Latex

Table of Contents

1 Installation

To see what is your tex home:

kpsewhich -var-value=TEXMFHOME

It should be something like "~/texmf". Putting class and style file into correct path inside that folder will enable global usage of the class. check whether it works or not:

kpsewhich sig-alternate-05-2015.cls

Typically you don't need to update database, but if you want, Command to update the ls-R database

  • texhash
  • mktexlsr

2 Literals

2.1 Symbols

alpha beta
\alpha (α) \beta (β) \gamma (γ) \theta (θ) \phi (φ) \varphi (ϕ) \xi (ξ) \mu (μ) \pi (π) \rho (ρ) \sigma (σ) \epsilon (ε) \partial (∂) \ell (ℓ)
spacing
\quad (\quad) \qquad (\qquad)
logic
\cup (∪) \bigcup (\bigcup) \cap (∩) \vee (∨) \wedge (∧) \in (∈) \notin (∉) \neg (¬) \subset (⊂) \subseteq (\subseteq) \supset (⊃) \supseteq (\supseteq) \le (≤) \ge (≥) \neq (≠) \forall (∀) \exists (∃)
arrow
\leftarrow (←) \rightarrow (→) \Rightarrow (⇒) \Leftarrow (⇐) \Leftrightarrow (⇔) \longrightarrow (\longrightarrow)
accents
\hat{a} (\hat{a}) \vec{x} (\vec{x})
math
\infty (∞) \propto (∝) \lfloor (⌊) \rfloor (⌋) \lceil (⌈) \rceil (⌉) \sum (∑) \int (∫) \prod (∏) \times (×) \ldots ( \ldots ) \frac{a}{b} (\frac{a}{b}) \sqrt{n} (\sqrt{n}) \overline{abc} (\overline{abc})
mark
\checkmark (✓)

2.2 Font size

It can be used after table environment

\begin{table}
\small
% ..
\end{table}

In org mode:

#+ATTR_LATEX: :font \small

The different size reference

  • tiny
  • scriptsize
  • footnotesize
  • small
  • normalsize
  • large
  • Large
  • LARGE
  • huge
  • Huge

3 General Syntax

3.1 structure

3.1.1 enumerate

3.1.2 itemize

3.1.3 description

3.2 table & figure

3.2.1 table

3.2.2 figure

`figure*` can make the figure two column

3.3 label & reference

label:

3.4 in-pdf comment

4 Packages

4.2 geometry

The the default for LaTeX is to have no indent after sectional headings. Thus the first paragraph will have no indent. To indent it, \usepackage{indentfirst}.

The default article class has too much margin. To change it:

4.3 fancyhdr

use headers and footers

4.4 qtree

The [ and ] should be surrounded by spaces!

4.5 listings

4.5.1 Global setting:

Frame: Style:

emphasize

Style arbitrary content:

4.5.2 Local setting:

title=this is title
using title will remove the "listing 1:"
backgroundcolor=\color{yellow}

4.6 tikz

see tikz

4.7 ulem

uline
regular underline
uuline
double underline
uwave
wave
sout
strike out
xout
dense cross out
dashuline
dash
dotuline
dot

4.8 TODO pdfcomment

4.9 todonotes

5 Bibliography

cite link (need to load a package like hyperref or url)

@misc{WinNT,
  title = {{MS Windows NT} Kernel Description},
  howpublished = {\url{http://web.archive.org/web/20080207010024/http://www.808multimedia.com/winnt/kernel.htm}},
  note = {Accessed: 2010-09-30}
}

Author: Hebi Li

Created: 2017-09-15 Fri 10:39

Validate