\href {/blog/content/26114/} { \color {grey} { \begin {matrix} \tiny \text {chuan} \quad \text {song} \quad \text {men}\\\ \Huge 入 \Huge 门 \Huge 篇 \end {matrix} } }
\color {white} {我是占位符,看不见我}
\color {gold} {\Huge 初级篇 \small ——熟悉 \LaTeX}
\color {gold} {\mathbf {\Large 本篇目标:}}
\color {gold} {学会文本和换行}
\color {gold} {学会使用上下标}
\color {gold} {学会使用大括号}
\color {gold} {学会 \max \min \lim 和 \text { mod } 等公式}
\color {gold} {学会一些初级符号的使用}
\color {gold} {学会使用大型运算符及一些希腊字母}
\color {gold} {学会使用上下划线与方框}
\color {white} {我是占位符,看不见我}
七、文本
\color {white} {我是占位符,看不见我}
由于很多人都不知道文本有什么用处,这里先举一个例子:
\color {white} {我是占位符,看不见我}
有一个人叫做 \text { Sheeauffarng}
\color {white} {我是占位符,看不见我}
有些读者可能会发现自己打的公式是这样子:
\color {white} {我是占位符,看不见我}
有一个人叫做 Sheeauffarng
$有一个人叫做 Sheeauffarng$
\color {white} {我是占位符,看不见我}
当一个或一串字母作为人名、地名或其它不属于公式的字母出现在公式中时,这样打未免有些不美观。这时,\text
便大有用处了。
使用方法:在特定的一个 可见 字符前面加上 \text
,那 一个字符 就会被文本化。
例如:
\color {white} {我是占位符,看不见我}
小 \text Z 的袜子
$小 \text Z 的袜子$
\color {white} {我是占位符,看不见我}
如果没有加 \text
,效果如下:
\color {white} {我是占位符,看不见我}
小 Z 的袜子
$小 Z 的袜子$
\color {white} {我是占位符,看不见我}
所以,适当的时候加上 \text
是会让我们的排版更美观的。
思考:例子中的 \text {Sheeauffarng} 是怎么打出来的?难道要 $\text S \text h \text e \text e ... \text n \text g$
这样一个字一个字地打出来吗(具体参见第十章)
八、换行 * \tiny {(标题带 * 号的为选学内容)}
\color {white} {我是占位符,看不见我}
众所周知,许多编程语言的换行符都是 \n
,但是,怎样在 \LaTeX 中换行呢?
在 AcWing
中,\LaTeX 的换行符是 \\\
(三个 \
)。而在大多数网站中换行符则是 \\
(两个 \
)。
例如:
\color {white} {我是占位符,看不见我}
静夜思 \\\ 唐·李白 \\\ 床前明月光, \\\ 疑是地上霜。 \\\ 举头望明月, \\\ 低头思故乡。 \\\
$$
静夜思 \\\
唐·李白 \\\
床前明月光, \\\
疑是地上霜。 \\\
举头望明月, \\\
低头思故乡。 \\\
$$
\color {white} {我是占位符,看不见我}
是不是很简单?
九、上下标
\color {white} {我是占位符,看不见我}
相信读者们对这类公式已经熟得不能再熟了:
\color {white} {我是占位符,看不见我}
x ^ 2
a _ i
1 \le n \le 2 \times 10 ^ 5 \\\ 1 \le c _ i \le 10 ^ 9
$x ^ 2$
$a _ i$
$
1 \le n \le 2 \times 10 ^ 5 \\\
1 \le c _ i \le 10 ^ 9
$
像 x ^ 2, 10 ^ 5, 10 ^ 9 中的 ^ 2 \text { } ^ 5 \text { } ^ 9 被称作 上标(指数)。
a ^ b 使用方法:a ^ b
如:
\color {white} {我是占位符,看不见我}
2 ^ x
$2 ^ x$
n ^ 5
$n ^ 5$
4 ^ 7
$4 ^ 7$
\color {white} {我是占位符,看不见我}
像 a _ i, c _ i 中的 _ i 被称为 下标。
a _b 使用方法: $a _ b$
如:
\color {white} {我是占位符,看不见我}
b _ i
$b _ i$
S _ 0
$S _ 0$
c _ i + c _ j
$c _ i + c _ j$
\color {white} {我是占位符,看不见我}
但是,有些细心的读者可能会发现,类似 10 ^ {18}, w _ \text {car} 的公式会显示 10 ^ 18, w _ \text c \text {ar} 的效果,这是怎么一回事呢?(具体参见下一章)
十、括号来帮忙
\color {white} {我是占位符,看不见我}
在 LaTeX 中,大括号 {
和 }
是个不可或缺的角色,用大括号括起来的公式,在括号外视为一个整体。
如之前提到的 \text {Sheeauffarng},其实不用 $\text S \text h \text e \text e ... \text n \text g$
这样一个字一个字打出来而是 $\text {Sheeauffarng}$
就可以了。10 ^ {18} 也可以用 $10 ^ {18}$
显示出来。
如:
\color {white} {我是占位符,看不见我}
n ^ {10}
$n ^ {10}$
\text {car}
$\text {car}$
a _ {i, j}
$a _ {i, j}$
\LaTeX ^ {\TeX}
$\LaTeX ^ {\TeX}$
\color {white} {我是占位符,看不见我}
当我们没用大括号时,自然也看不到美观的公式。所以,不得不说,大括号在公式中是十分重要的。
十一、特殊公式 * \tiny {(标题带 * 号的为选学内容)}
\color {white} {我是占位符,看不见我}
我们时常会遇到这类公式:
\max \limits _ {1 \le i \le n} \{ a _ i \}, \min \{ 2, x ^ 2 - y\}, \mathop {\lim} \limits_ {\Delta \rightarrow 0} \frac {f (x + \Delta) - f (x)} {\Delta}, x _ 1 \mod x _ 2, a \equiv b \pmod p
这类公式,如 \max,就和普通的 max 字体不太一样。下面,我们将一一介绍这几个公式:
- \max:最大值
方法: \max
如:
\color {white} {我是占位符,看不见我}
\max {\{ax, 0\}}
$\max {\{ax, 0\}}$
\color {white} {我是占位符,看不见我}
- \min:最小值
方法:\min
如:
\color {white} {我是占位符,看不见我}
\min {\{-2, 2\}}
$\min {\{-2, 2\}}$
\color {white} {我是占位符,看不见我}
- \lim:极限
方法:\lim
如:
\color {white} {我是占位符,看不见我}
\lim \limits _ {\Delta \rightarrow \infty} \Delta
$\lim \limits _ {\Delta \rightarrow \infty} \Delta$
\color {white} {我是占位符,看不见我}
- \lg:常用对数
方法:\lg
如:
\color {white} {我是占位符,看不见我}
\lg {233}
$\lg {233}$
\color {white} {我是占位符,看不见我}
- \ln:自然对数
方法:\ln
如:
\color {white} {我是占位符,看不见我}
\ln {114514}
$\ln {114514}$
\color {white} {我是占位符,看不见我}
- \log:对数
方法:\log
如:
\color {white} {我是占位符,看不见我}
\log _ 2 {1919810}
$\log _ 2 {1919810}$
\color {white} {我是占位符,看不见我}
- \gcd:最大公因数
方法:\gcd
如:
\color {white} {我是占位符,看不见我}
\gcd {(114, 514)}
$\gcd {(114, 514)}$
\color {white} {我是占位符,看不见我}
- \sin:正弦
方法:\sin
如:
\color {white} {我是占位符,看不见我}
\sin ^ 2 {45 ^ \circ}
$\sin ^ 2 {45 ^ \circ}$
\color {white} {我是占位符,看不见我}
- \cos:余弦
方法:\cos
如:
\color {white} {我是占位符,看不见我}
\cos {45 ^ \circ}
$\cos {45 ^ \circ}$
\color {white} {我是占位符,看不见我}
- \tan:正切
方法:\tan
如:
\color {white} {我是占位符,看不见我}
\tan {45 ^ \circ}
$\tan {45 ^ \circ}$
\color {white} {我是占位符,看不见我}
- \cot:余切
方法:\cot
如:
\color {white} {我是占位符,看不见我}
\cot {45 ^ \circ}
$\cot {45 ^ \circ}$
\color {white} {我是占位符,看不见我}
- \arcsin:反正弦
方法:\arcsin
如:
\color {white} {我是占位符,看不见我}
\arcsin {0.5}
$\arcsin {0.5}$
\color {white} {我是占位符,看不见我}
- \arccos:反余弦
方法:\arccos
如:
\color {white} {我是占位符,看不见我}
\arccos {0.5}
$\arccos {0.5}$
\color {white} {我是占位符,看不见我}
- \arctan:反正切
方法:\arctan
如:
\color {white} {我是占位符,看不见我}
\arctan {0.5}
$\arctan {0.5}$
\color {white} {我是占位符,看不见我}
- \bmod {}:取模(余数)
方法:\bmod
如:
\color {white} {我是占位符,看不见我}
a \bmod 3 = 1
$a \bmod 3 = 1$
\color {white} {我是占位符,看不见我}
- \pmod {}:同余
方法:\pmod
如:
\color {white} {我是占位符,看不见我}
a \equiv 1 \pmod 3
$a \equiv 1 \pmod 3$
\color {white} {我是占位符,看不见我}
十二、初级符号
\color {white} {我是占位符,看不见我}
本章,我们将要学 8 个初级符号:\lt, \gt, \le, \ge, \neq, \times, \div, \sim。
- \lt, \gt, \le, \ge, \neq
不等号在 \LaTeX 中是非常常见的,是作为 \LaTeX 必须熟练掌握的内容。
其中,\lt, \gt 可以用 <
>
直接打出或使用公式 \lt
\gt
,总之看上去还比较简单。(其中 \text {lt} 可能是 \text {less than} 的意思,\text {gt} 可能是 \text {greater than} 的意思,猜的)
如:
\color {white} {我是占位符,看不见我}
1 \lt 2, 5 \gt -1
$1 \lt 2, 5 \gt -1$
\color {white} {我是占位符,看不见我}
\le, \ge 则是 大于等于、小于等于 的意思,可以用公式 \le
\ge
打出。(其中 \text {le} 应该是 \text {less} 和 \text {equals} 的合成,\text {ge} 则应该是 \text {greater} 和 \text {equals} 的合成)
如:
\color {white} {我是占位符,看不见我}
1 \le n \le 10 ^ 5 \\\ 2 ^ x \ge y
$1 \le n \le 10 ^ 5 \\\ 2 ^ x \ge y$
\color {white} {我是占位符,看不见我}
\neq 则是 不等号,写作 \neq
或 \not =
(推荐用前者)。\not
则是把后面的字符划掉。
如:
\color {white} {我是占位符,看不见我}
x \neq 1 \\\ abc \neq 0
$x \neq 1 \\\ abc \neq 0$
\color {white} {我是占位符,看不见我}
- \times, \div
在 \LaTeX 中,乘号 \times 可以用 \times
打出,除号 \div 可以用 \div
(\text {divided by,除以})打出。
如:
\color {white} {我是占位符,看不见我}
1 \le n, m \le 2 \times 10 ^ 5 \\ 4 \div (-2) = -2
$1 \le n, m \le 2 \times 10 ^ 5 \\ 4 \div (-2) = -2$
\color {white} {我是占位符,看不见我}
- \sim
~
(……到……或是相似)号在 \LaTeX 中可以用 \sim
\text {(similar,相似)} 打出。
如:
\color {white} {我是占位符,看不见我}
\text {从} 1 \sim 10 \\\ \triangle abc \sim \triangle abd
$\text {从} 1 \sim 10 \\\ \triangle abc \sim \triangle abd$
\color {white} {我是占位符,看不见我}
- 附:反斜杠 \backslash、撇 \prime
\LaTeX 中,反斜杠的表示方法为 \backslash \backslash
;撇 \prime 则用 \prime
打出。
十三、初级符号(拓展)* \tiny {(标题带 * 号的为选学内容)}
(本篇纯属娱乐)
\color {white} {我是占位符,看不见我}
这篇,我们就来 扯一下数学符号中的奇葩 谈谈一些非主流的数学符号。
首先请看这个:\not <, \not >, \not \le, \not \ge。
$\not <, \not >, \not \le, \not \ge$
这些 奇怪的 符号分别表示不小于 \not <
(等同于 \ge)、不大于 \not >
(等同于 \le)、不小于等于 \not \le
(等同于 >)和不大于等于 \not \ge
(等同于 <)。(说真的,这些符号真没啥用)
更有甚者,造出了奇怪的乘号: \not \backslash
$\not \backslash$
还有奇怪的加号和除号:- \kern {-0.5 em} | \kern {0.5 em}, - \kern {-0.8 em} :
源码有点超纲,就不发了。
总之,可以用 \LaTeX 做出千奇百怪的符号,希望读者的思维也不要被一些死板的公式束缚住。
十四、初级符号之对称符号组合
\color {white} {我是占位符,看不见我}
本篇,我们来讲一些对称的符号组合。
首先就是 小括号(圆括号)()
、中括号(方括号)[]
和 大括号(花括号)\{\}
:(), [], \{\}
注:大括号 \lbrace \rbrace 也可以用 \lbrace
\rbrace
打出。
绝对值符号 || 需要 ||
打出,如:
\color {white} {我是占位符,看不见我}
|x - 3|
$|x - 3| + 1$
\color {white} {我是占位符,看不见我}
注:绝对值符号 \lvert \rvert 也可以用 \lvert
\rvert
打出。
向下取整符号 \lfloor \rfloor 需要 \lfloor \rfloor
打出,如:
\color {white} {我是占位符,看不见我}
S = \lfloor 60 \% x + 43.2 \rfloor - 2
$S = \lfloor 60 \% x + 43.2 \rfloor - 2$
\color {white} {我是占位符,看不见我}
向上取整符号 \lceil \rceil 要用 \lceil \rceil
才能打出,如:
\color {white} {我是占位符,看不见我}
2 \lceil x + 2y - 3z \rceil + 1
$2 \lceil x + 2y - 3z \rceil + 1$
\color {white} {我是占位符,看不见我}
十五、再谈上下标 * \tiny {(标题带 * 号的为选学内容)}
\color {white} {我是占位符,看不见我}
在第九章中,我们讲到了简单了上下标 a ^ b 和 a _ b。这里,我们稍微涉及两个上下标的拓展方面。
上下标并用
初级
\color {white} {我是占位符,看不见我}
相信读者们应该都知道组合排列数公式公式吧。它们分别是 C _ n ^ m 和 A _ n ^ m。
$C _ n ^ m$
A _ n ^ m
a _ b ^ c 的用法是 a _ b ^ c
,如:
\color {white} {我是占位符,看不见我}
C _ {n + k} ^ k, f _ x ^ \prime
$C _ {n + k} ^ k, f _ x ^ \prime$
\color {white} {我是占位符,看不见我}
高级
还有一种奇奇怪怪的公式(作者不知道有啥用),类型为 _ b ^ c a _ d ^ e _ b ^ c a _ d ^ e
。这里就不详细举例了。
上下标套上下标(套娃)
\color {white} {我是占位符,看不见我}
比如说,你想打出 “2 的 a _ i 次方” 的效果,你会怎么办呢?
首先可以发现,$2 ^ a _ i$
是不行的,它会打出 2 ^ a _ i 的效果。
原因是 \LaTeX 也是从左往右依次运算的。它不会吧 a _ i 当成一个整体去运算。
那么,该怎么办呢?
这时候,就要用到第十章中提到的大括号了。
\LaTeX 会把大括号内的东西当作一个整体去参加括号以外的运算,相当于混合运算中的括号一样。
所以,我们可以用 $2 ^ {a _ i}$
来打出效果:2 ^ {a _ i}
同样的,我们可以用 $a _ {b ^ c}$
来打出 a _ {b ^ c}。
像 2 ^ {2 ^ x} 这种公式可千万不要打成 $2 ^ 2 ^ x$
这种鬼东西,否则 \LaTeX 会报错:2 ^ 2 ^ x 或者 \boxed {\text {TeX parse error: Double exponent: use braces to clarify}}
还有 a _ {b _ c},同样道理,这里就不多说了。
举几个例子:
\color {white} {我是占位符,看不见我}
2 ^ {x ^ 3}
$2 ^ {x ^ 3}$
x ^ {a _ 0}
$x ^ {a _ 0}$
x _ {2 ^ i}
$x _ {2 ^ i}$
{\text {fyz}} _ {\text {dis} _ u}
${\text {fyz}} _ {\text {dis} _ u}$
\color {white} {我是占位符,看不见我}
(后面的都是鬼畜,急着学真本领的读者可以略过本章的以下部分)
在前面所讲的基础上,我们可以搞出类似这样的鬼东西:2 ^ {2 ^ {2 ^ {2 ^ x}}}
$2 ^ {2 ^ {2 ^ {2 ^ x}}}$
是不是很像套娃?
还可以继续套下去:2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ x}}}}}}}}}}}}}}}
$2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ x}}}}}}}}}}}}}}}$
画面逐渐离谱:
2 ^ {2 ^ {2 ^ {2 ^ {2 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}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}$
类似的,还有鬼畜的下标:
a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ i}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
$a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ i}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}$
可以做出大于号了:
2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ i}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
$2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ {2 ^ {a _ {a _ i}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}$
在高级篇还会介绍另一种鬼畜:A \kern {-0.8 em} K \kern {-0.8 em} I \kern {-0.8 em} O \kern {-0.8 em} I (读者们可以试试复制这行奇怪的字)
十六、大型运算符及另一种上下标
(注:本章涉及知识点较多,难度较大,是初级篇难度的天花板,所以请读者们尽力读懂本章)
\color {white} {我是占位符,看不见我}
求和符号 为 \sum,可以用 \sum
打出;求积符号 为 \prod,可以用 \prod
打出。
并集符号(大)为 \bigcap,可以用 \bigcap
打出;交集符号(大)为 \bigcup,可以用 \bigcup
打出。
但是问题来了:平时我们常见的公式 \sum \limits _ {i = 1} ^ n a _ i 是怎么打出来的呢?
有些聪明的读者想用上下标 $\sum _ {i = 1} ^ n a _ i$
解决问题,但是效果却不是很理想:
\sum _ {i = 1} ^ n a _ i
由此可见,这种时候光依靠我们以前的知识是远远不够的,我们还得认识一种新的上下标。
一般来讲,打出这种上下标有两种方法:
法一:
\color {white} {我是占位符,看不见我}
可以用 \limits
来做到这一点。
读者只需 在上下标之前加一个 \limits
就完事了。
如刚才的例子 \sum \limits _ {i = 1} ^ n a _ i,可以这样打出:
$\sum \limits _ {i = 1} ^ n a _ i$
再举一个例子:
\color {white} {我是占位符,看不见我}
\prod \limits _ {i = 1} ^ {n} {C _ n ^ i 2 ^ i p _ i + 1}
$\prod \limits _ {i = 1} ^ {n} {C _ n ^ i 2 ^ i p _ i + 1}$
\color {white} {我是占位符,看不见我}
法二:
\color {white} {我是占位符,看不见我}
可以用 \overset
与 \underset
来实现。
\overset a b 的使用方法为 \overset a b
;
\underset a b 的使用方法为 \underset a b
。
但是这个办法有一个缺陷:就是这种特殊的 上下标很难并用 (如果有读者想到了如何效果较为正常地并用,欢迎在评论区留言~) 还有用这种方法打出来的公式有时会有点奇怪。所以推荐读者用法一来打。
如:
\color {white} {我是占位符,看不见我}
\overset S \bigcap(当然这个公式是不完整的)
$\overset S \bigcap$
\underset {S \in T} \bigcup S \cap \{11, 4, 5, 14\}
$\underset {S \in T} \bigcup S \cap \{11, 4, 5, 14\}$
\color {white} {我是占位符,看不见我}
十七、希腊字母 * \tiny {(标题带 * 号的为选学内容)}
\color {white} {我是占位符,看不见我}
希腊字母,指 \alpha, \beta, \gamma, \delta 等符号。
希腊字母在 \LaTeX 可以 用 \
加上那个字母的英文。
如 \alpha 为 \alpha
,\mu 为 \mu
。
大写字母(有些可以,有些则不行)则是 把开头的字母改为大写字母。
如 \Pi 为 \Pi
,\Delta 为 \Delta
。
其中比较常用的有 \alpha, \beta, \gamma, \Delta, \eta, \theta, \mu, \pi, \Pi, \Sigma, \phi。
$\alpha, \beta, \gamma, \Delta, \eta, \theta, \mu, \pi, \Pi, \Sigma, \phi$
十八、正负号
\color {white} {我是占位符,看不见我}
正负号 \pm 在 \LaTeX 里的用法十分简单,可以用 \pm
打出。
如:
\color {white} {我是占位符,看不见我}
\pm 2
$\pm 2$
\color {white} {我是占位符,看不见我}
十九、上划线、下划线和方框 * \tiny {(标题带 * 号的为选学内容)}
\color {white} {我是占位符,看不见我}
在 \LaTeX 中,上划线 \overline {\color {white} {我是占位符,看不见我}} 可以在字符(串)前加上 \overline
打出;下划线 \underline {\color {white} {我是占位符,看不见我}} 可以在字符(串)前加上 \underline
打出。
如:
\color {white} {我是占位符,看不见我}
\overline 1, \overline {\text {qwq}}
$\overline 1, \overline {\text {qwq}}$
\underline {\text {Sheeauffarng}}, \underline {2 ^ {xy}}
$\underline {\text {Sheeauffarng}}, \underline {2 ^ {xy}}$
\color {white} {我是占位符,看不见我}
方框 \boxed {\color {white} {我是占位符,看不见我}} 则可以在字符(串)前加上 \boxed
打出。
如:
\color {white} {我是占位符,看不见我}
\boxed {\\#}, \boxed {这是一个方框}
$\boxed {\\#}, \boxed {这是一个方框}$
\color {white} {我是占位符,看不见我}
练习来咯!
二十、练习
\color {white} {我是占位符,看不见我}
初级篇的练习可能会有一点难哦~
1. \text {Fyz} _ {233} \text {is a } \boxed {\text {Sheeauffarng}} \text {.}
2. \text {Fyz can calculate this:} \\\ 2 ^ {\ln {e ^ {114514}}} \times 1919810 + 3
3. \text {Fyz says, “What’s up?”} \\\ \overline {\underline {\LaTeX}} \text { says, “} \overline {\underline {\TeX}} \text { equals } \max {\{10086 ^ {114514}, 2 ^ {1919810}\}} \text {.”}
4. x ^ {kun _ i} \equiv 1 \pmod {qwq _ i}
5. \lfloor 10x + y - 1.4z \rfloor ^ {\sum \limits _ {i = 1} ^ n {\lceil a i ^ i \rceil}}
6. \prod \limits _ {i = 1} ^ {\lfloor \log _ \pi n \rfloor} \Big |a _ {\lfloor \pi ^ i \rfloor} - qwq \Big |(提示:在绝对值符号 | 前加上 \Big
)
7. \Delta = b ^ 2 - 4ac, x = \Delta \pm \pi ^ \pi
8. \LaTeX \text { is } \phi {(114514)} \times \TeX ^ {\TeX + \pi}
9. xy \neq 0, \ln x \le \log _ \pi y, x ^ e \ge y ^ {z ^ \pi}
10. \underline {\text {Fyz}} \text { thinks } \boxed {\lfloor 2x \rfloor + 3 \le \prod \limits _ {i = 1} ^ n (i + 1) \text { and } |\pm \pi| ^ {\sum \limits _ {i = 1} ^ n p _ i q _ i} + 2 ^ {2 ^ {2 ^ {a _ i}}} = \pi ^ e} .
\huge 参考答案 \downarrow \downarrow \downarrow
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
$\text {Fyz} _ {233} \text {is a } \boxed {\text {Sheeauffarng}} \text {.}$
$\text {Fyz can calculate this:} \\\ 2 ^ {\ln {e ^ {114514}}} \times 1919810 + 3$
$\text {Fyz says, "What's up?"} \\\ \overline {\underline {\LaTeX}} \text { says, "} \overline {\underline {\TeX}} \text { equals } \max {\{10086 ^ {114514}, 2 ^ {1919810}\}} \text {."}$
$x ^ {kun _ i} \equiv 1 \pmod {qwq _ i}$
$\lfloor 10x + y - 1.4z \rfloor ^ {\sum \limits _ {i = 1} ^ n {\lceil a i ^ i \rceil}}$
$\prod \limits _ {i = 1} ^ {\lfloor \log _ \pi n \rfloor} \Big |a _ {\lfloor \pi ^ i \rfloor} - qwq \Big |$
$\Delta = b ^ 2 - 4ac, x = \Delta \pm \pi ^ \pi$
$\LaTeX \text { is } \phi {(114514)} \times \TeX ^ {\TeX + \pi}$
$xy \neq 0, \ln x \le \log _ \pi y, x ^ e \ge y ^ {z ^ \pi}$
$\underline {\text {Fyz}} \text { thinks } \boxed {\lfloor 2x \rfloor + 3 \le \prod \limits _ {i = 1} ^ n (i + 1) \text { and } |\pm \pi| ^ {\sum \limits _ {i = 1} ^ n p _ i q _ i} + 2 ^ {2 ^ {2 ^ {a _ i}}} = \pi ^ e} .$
\color {white} {我是占位符,看不见我}
如果这份练习你全对了,那么恭喜你,你成功通过了初级关卡,即将要进入中级篇了。祝你在学 \LaTeX 的路上一帆风顺!
(初级篇完)
字数:\text {约 7.9 千字}
\text {Upd: 2022-12-24}
哈~ 终于更完了
接下来可能要断更一会儿了
中极篇开更了
催更
催更
阅读量 100 兼点赞 12 就开始更中极篇
已经可以开更了
好
十九的方框应该是boxed不是overline
感谢
写反了
如果要写分数的取整符号,按照上文的写法是:\lfloor \dfrac{2}{s} \rfloor。
$\lfloor \dfrac{2}{s} \rfloor$
。还有另一种写法,比较好看:\left\lfloor \dfrac{2}{s} \right\rfloor。
$\left\lfloor \dfrac{2}{s} \right\rfloor$
\underline{\text Fyz} \text{ thinks } \boxed{\lfloor2x\rfloor + 3 \le \prod \limits _ {i = 1} ^ n{(i + 1)}\text{ and } \lvert\pm \pi \rvert ^ {\sum \limits _ {i = 1} ^ n p_iq_i} + 2^{2^{2 ^ {a_i}}} = \pi^e} \text{.}
2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {2 ^ {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异的符号
\LaTeX^\TeX
??
\TeX是分开的??
\TeX^{\LaTeX}
\TeX\neq T_{\Large{E}}X
$\TeX\neq T_{\Large{E}}X$
a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ {a _ i}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
- \kern {-0.55 em} |, - \kern {-0.85 em} :
已经很接近了:)
$- \kern {-0.55 em} |, - \kern {-0.85 em} :$
- \kern {-0.55 em} |, - \kern {-0.75 em} :
- \kern {-0.5 em} |, - \kern {-0.8 em} :
- \kern {-0.6 em} |, - \kern {-0.8 em} :
- \kern {-0.5 em} | \kern {0.5 em}, - \kern {-0.8 em} :
今天做题就遇到了钙离子撞击锎靶,产生Og
{_{98}^{249}C f}