Markdown&LaTeX语法详解
2026-09-25 18:13:07
发布于:浙江
1.文档创建
LaTeX:创建.txt文档,将后缀修改为.tex
Markdown:创建.txt文档,将后缀修改为.md2.LaTeX公式详解
LaTeX语法写作
$公式$或$$\n居中公式\n$$的形式乘方:
a的n次幂:
$a^n$
效果:a数组的第i项:
$a_i$
效果:微积分:
$\int_{a}^{b}$
效果:求和:
$\sum_{i=n}^{a}t$或$$\n\sum_{i=n}^{a}t\n$$
效果:
或:
编号:
$$\n公式 \tag{1}\n$$
效果:
多行公式:
$a \\ b$
效果:
上大括号:
$\overbrace{a,b,c}^{t}$
效果:
下大括号:
$\underbrace{a,b,c}^{t}$
效果:
分数:
$\frac{a}{b}$
效果:
次方根:
$\sqrt{n}$
效果:
4种矩阵:
1:
\begin{matrix} 1,2,3 \\ 4,5,6 \\ 7,8,9 \end{matrix}
效果:
2:
$\begin{bmatrix} 1,2,3 \\ 4,5,6 \\ 7,8,9 \end{bmatrix}$
效果:
3:
$\begin{vmatrix} 1,2,3 \\ 4,5,6 \\ 7,8,9 \end{vmatrix}$
效果:
4:
$\begin{pmatrix} 1,2,3 \\ 4,5,6 \\ 7,8,9 \end{pmatrix}$
效果:
方程组:
$\begin{cases} a \\ b,& c \end{cases}$
效果:
公式组合:
$$\n\begin{equation*} a \begin{cases} 1 \\ 2 \end{cases} \end{equation*}\n$$
效果:
3.LaTeX符号详解
先放一个概念神看看有没有人认识:
$\varnothing$
文字大小:
最大:
$\Huge text$
效果:
超大:
$\huge text$
效果:
很大:
$\LARGE text$
效果:
较大:
$large text$
效果:
标准:
$\normalsize text$
效果:
直接写也是这么大较小:
$\small text$
效果:
很小:
$\footnotesize text$
效果:
超小:
$\scriptsize text$
效果:
最小:
$\tiny text$
效果:
方框:
$\boxed {text}$
效果:
符号(太多了直接把省略$的形式放出来)
\times
\div
\star
\infty
\geq
\leq
\neq
\approx
\gt
\le
\ngtr
\nless
\leftarrow
\rightarrow
\longleftarrow
\longrightarrow
\Leftarrow
\Rightarrow
\Longleftarrow
\Longrightarrow
\leftrightarrow
\longleftrightarrow
\uparrow
\downarrow
\Uparrow
\Downarrow
\updownarrow
\Updownarrow
\circlearrowleft
\circlearrowright
\pm
\mp
\prod
\sum
\int
\iint
\iiint
\oint
\oiint
\oiiint
\lfloor
\rfloor
\lceil
\rceil
\in
\ni
\notin
\notni
\exists
\nexists4.Markdown语法详解
Tip:
Markdown和LaTeX可以在发帖时混用
文件内不行标题:
# 1
## 2
### 3
#### 4
##### 5
###### 6
效果:
1
2
3
4
5
6
斜体:
*text*
效果:
text加粗:
**text**
效果:
text下划线:
~~text~~
效果:
text链接:
[豆包](doubao.com)
效果:
豆包图片:

效果:
列表:
- text
+ text
* text
1. text
2. text
效果:
- text
- text
- text
- text
- text
引用:
>text
效果:
text
分割线
***
效果
对齐表格:
|---1---|---2---|---3---|
|:---|:---:|---:|
|text|text|text|
效果:
| ---1--- | ---2--- | ---3--- |
|---|---|---|
| text | text | text |
脚注:
text[^1]
[^1]:text
效果:
text[1]5.颜色调节
$\color{Transparent}{\boxed{Transparent}}$
$\color{AliceBlue}{\boxed{AliceBlue}}$
$\color{AntiqueWhite}{\boxed{AntiqueWhite}}$
$\color{Aqua}{\boxed{Aqua}}$
$\color{Aquamarine}{\boxed{Aquamarine}}$
$\color{Azure}{\boxed{Azure}}$
$\color{Beige}{\boxed{Beige}}$
$\color{Bisque}{\boxed{Bisque}}$
$\color{Black}{\boxed{Black}}$
$\color{BlanchedAlmond}{\boxed{BlanchedAlmond}}$
$\color{Blue}{\boxed{Blue}}$
$\color{BlueViolet}{\boxed{BlueViolet}}$
$\color{Brown}{\boxed{Brown}}$
$\color{BurlyWood}{\boxed{BurlyWood}}$
$\color{CadetBlue}{\boxed{CadetBlue}}$
$\color{Chartreuse}{\boxed{Chartreuse}}$
$\color{Chocolate}{\boxed{Chocolate}}$
$\color{Coral}{\boxed{Coral}}$
$\color{CornflowerBlue}{\boxed{CornflowerBlue}}$
$\color{Crimson}{\boxed{Crimson}}$
$\color{Cyan}{\boxed{Cyan}}$
$\color{DarkBlue}{\boxed{DarkBlue}}$
$\color{DarkCyan}{\boxed{DarkCyan}}$
$\color{DarkGoldenrod}{\boxed{DarkGoldenrod}}$
$\color{DarkGray}{\boxed{DarkGray}}$
$\color{DarkKhaki}{\boxed{DarkKhaki}}$
$\color{DarkOliveGreen}{\boxed{DarkOliveGreen}}$
$\color{DarkOrange}{\boxed{DarkOrange}}$
$\color{DarkOrchid}{\boxed{DarkOrchid}}$
$\color{DarkRed}{\boxed{DarkRed}}$
$\color{DarkSalmon}{\boxed{DarkSalmon}}$
$\color{DarkSeaGreen}{\boxed{DarkSeaGreen}}$
$\color{DarkSlateBlue}{\boxed{DarkSlateBlue}}$
$\color{DarkSlateGray}{\boxed{DarkSlateGray}}$
$\color{DarkTurquoise}{\boxed{DarkTurquoise}}$
$\color{DarkViolet}{\boxed{DarkViolet}}$
$\color{DeepPink}{\boxed{DeepPink}}$
$\color{DeepSkyBlue}{\boxed{DeepSkyBlue}}$
$\color{DimGray}{\boxed{DimGray}}$
$\color{DodgerBlue}{\boxed{DodgerBlue}}$
$\color{Firebrick}{\boxed{Firebrick}}$
$\color{FloralWhite}{\boxed{FloralWhite}}$
$\color{ForestGreen}{\boxed{ForestGreen}}$
$\color{Fuchsia}{\boxed{Fuchsia}}$
$\color{Gainsboro}{\boxed{Gainsboro}}$
$\color{GhostWhite}{\boxed{GhostWhite}}$
$\color{Gold}{\boxed{Gold}}$
$\color{Goldenrod}{\boxed{Goldenrod}}$
$\color{Gray}{\boxed{Gray}}$
$\color{Green}{\boxed{Green}}$
$\color{GreenYellow}{\boxed{GreenYellow}}$
$\color{Honeydew}{\boxed{Honeydew}}$
$\color{HotPink}{\boxed{HotPink}}$
$\color{IndianRed}{\boxed{IndianRed}}$
$\color{Indigo}{\boxed{Indigo}}$
$\color{Ivory}{\boxed{Ivory}}$
$\color{Khaki}{\boxed{Khaki}}$
$\color{Lavender}{\boxed{Lavender}}$
$\color{LavenderBlush}{\boxed{LavenderBlush}}$
$\color{LawnGreen}{\boxed{LawnGreen}}$
$\color{LemonChiffon}{\boxed{LemonChiffon}}$
$\color{LightBlue}{\boxed{LightBlue}}$
$\color{LightCoral}{\boxed{LightCoral}}$
$\color{LightCyan}{\boxed{LightCyan}}$
$\color{LightGoldenrodYellow}{\boxed{LightGoldenrodYellow}}$
$\color{LightGray}{\boxed{LightGray}}$
$\color{LightGreen}{\boxed{LightGreen}}$
$\color{LightPink}{\boxed{LightPink}}$
$\color{LightSalmon}{\boxed{LightSalmon}}$
$\color{LightSeaGreen}{\boxed{LightSeaGreen}}$
$\color{LightSkyBlue}{\boxed{LightSkyBlue}}$
$\color{LightSlateGray}{\boxed{LightSlateGray}}$
$\color{LightSteelBlue}{\boxed{LightSteelBlue}}$
$\color{LightYellow}{\boxed{LightYellow}}$
$\color{Lime}{\boxed{Lime}}$
$\color{LimeGreen}{\boxed{LimeGreen}}$
$\color{Linen}{\boxed{Linen}}$
$\color{Magenta}{\boxed{Magenta}}$
$\color{Maroon}{\boxed{Maroon}}$
$\color{MediumAquamarine}{\boxed{MediumAquamarine}}$
$\color{MediumBlue}{\boxed{MediumBlue}}$
$\color{MediumOrchid}{\boxed{MediumOrchid}}$
$\color{MediumPurple}{\boxed{MediumPurple}}$
$\color{MediumSeaGreen}{\boxed{MediumSeaGreen}}$
$\color{MediumSlateBlue}{\boxed{MediumSlateBlue}}$
$\color{MediumSpringGreen}{\boxed{MediumSpringGreen}}$
$\color{MediumTurquoise}{\boxed{MediumTurquoise}}$
$\color{MediumVioletRed}{\boxed{MediumVioletRed}}$
$\color{MidnightBlue}{\boxed{MidnightBlue}}$
$\color{MintCream}{\boxed{MintCream}}$
$\color{MistyRose}{\boxed{MistyRose}}$
$\color{Moccasin}{\boxed{Moccasin}}$
$\color{NavajoWhite}{\boxed{NavajoWhite}}$
$\color{Navy}{\boxed{Navy}}$
$\color{OldLace}{\boxed{OldLace}}$
$\color{Olive}{\boxed{Olive}}$
$\color{OliveDrab}{\boxed{OliveDrab}}$
$\color{Orange}{\boxed{Orange}}$
$\color{OrangeRed}{\boxed{OrangeRed}}$
$\color{Orchid}{\boxed{Orchid}}$
$\color{PaleGoldenrod}{\boxed{PaleGoldenrod}}$
$\color{PaleGreen}{\boxed{PaleGreen}}$
$\color{PaleTurquoise}{\boxed{PaleTurquoise}}$
$\color{PaleVioletRed}{\boxed{PaleVioletRed}}$
$\color{PapayaWhip}{\boxed{PapayaWhip}}$
$\color{PeachPuff}{\boxed{PeachPuff}}$
$\color{Peru}{\boxed{Peru}}$
$\color{Pink}{\boxed{Pink}}$
$\color{Plum}{\boxed{Plum}}$
$\color{PowderBlue}{\boxed{PowderBlue}}$
$\color{Purple}{\boxed{Purple}}$
$\color{Red}{\boxed{Red}}$
$\color{RosyBrown}{\boxed{RosyBrown}}$
$\color{RoyalBlue}{\boxed{RoyalBlue}}$
$\color{SaddleBrown}{\boxed{SaddleBrown}}$
$\color{Salmon}{\boxed{Salmon}}$
$\color{SandyBrown}{\boxed{SandyBrown}}$
$\color{SeaGreen}{\boxed{SeaGreen}}$
$\color{Seashell}{\boxed{Seashell}}$
$\color{Sienna}{\boxed{Sienna}}$
$\color{Silver}{\boxed{Silver}}$
$\color{SkyBlue}{\boxed{SkyBlue}}$
$\color{SlateBlue}{\boxed{SlateBlue}}$
$\color{SlateGray}{\boxed{SlateGray}}$
$\color{Snow}{\boxed{Snow}}$
$\color{SpringGreen}{\boxed{SpringGreen}}$
$\color{SteelBlue}{\boxed{SteelBlue}}$
$\color{Tan}{\boxed{Tan}}$
$\color{Teal}{\boxed{Teal}}$
$\color{Thistle}{\boxed{Thistle}}$
$\color{Tomato}{\boxed{Tomato}}$
$\color{Turquoise}{\boxed{Turquoise}}$
$\color{Violet}{\boxed{Violet}}$
$\color{Wheat}{\boxed{Wheat}}$
$\color{White}{\boxed{White}}$
$\color{WhiteSmoke}{\boxed{WhiteSmoke}}$
$\color{Yellow}{\boxed{Yellow}}$
$\color{YellowGreen}{\boxed{YellowGreen}}$
附:
好累啊
写了个15306字符
给个赞吧QAQ
text ↩︎
全部评论 2
- 置顶
求上榜
上榜了在老师面前正太扭腰1周前 来自 浙江
1 不要使用这么多注释会让人感觉有点乱、
1周前 来自 上海
1习惯了sorry
1周前 来自 浙江
1主要是为了提高代码块和正常文字的对比度
1周前 来自 浙江
1一般最好不要叠注释吧,用
---
效果分隔好一些
1周前 来自 上海
1




























有帮助,赞一个