note - 921 views
LaTeX reference
Here is a quick guide to LaTeX: https://fr.overleaf.com/latex/templates/a-quick-guide-to-latex/fghqpfgnxggz
The following is a reference for commonly used commands from past years' MAT137 Piazza forum, composed with the collective efforts of many students and TAs. You can use these commands here on Piazza by surrounding the code with double dollar signs before and after. (In regular
Fun facts
1. Surrounding
This site’s a lifesaver for finding symbols: http://detexify.kirelabs.org/classify.html
Feel free to add to and edit this list. Please try to keep it relevant, clear, and concise for everyone's benefit. Log your changes in the discussion below.
If you have questions, ask below! And help each other.
Code | Result |
Common Elements | |
a^{2} + b^{2} = c^{2} | |
a_{n}x^{n} + a_{n-1}x^{n-1} + \ldots + a_{1}x + a_{0} | |
f(x) = \frac{P(x)}{Q(x)} | |
f(x) = \sqrt[n]{x} | |
x \geq y | |
x \leq y | |
x \gg y | |
x \ll y | |
\pm, \neq, \approx, \nless, \ngtr, \nleq, \ngeq, \infty, \cdot | |
|x| = \left\{ \ begin{array}{rl} x & \text{ if } x \geq 0 \\ -x & \text{ if } x < 0 \end{array} \right. | |
\delta(x)= \ begin{cases} \infty & \text{if} x=0 \\ 0 & \text{otherwise} \end{cases} | |
\mathbb{R}, \mathbb{N}, \mathbb{Z}, \mathbb{Q} | |
f = g \circ h | |
\blacksquare | |
Automatically sized braces | |
\left( x^2 + 1 \right) | |
\left( \frac{1}{\left( x^2 + 1 \right)} \right) | |
\left[ \frac{1}{\left( x^2 + 1 \right)} \right] | |
Logic | |
P \wedge Q | |
P \vee Q | |
\neg{P} \vee Q | |
P \implies Q | |
P \iff Q | |
Limits | |
\lim_{x \to c} f(x) = L | |
\lim\limits_{x \to c} f(x) = L | |
\forall \epsilon > 0, \exists \delta > 0, … | |
0 < |x - c| < \delta \implies |f(x) - L| < 0 | |
Trig Functions | |
\sin{x}, \cos{x}, \tan^a{x} | |
\csc{x}, \sec{x}, \cot^b{x} | |
Sets | |
a \in A | |
a \notin A | |
\{ x\in\mathbb{R} : x\geq x^2\} | |
\cup_{i \in I} A_{i},\bigcup_{i \in I} A_{i} | |
\cap_{i \in I} A_{i},\bigcap_{i \in I} A_{i} | |
\subset, \not\subset, \subseteq, \nsubseteq | |
\mathbb{R} \setminus \mathbb{Q} | |
Integrals | |
U_{f}(P) = U_{f}(P) = \sum\limits_{i=1}^{|P|-1} \left[\sup_{x \in [x_i, x_{i+1}]}f(x)\right](x_{i+1} - x_i) | |
L_{f}(P) = U_{f}(P) = \sum\limits_{i=1}^{|P|-1} \left[\inf_{x \in [x_i, x_{i+1}]}f(x)\right](x_{i+1} - x_i) | |
\underline{I}_{a}^{b} = \sup_{P} L_{P}(f) | |
\overline{I}_{a}^{b} = \inf_{P} U_{P}(f) | |
\int_{a}^{b} f(s) \, ds | |
F(x) = \int_{a}^{x} f(s) \, ds | |
\int f(s) \, ds, \displaystyle{ \int f(s) \, ds } | |
Other Mathematical Concepts | |
\sum\limits_{n=1}^{\infty} \frac{1}{n^2}=\frac{\pi^2}{6} | |
Advanced Usage | |
\dfrac{P(x)}{Q(x)} = \tfrac{P(x)}{Q(x)} | |
\textbf{Constant Value} |
#pin
Followups
resolved followup -
Since I've done a bit of linear algebra, I'll add that for vectors, you can use the \vec{} function.
For example,
\vec{a} would render as
Additionally, when editing in a text editor, to actually render your latex, you can enclose within the $ sign or two $ signs depending on how you want it. This editor for example, renders it within two $ signs.
| 4