or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
Latex in Word
Step 1: 打開你的word
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Step 2: 點選插入 → 方程式
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Step 3: 從Unicode調整為Latex模式
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Step 4: 建入你要的Latex式子
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Step 5: Enter!
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →\(\LaTeX \; \text{note}\)
title: "\(\\LaTeX\) 語法筆記" path: "LaTeX 語法筆記"
此頁歡迎共筆。
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →\[ \require{newcommand} \newcommand{\bmatrix}[1] {\begin{bmatrix}#1\end{bmatrix}} \newcommand{\vmatrix}[1] {\begin{vmatrix}#1\end{vmatrix}} \]
\(\LaTeX\) 語法筆記
\[ \LaTeX % 大小寫須正確 \]
\[ \grave apple % 標重音 \]
\[ {\bf AB} % 粗體 boldface \]
\[ \bar{A} \]
\[ { a+b \brace c+d } \]
\[ \overline{AB} \]
\[ \vec{v} \]
\[ \frac{b}{a} \]
\[ \dfrac{b}{a} \]
\[ 90^\circ \]
\[ e^{\theta i} \]
\[ S_{n} \]
\[ \lim\limits_{n\to \infty} \]
\[ \sum\limits_{x = 0}^k{x^2} \]
\[ \bigcup\limits_{i = 1}^{\infty}{U_i} \]
\[ \bigcap\limits_{i = 1}^{\infty}{U_i} \]
\[ \mathop{\vcenter{\huge\times}}_\limits{i=1}^n{U_i} \]
\[ \int_a^b x^2 \mathrm{d} x \]
\[ \sqrt[n]{1+x+x^2+x^3+\dots+x^n} \]
\[ A \implies B \]
\[ A \impliedby B \]
\[ A \iff B \]
\[ f: A \to B \]
\[ A \leftarrow B \]
\[ \xrightarrow{中文亦可}\ \xleftarrow{中文亦可} \]
\[ a\,\overset{?}{=}\,b \]
\[ \forall x \in X, \exists x \in b \]
\[ \not\in, \not\gt, \not\lt, \not= \]
\[ \vert a \vert, \Vert a \Vert \]
\[ a_{1}, a_{2}, \ldots, a_{n} \]
\[ a_{1} + a_{2} + \cdots + a_{n} \]
\[ \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n}\\ a_{21} & a_{22} & \cdots & a_{2n}\\ \vdots & \vdots & \ddots & \vdots\\ a_{m1} & \cdots & \cdots & a_{mn} \end{pmatrix} \]
\[ \left\{ \begin{array}{c} a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{array} \right. \]
\[ \begin{align*} a + b = 0 \\ a + b + c = 1 \end{align*} \]
Operator/Relation
\(A\times B\) = A\times B \(a\cdot b\) = a\cdot b \(\div\) = \div \(\pmod n\) = \pmod n \(\pm\) = \pm (plus and minus) \(\partial\) = \partial \(\oplus\) = \oplus \(\&\)= \& \(\gt\) = \gt (greater than) \(\lt\) = \lt (less than) \(\ge\) = \ge (greater or equal) \(\le\) = \le (less or equal) \(\lhd\) = \lhd (normal subgroup) \(\unlhd\) = \unlhd \(\ne\) = \ne (not equal) \(\approx\) = \approx (approximate to) \(\sim\) = \sim (similar) \(\cong\) = \cong (congruent) \(\equiv\) = \equiv (equivalent) \(\ll\) = \ll, much less than \(\gg\) = \gg, much greater than \(\nless\) = \nless, not less than \(\ngtr\) = \ngtr, not greater than \(\cap\) = \cap, 像帽子, intersection \(\cup\) = \cup, 像杯子, union \(\subset\) = \subset, or implied \(\supset\) = \superset, or implies \(\subseteq\) = \subseteq \(\supseteq\) = \supseteq \(\land\) = \land (logical and); \wedge (wedge product) \(\lor\) = \lor (logical or)
List of Logic Symbols
Function
\(\binom{a}{b}\) = \binom{a}{b}
\(\cos{\theta}\) = \cos{\theta} \(\sin{\theta}\) = \sin{\theta} \(\log_{b}{x}\) = \log_{b}{x} \(\ln{x}\) = \ln{x} \(\lceil x \rceil\) = \lceil x \rceil \(\lfloor x \rfloor\) = \lfloor x \rfloor
Matrix
\[ \begin{pmatrix}A\\B\end{pmatrix} \]
\[ \begin{bmatrix}A\\B\end{bmatrix} \]
\[ \begin{vmatrix}A\\B\end{vmatrix} \]
\[ \begin{Vmatrix}A\\B\end{Vmatrix} \]
\[ \begin{bmatrix} a & b \\ c & d \end{bmatrix} \]
Greek
\(\alpha\) = \alpha \(\beta\) = \beta \(\Delta\) = \Delta, \(\delta\) = \delta \(\epsilon\) = \epsilon, \(\varepsilon\) = \varepsilon \(\gamma\) = \gamma \(\theta\) = \theta \(\sigma\) = \sigma \(\pi\) = \pi \(\mu\) = \mu \(\lambda\) = \lambda \(\omega\) = \omega \(\phi\) = \phi \(\varphi\) = \varphi \(\rho\) = \rho
Blod of Greek
Default size:
\[ \alpha \quad \beta \quad \gamma \]
Using
\boldsymbol{}
\[ \boldsymbol{\alpha \quad \beta \quad \gamma} \]
Using
pmb{}
\[ \pmb{\alpha \quad \beta \quad \gamma} \]
reference: How to represent bold greek letters in \(\LaTeX\)?
Misc
\(\angle\) = \angle \(\triangle\) = \triangle \(\square\) = \square \(\quad (space)\) = \quad (space) \(\propto\) = \propto (propotional to)
\(\because\) = \because \(\therefore\) = \therefore \(\mathbb{Z}\) = \mathbb{Z} \(\mathbb{P}\) = \mathbb{P} \(\mathbb{R}\) = \mathbb{R} \(\mathbb{C}\) = \mathbb{C} \(\Im\) = \Im (Imaginary Space) \(\Re\) = \Re (Real Space)
\(\emptyset\) = \emptyset \(\varnothing\) = \varnothing (以此表示空集合較好看) \(\in\) = \in \(\not\in\) = \not\in \(\langle S\rangle\) = \langel S\rangle (generator) \(\chi\) = \chi \(\circlearrowleft\) = \circlearrowleft \(\circlearrowright\) = \circlearrowright \(\curvearrowleft\) = \curvearrowleft \(\curvearrowright\) = \curvearrowright \(\hbar\) = \hbar (Planck's Constant)
https://oeis.org/wiki/List_of_LaTeX_mathematical_symbols#Set_and.2For_logic_notation
Format
Style
\[ \style{background-color:#eeeeee}{\frac{x+1}{y+2}} \]
\[ f(x) = a{\color{red}{x}} + b \]
\[ \require{color} \colorbox{#eeeeee}{Color Box} \]
\[ {\cal ABCDE12345abcde} \]
\[ \fbox{boxed text} \]
\[ \boxed{boxed\ text} \]
\[ \text{text $E=mc^2$} \]
\[ {\frak ABCDE12345abcde} \]
\[ {\it abefg12345}\ abcdefg12345 \]
\[ \min\limits_{n} \]
If you want to represent bold greek letters. link for Blod of Greek
Automatic Sizing
\[ \{x \mid x\gt 1\}\text{ 與 }\{x | x\gt 1\} \]
\[ \left( \dfrac{x^2}{y^3} \right) \]
\[ \left\{ \dfrac{1}{2} \right\} \]
\[ f(x) = \left\{ \begin{array}{r} x + by = c \\ dx + ey = f \end{array} \right. \]
\[ z = \overbrace{ \underbrace{x}_\text{real} + i \underbrace{y}_\text{imaginary} }^\text{complex number} \]
Alignment
\[ \begin{aligned} f(x) &= ax + by + cz + d \\ &= 2x + 3y + 5z + 1 \end{aligned} \]
\[ \begin{align} a_{1} + b_{1} &= c_{1} \\ a_{2} + b_{2} &= c_{2} \\ &\vdots \\ a_{10} + b_{10} &= c_{10} \end{align} \]
\[ \begin{cases}n/2, & \text{if $n$ is even} \\ 3n+1, & \text{if $n$ is odd} \end{cases} \]
\[ \begin{pmatrix} aaa & bbb \\ cc & dd \end{pmatrix} \]
\[ \begin{matrix} xxxxxx & xxxxxx & xxxxxx \cr ab & \hfil ab & ab\hfil \cr \end{matrix} \]
\[ \begin{array}{rrrrrr|r} & x_1 & x_2 & s_1 & s_2 & s_3 & \\ \hline s_1 & 0 & 1 & 1 & 0 & 0 & 8 \\ s_2 & 1 & -1 & 0 & 1 & 0 & 4 \\ s_3 & 1 & 1 & 0 & 0 & 1 & 12 \\ \hline & -1 & -1 & 0 & 0 & 0 & 0 \end{array} \]
Advanced
\[ \overset{上組合技}{\implies} 或\underset{下組合技}{\impliedby} \]
\[ \require{extpfeil} x\xtofrom[f^{-1}]{f} y \]
\[ \require{mhchem} x \xrightleftharpoons[f^{-1}]{f} y \]
\[ \require{ams} \begin{equation} \tag{1}\label{eq:eq_1} E = mc^2 \end{equation} \]
\[ reference\ equation\eqref{eq:eq_1} \]
\[ \begin{equation*} E = mc^2 \end{equation*} \]
\[ \def \kton{\sum\limits_{k=0}^{n}} \begin{aligned} (1+\frac{1}{n})^n &= \kton \binom{n}{k}1^{n-k}(\frac{1}{n})^{k}\\ &= \kton \binom{n}{k} \frac{1}{n^{k}}\\ &= \kton \frac{n!}{k!(n-k)!}\times\frac{1}{n^k}\\ &= \kton \frac{1}{k!} \frac{\overbrace{n(n-1)(n-2)\ldots(n-k+1)}^{共\ k\ 項}}{n^k}\\ &= \kton \frac{1}{k!} (\frac{n}{n}\frac{n-1}{n}\cdots\frac{n-k+1}{n}) \end{aligned} \]
\[ \DeclareMathOperator {\total}{總計} \total_a^b(x) \]
\[ x_{ij} = A_{i}X_{j} + b_{i} ~~~~~~~~~~~~~~~ i=1 \ldots m; ~~ j = 1 \ldots n \]
微調字體、字距
Font
\[ \mathbb{ABCDE12345abcde} \]
\mathbb - Used to turn on blackboard-bold for uppercase letters and lowercase 'k'.
\[ \mathbf{ABCDE12345abcde} \]
\mathbf - Used to turn on boldface for uppercase and lowercase letters and digits.
\[ \mathit{ABCDE12345abcde} \]
\mathit - forces the math italic mode.
\[ \mathcal{ABCDE12345abcde} \]
\mathcal - Used to turn on calligraphic font for uppercase letters and digits.
\[ \mathfrak{ABCDE12345abcde} \]
\mathfrak - turn on fraktur font for uppercase and lowercase letters and digits (and a few other characters).
\[ \mathrm{ABCDE12345abcde} \]
\mathrm - Used to turn on roman typestyle for uppercase and lowercase letters.
\[ \mathscr{ABCDE12345abcde} \]
\mathscr - Used to turn on script typestyle for uppercase letters. If lowercase script letters are not available, then they are typeset in a roman typestyle.
\[ \mathsf{ABCDE12345abcde} \]
\mathsf - Used to turn on sans serif typestyle for uppercase and lowercase letters and digits; also affects uppercase greek.
\[ \mathtt{ABCDE12345abcde} \]
\mathtt - Used to turn on typewriter typestyle for uppercase and lowercase letters and digits.
\[ \oldstyle{ABCDE12345abcde} \]
\oldstyle - Used to turn on oldstyle font.
If you want to represent bold greek letters. link for Blod of Greek
Operator (Class Assignment)
\mathord - forces the argument to be treated in the 'ordinary' class. \mathrel - forces the argument to be treated in the 'relation' class. \mathinner - forces the argument to appear 'inside' other formulas, and should be surrounded by additional space in certain circumstances. \mathbin - Used to give the correct spacing to make an object into a binary operator. \mathstrut - Used to achieve more uniform appearance in adjacent formulas as an invisible box whose width is zero. \mathpunct \mathopen \mathclose \mathop
\mathchoice - provides content that is dependent on the current style (display, text, script, or scriptscript).
More
tags:
LaTeX