一、为什么要使用 LATEX 公式
我是占位符,看不见我
LATEX 是一个实用的数学排版公式,能让你的公式更清楚,更美观。
比如:
不用LATEX:
(画面粗糙)
或
(稍微美观一点)
使用LATEX:
我是占位符,看不见我
{x=1y=2 (是不是美观了很多?)
我是占位符,看不见我
看来,遇到一些复杂的公式,LATEX 也能整洁美观地表达出来,也比画图要来得高效。
顺带一提,LATEX 也能让你的题解显得更高级,显得你更有水平。
接下来,就是一篇实用的LATEX教程。
(有问题的可以在评论区反馈哦)
我是占位符,看不见我
\color {grey} {\Huge 入门篇 \small ——走近 \LaTeX}
\color {grey} {\mathbf {\Large 本篇目标:}}
\color {grey} {学会声明 \LaTeX 和数字}
\color {grey} {学会使用简单符号}
\color {grey} {学会第一个公式——\LaTeX}
\color {white} {我是占位符,看不见我}
二、声明 \LaTeX
\color {white} {我是占位符,看不见我}
\LaTeX 一般需要用 $$
来声明(公式在两个 $
之间)。
如:
\color {white} {我是占位符,看不见我}
我是公式
$我是公式$
\color {white} {我是占位符,看不见我}
例子中,第一行为公式效果,第二行为公式的源代码,即输入第二行可达到第一行的效果。
还有一种公式的声明方法,即把公式放在一对 $$
中间,可以使公式居中显示。
如:
\color {white} {我是占位符,看不见我}
我是公式
$$我是公式$$
\color {white} {我是占位符,看不见我}
这样,就可以声明一个 \LaTeX 公式了。
但是有时候公式会太长,写起来很难受。这时,我们就可以分行写:
\color {white} {我是占位符,看不见我}
床前明月光, 疑是地上霜。 举头望明月, 低头思故乡。 ——唐·李白
$
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。
——唐·李白
$
(当然,这个例子写起来并不会很难受。但随着知识的积累,相信读者很快就能体会到这一点的)
\color {white} {我是占位符,看不见我}
三、数字
\color {white} {我是占位符,看不见我}
\LaTeX 的数字特别简单,只要把数字照抄下来就可以了。
如:
\color {white} {我是占位符,看不见我}
10435
$10435$
\color {white} {我是占位符,看不见我}
是不是非常简单?
四、简单符号
\color {white} {我是占位符,看不见我}
符号是 \LaTeX 中非常重要的部分,也是读者必须要掌握内容。
一般来说,符号在 \LaTeX 中有三种方式:
-
直接用
-
在符号之前加
\
-
特殊公式
全角字符和一些半角字符都是第一种情况。如果遇到第一种情况,试一试就可以了。
常用的有:
\color {white} {我是占位符,看不见我}
? ! @ , . < > / | ( ) * - + = [ ] ‘’ “” : ; (注:<
和 >
用 <
\lt
和 >
\gt
打都可以)
$? ! @ , . < > / | ( ) * - + = [ ] '' """ : ;$
\color {white} {我是占位符,看不见我}
接下来重点讲第二种情况。
由于有些符号与 \LaTeX 的格式中带有的符号重复,或者其它原因,一些符号前面要加上 \
才能正常显示。
常见的有:
\color {white} {我是占位符,看不见我}
\$ \% \&
$\$ \% \&$
\color {white} {我是占位符,看不见我}
五、入门第一个公式: \LaTeX * \tiny {(标题带 * 号的为选学内容)}
在学完最基础的部分之后,应当适当穿插一些公式了。本章,我们将学习打最简单的公式——\LaTeX。
显示 \LaTeX 的方法:
\color {white} {我是占位符,看不见我}
\LaTeX
$\LaTeX$
\color {white} {我是占位符,看不见我}
同样的,还有:
\TeX
$\TeX$
如果你读懂了,那么,恭喜你掌握了人生中 \LARGE ^ 第 一 ^ {个 ^ {\LaTeX} _ {公式}}。
接下来就是练习咯!
六、入门练习
\color {white} {我是占位符,看不见我}
1. 公式 12:(注意 :
是全角符号)
2. 我爱 \LaTeX
3. 1 + 1 + 4 - 5 + 1 - 4 = -2 (???)
4. Case \# 1: 60 \$ + 50 \$ - 20 \$ = 90 \$, 1.3 + 50 \% = 180 \%, S = {1, 2}
5. [\LaTeX + (\LaTeX + \TeX)] + \TeX = 134 \%
\huge 参考答案 \downarrow \downarrow \downarrow
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
\color {white} {我是占位符,看不见我}
$公式 12:$
$$我爱 \LaTeX$$
$1 + 1 + 4 - 5 + 1 - 4 = -2 (???)$
$Case \# 1: 60 \$ + 50 \$ - 20 \$ = 90 \$, 1.3 + 50 \% = 180 \%, S = \{1, 2\}$
$[\LaTeX + (\LaTeX + \TeX)] + \TeX = 134 \%$
\color {white} {我是占位符,看不见我}
如果这份练习你全对了,那么恭喜你,你已经不是一名入门新手了!接下来,就让我们更深层次地来了解 \LaTeX 吧。
(入门篇完)
\href {/blog/content/27284/} { \color {gold} { \begin {matrix} \tiny \text {chuan} \quad \text {song} \quad \text {men}\\\ \Huge 初 \Huge 级 \Huge 篇 \end {matrix} } }
字数:\text 约 1.7 \text {千字}
\text {Upd: 2022-10-29}
发现 bug 者和提出被采纳建议者都有奖
提出
\operatorname {lsz}
\boxed {\color{white}{我是占位符,看不见我}}
\color{white}{我是占位符,看不见我}
你另一个帖是不是有点炸……开不了
az 你用的是什么浏览器,Firefox 可以开啊
Google 的确会崩溃
Microsoft Edge 也不会崩
ok
催更
已经在更啦
初级篇已经写了三千多字了
进阶练习:
\forall p\in\mathbb{P}, \forall k\in\mathbb{N}, \sum\limits_{i=1}^{p-1}i^k\equiv \begin{cases} p-1&\text{if }k\equiv0\pmod{p-1}\\\ 0&\text{otherwise} \end{cases} \pmod p
答案:
$$ \forall p\in\mathbb{P}, \forall k\in\mathbb{N}, \sum\limits_{i=1}^{p-1}i^k\equiv \begin{cases} p-1&\text{if }k\equiv0\pmod{p-1}\\\ 0&\text{otherwise} \end{cases} \pmod p $$
(注意,在 AcWing \LaTeX 的换行是三个斜杠(
\\\
)超进阶练习
答案在“展开源码”那里
感谢
u\leq R_u\leq min\lbrace R_{u+1}-1,\sqrt{\frac {n-min\sum\limits_{i=1}^{u-1}V_i-V}{u}}\rbrace
$u\leq R_u\leq min\lbrace R_{u+1}-1,\sqrt{\frac {n-min\sum\limits_{i=1}^{u-1}V_i-V}{u}}\rbrace$
这个是不是太简单了?这个是在题解里的en
# \Huge{牜 \kern{-12pt}{𤛭}}
#还挺好#
还挺好
还挺好
\LaTeX
\LaTeX
L^A T_E X
L^A T_E X
$L^A T_E X$
\LaTeX
\LaTeX
$\LaTeX$
L^{\kern{-1pt}A}\kern{-1pt}T_{\kern{-1pt}E}\kern{-1pt}X
公式 12\:
我爱 \LaTeX
1 + 1 + 4 - 5 + 1 - 4 = -2 \(\?\?\?\)
Case \\# 1: 60 \$ + 50 \$ - 20 \$ = 90 \$, 1.3 + 50 % = 180 %, S = \{ 1, 2 \}
[\LaTeX + (\LaTeX + \TeX)] + \TeX = 134 %
qwq
公式 12:
我爱 \LaTeX
1 + 1 + 4 - 5 + 1 - 4 = -2 (???)
Case \\# 1: 60 \$ + 50 \$ - 20 \$ = 90 \$, 1.3 + 50 \% = 180 \%, S = \{ 1, 2 \}
[\LaTeX + (\LaTeX + \TeX)] + \TeX = 134 \%
看到占位符了(奇奇怪怪的关注点
收藏了
果断点赞收藏hh~