Here are some notes I find useful for using LaTex
- Force limits to the top and bottom side of inline sum : \(\sum\limits_{i=1}^{N} i\), use \sum\limits instead of \sum alone.
- Force limits to the top and bottom side of inline integral : \(\int \limits_{x=1}^{3} xdx\), use \int\limits instead of \int alone.
- Hat:
- Fitted value: \(\hat{y}\), use \hat{}
- Widehat: \(\widehat{\nabla f }\), use \widehat{}
- Italic: \(\mathcal{L}\), it only works for upper-case letters, use \mathcal{}
- Underset: \(\underset{x}{argmin}\), use \underset{x}{formula}
- Gradient: \(\nabla f\), use \nabla
- Field representation: the complex field \(\mathbb{C}\), the real field \(\mathbb{R}\), use \mathbb{}
- Logical operator
- P and Q: \(P \land Q\), \land
- P or Q: \(P \lor Q\), \lor
- not P: \(\neg P\), \neg, or \(\bar{P}\), \bar{P}
- P xor Q: \(p \oplus Q\), \oplus
- if P then Q: \(P \rightarrow Q\), \rightarrow
- P iff Q: \(P \leftrightarrow Q\), \leftrightarrow
- Set notation
- \(\mathbb{R}\), \mathbb{R}
- \(a \in A\): a \in A
- \(a \notin A\): a \notin A
- \(\emptyset\): \emptyset
- \(A \cap B\): \cap
- \(A \cup B\): \cup
- \(\mathcal{P}(A)\) \mathcal{P} (power set)
- \(A \times B\): \times
- \(A \setminus B\): \setminus
- \(A \subseteq B\): \subseteq
- \(A \subset B\): \subset
- \(\bigcup\limits_{i=1}^{n}\): \bigcup\limits_{i=1}^{n}
- \(\bigcap\limits_{i=1}^{n}\): \bigcap\limits_{i=1}^{n}
- Make equation smaller: \scriptstyle
- Isomorphism and approximate equality
- \(G_1 \cong G_2\): \cong
- \(a \approx b\): \approx
- \(a \approxeq b\): \approxeq
- Add label to equation: \tag{N}
- How to write text inside equation: \text{text}
- Multline equations \[\begin{align*} a &= b \\ &= c \\ &= d \end{align*}\]
allign* has no equation label, align has equation label, use &= to align equations marks, use \ \ to separate lines
- function composition \(g \circ f\), \circ
- multinomial coefficient: \(\binom{n}{k_1,k_1,\dots,k_m} = \frac{n!}{k_1 ! k_2
!\dots k_m !}\), \binom {n}{k_1,k_1,\dots,k_m}, use
binom{}{}
for combinations - Multi conditions in summation: \(\sum\limits_{\substack{i=0 \\ i\neq
j}}^{n}a_i\), \substack{i=0 \ \ i \neq j}, use
substack{}
for multi conditions, use\\
to separate the lines - Arrows
- \(\leftarrow\) \leftarrow, \(\Leftarrow\) \Leftarrow
- \(\longleftarrow\) \longleftarrow, \(\Longrightarrow\) \Longrightarrow
- \(\rightarrow\) \rightarrow, \(\Rightarrow\) \Rightarrow
- \(\longrightarrow\) \longrightarrow, \(\Longrightarrow\) \Longrightarrow
- \(\leftrightarrow\) \leftrightarrow, \(\Leftrightarrow\) \Leftrightarrow
- \(\longleftrightarrow\) \longleftrightarrow, \(\Longleftrightarrow\) \Longleftrightarrow
- The does not prove sign (appeared in Gödel's incompleteness
theorems)
- \(\nvdash\) \nvdash
- \(\not\vdash\) \not\vdash