Вы находитесь на странице: 1из 2

A quick guide toLATEX


What is LATEX? Text decorations Lists
LATEX (usually pronounced “LAY teck,” sometimes “LAH teck,” and Your text can be italic (\textit{italic}), bold (\textbf{bold}), or You can produce ordered and unordered lists.
never “LAY tex”) is a format, or collection of macro commands, for underlined (\underline{underlined}). description command output
TEX, the standard for most professional mathematics and scientific Your math can contain bold, R (\mathbf{R}), or blackboard bold, ℝ
writing. TEX is a powerful typesetting engine created by Donald (\mathbb{R}). You may want to used these to express the sets of real \begin{itemize}
Knuth of Stanford University (his first version appeared in 1978). \item Thing 1 • Thing 1
numbers (ℝ or R), integers (ℤ or Z), rational numbers (ℚ or Q), unordered list
Leslie Lamport was responsible for creating LATEX, a popular set of and natural numbers (ℕ or N). \item Thing 2 • Thing 2
user commands for TEX. A team of LATEX programmers created the For text appearing inside a math expression, use \text. \end{itemize}
current version, LATEX 2𝜀. (0,1]=\{x\in\mathbb{R}:x>0\text{ and }x\le 1\} yields \begin{enumerate}
\item Thing 1 1. Thing 1
(0, 1] = {𝑥 ∈ ℝ ∶ 𝑥 > 0 and 𝑥 ≤ 1}. ordered list
Mathematics (Without the \text command it treats “and” as three variables:
\item Thing 2 2. Thing 2
\end{enumerate}
Math vs. text vs. functions (0, 1] = {𝑥 ∈ ℝ ∶ 𝑥 > 0𝑎𝑛𝑑𝑥 ≤ 1}.)
In properly typeset mathematics, the variables appear in italics (for Spaces and new lines Symbols (in math mode)
example, 𝑓 (𝑥) = 𝑥2 +2𝑥−3). The exception to this rule is predefined The basics
functions (for example, sin(𝑥)). Thus it is important to always treat LATEX ignores extra spaces and new lines. For example,
text, variables, and functions correctly. See the difference between This sentence will look description command output
𝑥 and x, -1 and −1, and 𝑠𝑖𝑛(𝑥) and sin(𝑥). fine after it is compiled. addition + +
There are two ways to present a mathematical expression – inline or This sentence will look fine after it is compiled. subtraction - −
as a display. Leave one full empty line between two paragraphs. Place \\ at the plus or minus \pm ±
end of a line to create a new line (but not create a new paragraph). multiplication (times) \times ×
Inline mathematical expressions This multiplication (dot) \cdot ⋅
Inline math expressions occur as part of the normal flow of text. To compiles division symbol \div ÷
produce an inline expression, place the math expression between division (slash) / /
dollar signs ($). For example, typing $90^{\circ}$ is the same like\\ circle plus \oplus ⊕
as $\frac{\pi}{2}$ radians yields 90∘ is the same as 𝜋 radians. circle times \otimes ⊗
2 this.
equal = =
Displayed mathematical expressions This compiles
not equal \ne ≠
like less than < <
Displays are mathematical expressions that are given their own line
this. greater than > >
and are centered on the page. These are usually used for important
equations that deserve to be showcased on their own line or for large Use \noindent to prevent a paragraph from indenting. less than or equal to \le ≤
equations that cannot fit inline. To produce displayed mathematics, greater than or equal to \ge ≥
place the mathematical expression between the symbols \[ and \]. Comments approximately equal to \approx ≈
Typing \[x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\] yields Use % to create a comment. Nothing on the line after the % will infinity \infty ∞
be typeset. $f(x)=\sin(x)$ %this is the sine function yields dots 1,2,3,\ldots 1, 2, 3, …
−𝑏 ± √𝑏2 − 4𝑎𝑐 𝑓 (𝑥) = sin(𝑥). dots 1+2+3+\cdots 1+2+3+⋯
𝑥= . fraction \frac{a}{b} 𝑎
2𝑎 𝑏
Delimiters square root \sqrt{x} √𝑥
Display style 𝑛th root \sqrt[n]{x} 𝑛
√𝑥
description command output exponentiation a^b 𝑎𝑏
To get full-size inline math, use \displaystyle. Use this sparingly.
Typing this $\displaystyle \sum_{n=1}^{\infty}\frac{1}{n}$, parentheses (x) (x) subscript a_b 𝑎𝑏
and not this $\sum_{n=1}^{\infty}\frac{1}{n}$ yields square brackets [x] [x] absolute value |x| |𝑥|
∞ 1 curly braces \{x\} {x} natural log \ln(x) ln(𝑥)

this ∑ , and not this ∑𝑛=1 𝑛1 . logarithms \log_{a}b log𝑎 𝑏
𝑛
𝑛=1 To automatically make delimiters large enough to fit the content, use exponential function e^x=\exp(x) 𝑒𝑥 = exp(𝑥)
Images them together with \right and \left. For example, \left\{ \sin
\left( \frac{1}{n} \right) \right\} _{n}^{\infty} produces
degree \deg(f) deg(𝑓 )

You can put images (pdf, png, jpg, or gif) in your document. They

need to be in the same location as your .tex file when you compile 1
the document. Omit [width=.5in] if you want the image to be full- {sin ( )} .
𝑛 𝑛
sized.
\begin{figure}[tbp] Curly braces are non-printing characters that are used to gather text
\includegraphics[width=.5in]{imagename.jpg} that has more than one character. Observe the differences between
\caption{The (optional) caption goes here.} the four expressions x^2, x^{2}, x^2t, x^{2t} when typeset: 𝑥2 , 𝑥2 ,
\end{figure} 𝑥2 𝑡, 𝑥2𝑡 .
Functions Calculus Number theory


description command output description command output description command output
maps to \to → 𝑑𝑓 divides \mid ∣
composition \circ ∘ derivative \frac{df}{dx}
𝑑𝑥 does not divide \not \mid ∤
|x|=\begin{cases} derivative f' 𝑓′ div \operatorname{div} div
piecewise x & x\ge 0\\ ⎧
{𝑥 𝑥≥0
|𝑥| = ⎨ mod \mod mod
function -x & x<0 { 𝜕𝑓 \gcd
⎩−𝑥 𝑥 < 0 partial derivative \frac{\partial f}{\partial x} greatest common divisor gcd
\end{cases} 𝜕𝑥 ceiling \lceil x \rceil ⌈𝑥⌉
integral \int ∫ floor \lfloor x \rfloor ⌊𝑥⌋
Greek and Hebrew letters double integral \iint ∬
command output command output triple integral \iiint ∭ Geometry and trigonometry
limits \lim_{x\to \infty} lim
\alpha 𝛼 \tau 𝜏 𝑥→∞ description command output

\beta 𝛽 \theta 𝜃 summation \sum_{n=1}^{\infty}a_n ∑ 𝑎𝑛 angle \angle ABC ∠𝐴𝐵𝐶
\chi 𝜒 \upsilon 𝜐 𝑛=1 degree 90^{\circ} 90∘
\delta 𝛿 \xi 𝜉 ∞
product \prod_{n=1}^{\infty}a_n ∏ 𝑎𝑛 triangle \triangle ABC △𝐴𝐵𝐶
\epsilon 𝜖 \zeta 𝜁
\varepsilon 𝜀 \Delta ∆ 𝑛=1 segment \overline{AB} 𝐴𝐵
\eta 𝜂 \Gamma Γ sine \sin sin
Logic cosine \cos cos
\gamma 𝛾 \Lambda Λ
\iota 𝜄 \Omega Ω tangent \tan tan
description command output
\kappa 𝜅 \Phi Φ cotangent \cot cot
\lambda 𝜆 \Pi Π not \sim ∼ secant \sec sec
\mu 𝜇 \Psi Ψ and \land ∧ cosecant \csc csc
\nu 𝜈 \Sigma Σ or \lor ∨ inverse sine \arcsin arcsin
\omega 𝜔 \Theta Θ if...then \to → inverse cosine \arccos arccos
\phi 𝜙 \Upsilon Υ if and only if \leftrightarrow ↔ inverse tangent \arctan arctan
\varphi 𝜑 \Xi Ξ logical equivalence \equiv ≡
\pi 𝜋 \aleph ℵ therefore \therefore ∴ Symbols (in text mode)
\psi 𝜓 \beth ℶ there exists \exists ∃ These symbols do not have to be surrounded by dollar signs.
\rho 𝜌 \daleth ℸ for all \forall ∀
implies \Rightarrow ⇒ description command output
\sigma 𝜎 \gimel ℷ
equivalent \Leftrightarrow ⇔ dollar sign \$ $
Set theory percent \% %
Linear algebra ampersand \& &
description command output
description command output pound \# #
set brackets \{1,2,3\} {1, 2, 3} backslash \textbackslash \
element of \in ∈ vector \vec{v} 𝑣⃗ left quote marks `` “
not an element of \not\in ∉ vector \mathbf{v} v right quote marks '' ”
subset of \subset ⊂ norm ||\vec{v}|| ||𝑣||⃗ single left quote ` ‘
subset of \subseteq ⊆ \left[ single right quote ' ’
not a subset of \not\subset ⊄ \begin{array}{ccc} hyphen X-ray X-ray
contains \supset ⊃ 1 & 2 & 3 \\ 1 2 3 en-dash pp. 5--15 pp. 5–15
⎡ ⎤
contains \supseteq ⊇ matrix 4 & 5 & 6\\ ⎢
⎢ 4 5 6 ⎥
⎥ em-dash Yes---or no? Yes—or no?
union \cup ∪ 7 & 8 & 0 ⎣ 7 8 0 ⎦
intersection \cap ∩
10
\end{array}
\right]
Getting started with and LATEX
big union \bigcup_{n=1}^{10}A_n ⋃𝑛=1 𝐴𝑛
EX collaborative authoring online: https://overleaf.com
LAT
big intersection \bigcap_{n=1}^{10}A_n
10
⋂𝑛=1 𝐴𝑛 \left| Overleaf LATEX documentation: https://overleaf.com/learn
empty set \emptyset ∅ \begin{array}{ccc} Learn LATEX in 30 minutes:
\mathcal{P} 1 & 2 & 3 \\ https://overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes
power set 𝒫 ∣ 1 2 3 ∣
minimum \min min determinant 4 & 5 & 6 \\ ∣ 4 5 6 ∣ Comprehensive TEX Archive Network: http://www.ctan.org/
∣ ∣
\max 7 & 8 & 0 ∣ 7 ∣
maximum max ∣ 8 0 ∣ TEX Users Group: http://www.tug.org/
supremum \sup sup \end{array} Want to work offline? Local install options for Linux or Windows:
infimum \inf inf \right| TEX Live; MacOS: MacTEX; Windows: MiKTEX
limit superior \limsup lim sup determinant \det(A) det(𝐴)
limit inferior \liminf lim inf trace \operatorname{tr}(A) tr(𝐴) Based on the version by Dave Richeson, Dickinson College,
closure \overline{A} 𝐴 dimension \dim(V) dim(𝑉) http://divisbyzero.com/. Reproduced with permission.

Вам также может понравиться