11---
22layout : " lesson"
3- lang : " en "
4- title : " More on: Mathematics "
5- description : " This lesson show more amsmath alignment environments, how to make math bold, the math extension package mathtools, and using Unicode input for maths. "
6- toc-anchor-text : " More on: Mathematics "
3+ lang : " zh "
4+ title : " 更多内容:数学 "
5+ description : " 本课展示了更多amsmath对齐环境、如何使数学符号加粗、数学扩展宏包mathtools,以及在数学中使用Unicode输入。 "
6+ toc-anchor-text : " 更多内容:数学 "
77---
88
9+ ## 更多` amsmath ` 对齐
910
10- ## Further ` amsmath ` alignments
11-
12- In addition to the ` align* ` environment shown in the main lesson,
13- ` amsmath ` has several other display math constructs, notably ` gather `
14- for multi-line displays that do not need alignment, and ` multline ` for
15- splitting a larger single expression over multiple lines, aligning the
16- first line to the left, and the last to the right. In all cases the ` * `
17- form omits the equation numbers by default.
11+ 除了主课程中展示的` align* ` 环境外,` amsmath ` 还有几个其他的数学显示结构,特别是` gather ` 用于不需要对齐的多行显示,以及` multline ` 用于将较大的单个表达式分成多行,将第一行左对齐,最后一行右对齐。在所有情况下,带` * ` 的形式默认省略方程编号。
1812
1913``` latex
20- \documentclass[a4paper]{article}
21- \usepackage[T1]{fontenc}
14+ % !TEX program=xelatex
15+
16+ % 临时patch,否则使用中文标点,TexLive.net会编译错误
17+ \ExplSyntaxOn
18+ \clist_map_inline:nn { fp, int, dim, skip, muskip }
19+ {
20+ \cs_generate_variant:cn { #1_set:Nn } { NV }
21+ \cs_generate_variant:cn { #1_gset:Nn } { NV }
22+ }
23+ \ExplSyntaxOff
24+
25+ \documentclass[UTF8]{ctexart}
26+ \usepackage{xeCJK}
2227
2328\usepackage{amsmath}
2429
2530\begin{document}
2631
27- Gather
32+ Gather环境
2833\begin{gather}
2934 P(x)=ax^{5}+bx^{4}+cx^{3}+dx^{2}+ex +f\\
3035 x^2+x=10
3136\end{gather}
3237
33- Multline
38+ Multline环境
3439\begin{multline*}
3540 (a+b+c+d)x^{5}+(b+c+d+e)x^{4} \\
3641 +(c+d+e+f)x^{3}+(d+e+f+a)x^{2}+(e+f+a+b)x\\
@@ -39,19 +44,27 @@ Multline
3944\end{document}
4045```
4146
42- ### Columns in math alignments
47+ ### 数学对齐中的列
4348
44- The ` amsmath ` alignment environments are designed to take pairs of
45- columns with the first column of each pair aligned to the right and
46- the second aligned to the left. This allows multiple equations to be
47- shown, each aligned towards its relation symbol.
49+ ` amsmath ` 的对齐环境设计为每对列的第一列右对齐,第二列左对齐。这允许显示多个方程,每个方程都围绕其关系符号对齐。
4850
4951``` latex
50- \documentclass{article}
51- \usepackage[T1]{fontenc}
52+ % !TEX program=xelatex
53+
54+ % 临时patch,否则使用中文标点,TexLive.net会编译错误
55+ \ExplSyntaxOn
56+ \clist_map_inline:nn { fp, int, dim, skip, muskip }
57+ {
58+ \cs_generate_variant:cn { #1_set:Nn } { NV }
59+ \cs_generate_variant:cn { #1_gset:Nn } { NV }
60+ }
61+ \ExplSyntaxOff
62+
63+ \documentclass[UTF8]{ctexart}
64+ \usepackage{xeCJK}
5265\usepackage{amsmath}
5366\begin{document}
54- Aligned equations
67+ 对齐的方程
5568\begin{align*}
5669a &= b+1 & c &= d+2 & e &= f+3 \\
5770r &= s^{2} & t &=u^{3} & v &= w^{4}
@@ -60,14 +73,23 @@ r &= s^{2} & t &=u^{3} & v &= w^{4}
6073\end{document}
6174```
6275
63-
64- In addition there are variants of the display environments ending
65- in ` ed ` that make a subterm inside a larger display.
66- For example, ` aligned ` and ` gathered ` are variants of ` align ` and ` gather ` respectively.
76+ 此外,还有以` ed ` 结尾的显示环境变体,用于在更大的显示中制作子项。
77+ 例如,` aligned ` 和` gathered ` 分别是` align ` 和` gather ` 的变体。
6778
6879``` latex
69- \documentclass{article}
70- \usepackage[T1]{fontenc}
80+ % !TEX program=xelatex
81+
82+ % 临时patch,否则使用中文标点,TexLive.net会编译错误
83+ \ExplSyntaxOn
84+ \clist_map_inline:nn { fp, int, dim, skip, muskip }
85+ {
86+ \cs_generate_variant:cn { #1_set:Nn } { NV }
87+ \cs_generate_variant:cn { #1_gset:Nn } { NV }
88+ }
89+ \ExplSyntaxOff
90+
91+ \documentclass[UTF8]{ctexart}
92+ \usepackage{xeCJK}
7193\usepackage{amsmath}
7294\begin{document}
7395Aligned:
@@ -85,13 +107,24 @@ d&=c
85107\end{document}
86108```
87109
88- ` aligned ` takes a positional optional argument similar to ` tabular ` .
89- This is often useful to align an inline math formula on its top row;
90- compare the items in the list in the following example.
110+ ` aligned ` 接受类似于 ` tabular ` 的位置可选参数。
111+ 这在对齐内联数学公式的顶行时经常有用;
112+ 比较下面示例中列表中的项目。
91113
92114``` latex
93- \documentclass{article}
94- \usepackage[T1]{fontenc}
115+ % !TEX program=xelatex
116+
117+ % 临时patch,否则使用中文标点,TexLive.net会编译错误
118+ \ExplSyntaxOn
119+ \clist_map_inline:nn { fp, int, dim, skip, muskip }
120+ {
121+ \cs_generate_variant:cn { #1_set:Nn } { NV }
122+ \cs_generate_variant:cn { #1_gset:Nn } { NV }
123+ }
124+ \ExplSyntaxOff
125+
126+ \documentclass[UTF8]{ctexart}
127+ \usepackage{xeCJK}
95128\usepackage{amsmath}
96129\begin{document}
97130\begin{itemize}
@@ -109,15 +142,23 @@ c&=d
109142\end{document}
110143```
111144
112- ## Bold Math
113- Standard LaTeX has two methods to give bold symbols in math. To make
114- an entire expression bold, use ` \boldmath ` before entering the
115- expression. The command ` \mathbf ` is also available to set individual
116- letters or words in upright bold roman.
145+ ## 数学加粗
146+ 标准LaTeX有两种方法使数学符号加粗。要使整个表达式加粗,在进入表达式前使用` \boldmath ` 。命令` \mathbf ` 也可用于将单个字母或单词设置为直立粗体罗马字体。
117147
118148``` latex
119- \documentclass[a4paper]{article}
120- \usepackage[T1]{fontenc}
149+ % !TEX program=xelatex
150+
151+ % 临时patch,否则使用中文标点,TexLive.net会编译错误
152+ \ExplSyntaxOn
153+ \clist_map_inline:nn { fp, int, dim, skip, muskip }
154+ {
155+ \cs_generate_variant:cn { #1_set:Nn } { NV }
156+ \cs_generate_variant:cn { #1_gset:Nn } { NV }
157+ }
158+ \ExplSyntaxOff
159+
160+ \documentclass[UTF8]{ctexart}
161+ \usepackage{xeCJK}
121162
122163\begin{document}
123164
@@ -127,19 +168,26 @@ $(x+y)(x-y)=x^{2}-y^{2}$
127168{\boldmath $(x+y)(x-y)=x^{2}-y^{2}$ $\pi r^2$}
128169
129170$(x+\mathbf{y})(x-\mathbf{y})=x^{2}-{\mathbf{y}}^{2}$
130- $\mathbf{\pi} r^2$ % bad use of \mathbf
171+ $\mathbf{\pi} r^2$ % 错误使用 \mathbf
131172\end{document}
132173```
133174
134- If you want to access bold symbols (as would be used by ` \boldmath ` )
135- within an otherwise normal weight expression, then you can use the
136- command ` \bm ` from the ` bm ` package. Note that ` \bm ` also works with
137- symbols such as ` = ` and Greek letters. (Note that ` \mathbf ` has no effect
138- on ` \pi ` in the example above.)
175+ 如果您想在普通权重表达式中访问粗体符号(就像` \boldmath ` 使用的那样),可以使用` bm ` 宏包中的命令` \bm ` 。注意` \bm ` 也适用于` = ` 和希腊字母等符号。(注意在上面的示例中,` \mathbf ` 对` \pi ` 没有效果。)
139176
140177``` latex
141- \documentclass[a4paper]{article}
142- \usepackage[T1]{fontenc}
178+ % !TEX program=xelatex
179+
180+ % 临时patch,否则使用中文标点,TexLive.net会编译错误
181+ \ExplSyntaxOn
182+ \clist_map_inline:nn { fp, int, dim, skip, muskip }
183+ {
184+ \cs_generate_variant:cn { #1_set:Nn } { NV }
185+ \cs_generate_variant:cn { #1_gset:Nn } { NV }
186+ }
187+ \ExplSyntaxOff
188+
189+ \documentclass[UTF8]{ctexart}
190+ \usepackage{xeCJK}
143191\usepackage{bm}
144192
145193\begin{document}
@@ -154,12 +202,21 @@ $\alpha + \bm{\alpha} < \beta + \bm{\beta}$
154202```
155203
156204## Mathtools
157- The package ` mathtools ` loads ` amsmath ` and adds several additional
158- features, such as variants of the ` amsmath ` matrix environments that
159- allow the column alignment to be specified.
205+ ` mathtools ` 宏包加载` amsmath ` 并添加了一些额外功能,比如` amsmath ` 矩阵环境的变体,允许指定列对齐方式。
160206``` latex
161- \documentclass[a4paper]{article}
162- \usepackage[T1]{fontenc}
207+ % !TEX program=xelatex
208+
209+ % 临时patch,否则使用中文标点,TexLive.net会编译错误
210+ \ExplSyntaxOn
211+ \clist_map_inline:nn { fp, int, dim, skip, muskip }
212+ {
213+ \cs_generate_variant:cn { #1_set:Nn } { NV }
214+ \cs_generate_variant:cn { #1_gset:Nn } { NV }
215+ }
216+ \ExplSyntaxOff
217+
218+ \documentclass[UTF8]{ctexart}
219+ \usepackage{xeCJK}
163220\usepackage{mathtools}
164221
165222\begin{document}
@@ -175,31 +232,38 @@ allow the column alignment to be specified.
175232\end{document}
176233```
177234
178- ## Unicode Math
235+ ## Unicode数学
179236
180- As will be seen in [ Lesson 14] ( lesson-14 ) , there are variant TeX
181- engines that use OpenType fonts. By default, these engines still use
182- classic TeX math fonts but you may use the ` unicode-math ` package
183- to use OpenType Math fonts. The details of this package are beyond
184- this course and we refer you to the
185- [ package documentation] ( https://texdoc.org/pkg/unicode-math ) .
186- However, we give a small example here.
237+ 如[ 第14课] ( lesson-14 ) 所述,有一些变体TeX引擎使用OpenType字体。默认情况下,这些引擎仍然使用经典的TeX数学字体,但您可以使用` unicode-math ` 宏包来使用OpenType数学字体。这个宏包的细节超出了本课程的范围,我们建议您参考[ 宏包文档] ( https://texdoc.org/pkg/unicode-math ) 。
238+ 但是,我们在这里给出一个小示例。
187239
188240``` latex
189241% !TEX lualatex
190- \documentclass[a4paper]{article}
242+ % !TEX program=xelatex
243+
244+ % 临时patch,否则使用中文标点,TexLive.net会编译错误
245+ \ExplSyntaxOn
246+ \clist_map_inline:nn { fp, int, dim, skip, muskip }
247+ {
248+ \cs_generate_variant:cn { #1_set:Nn } { NV }
249+ \cs_generate_variant:cn { #1_gset:Nn } { NV }
250+ }
251+ \ExplSyntaxOff
252+
253+ \documentclass[UTF8]{ctexart}
254+ \usepackage{xeCJK}
191255\usepackage{unicode-math}
192256\setmainfont{TeX Gyre Pagella}
193257\setmathfont{TeX Gyre Pagella Math}
194258
195259\begin{document}
196260
197- One two three
261+ 一二三
198262\[
199263\log \alpha + \log \beta = \log(\alpha\beta)
200264\]
201265
202- Unicode Math Alphanumerics
266+ Unicode数学字母数字符号
203267\[A + \symfrak{A}+\symbf{A}+ \symcal{A} + \symscr{A}+ \symbb{A}\]
204268
205269\end{document}
0 commit comments