前言:
本读书笔记适合像笔者一样对LaTeX进行过临阵磨枪的粗浅学习,有熟练使用的经验,但是又希望系统学习一些进阶技巧的读者食用。
如果对英文水平比较有信心,非常推荐阅读原著:click here
——————————分割线——————————
More Math into LaTex: George Grätzer
Part I Short Course
Chapter 1 Your Latex
- 三个很有用的工具
- Synchronization (跳转到源)
- Block Comment (注释):%
- 可以在工具栏中使用IdeTex对多行同时添加/取消注释
- Jump to a line (跳转到行)
- 指令方式:
- Command(命令): 以“\”开头,表示某种特殊命令
- Environment(环境): 以begin开头,\end结尾: 内部创造一个特殊的环境
Chapter 2 Typing Text(文本输入)
- 输入:
- 13个特殊命令符 # $ % & ~ _ ^ \ { } @ " |
- 如果想在文字中使用它们,需要在前面添加“\”
- 关于空格
- 程序在编译时会自动调整空格的宽度和换行的位置
- 在文字输入中,若干个连在一起的空格会自动编译为一个空格;如果想要强制空多个格子,可以使用“\+空格”
- 强制换行:连续输入两个回车
- 如果希望强制两个单词之间的空格和它们保持在同一行中,可以使用“~”来代表这个空格
例如:Chapter~1
- 13个特殊命令符 # $ % & ~ _ ^ \ { } @ " |
- 对齐:
\begin{flushright\center\left} \end{flushright\center\left}
:在内部创建一个右对齐/居中/左对齐的环境- \emph: 斜体 \textbf: 加粗;在编译器中可以直接选中需要的文字,使用快捷键,例如“ctrl+B”直接进行操作
- 如果要写“1-2”,在文本编辑器中可以写成“1--2”
- \\[n pt/cm/in]: 手动设置段落间距为n point/ centimeter/ inch
Chapter 3 Typing Math(数学符号输入)
- 数学公式分类:
- Inline(行内公式):
$ $ or \( \)
- Displayed(显式公式):
$$ $$ or \[ \]
- Inline(行内公式):
- 空格:
- 数学公式的空格规则和文本输入不同,它在编译时除了下列情形无视所有空格:
- 在command(命令)之后的空格,例如"
\sin x
“编译为"sin x” - 临时使用\text等命令转换为文本格式的区域
- 一个小技巧:在\text中,仍然允许使用$$输入行内公式
eg:$$ f(x)=1\text{ if $x>0$}$$
编译为:
f ( x ) = 1 if x > 0 f(x)=1\text{ if $x>0$} f(x)=1 if x>0
- command(命令):
- 大部分特殊的数学符号都要通过命令来输入
例如:\to: → \to → - 某些命令需要包含以“{ }”划定的若干个arguments(论据):例如最常见的:\frac{}{}
- 大部分特殊的数学符号都要通过命令来输入
- 常用公式命令:
- Arithmetic(算术运算)
- 点乘:\cdot, ⋅ \cdot ⋅
- 叉乘:\times, × \times ×
- 分数:\frac{}{}, ^
- 求导:f‘(x): f ′ ( x ) f'(x) f
- Arithmetic(算术运算)