📄 math.tex
字号:
\end{example}
%
%Usually you don't typeset an explicit dot sign to indicate
%the multiplication operation. However sometimes it is written
%to help the reader's eyes in grouping a formula.
%Then you should use \ci{cdot}
一般情况下,乘法算式中的圆点符可以省略。然而有时为了帮助读者
解读复杂的公式,也有必要用命令~\ci{cdot}~将圆点符表示出来。
\begin{example}
\begin{displaymath}
v = {\sigma}_1 \cdot {\sigma}_2
{\tau}_1 \cdot {\tau}_2
\end{displaymath}
\end{example}
%Names of log-like functions are often typeset in an upright
%font and not in italic like variables. Therefore \LaTeX{} supplies the
%following commands to typeset the most important function names:
%\index{mathematical!functions}
%
函数名通常用罗马字体正体排版,而不是像变量名一样用意大利体排版。
因此,\LaTeX{}提供下述命令来排版最重要的一些函数名。
\index{mathematical!functions}
\begin{tabular}{lllllll}
\ci{arccos} & \ci{cos} & \ci{csc} & \ci{exp} & \ci{ker} & \ci{limsup} & \ci{min} \\
\ci{arcsin} & \ci{cosh} & \ci{deg} & \ci{gcd} & \ci{lg} & \ci{ln} & \ci{Pr} \\
\ci{arctan} & \ci{cot} & \ci{det} & \ci{hom} & \ci{lim} & \ci{log} & \ci{sec} \\
\ci{arg} & \ci{coth} & \ci{dim} & \ci{inf} & \ci{liminf} & \ci{max} & \ci{sin} \\
\ci{sinh} & \ci{sup} & \ci{tan} & \ci{tanh}\\
\end{tabular}
\begin{example}
\[\lim_{x \rightarrow 0}
\frac{\sin x}{x}=1\]
\end{example}
%For the \wi{modulo function}, there are two commands: \ci{bmod} for the
%binary operator ``$a \bmod b$'' and \ci{pmod}
%for expressions
%such as ``$x\equiv a \pmod{b}$.''
%
排版模函数(\wi{modulo function})有两个命令:
\ci{bmod}~用于二元运算符~``$a \bmod b$'',
\ci{pmod}~用于表达式,例如~``$x\equiv a \pmod{b}$''。
%A built-up \textbf{\wi{fraction}} is typeset with the
%\ci{frac}\verb|{...}{...}| command.
%Often the slashed form $1/2$ is preferable, because it looks better
%for small amounts of `fraction material.'
\textbf{分数}(\textbf{\wi{fraction}})使用~\ci{frac}\verb|{...}{...}|~排版。
一般来说,$1/2$~这种形式更受欢迎,因为对于少量的分式,它看起来更好些。
\begin{example}
$1\frac{1}{2}$~hours
\begin{displaymath}
\frac{ x^{2} }{ k+1 }\qquad
x^{ \frac{2}{k+1} }\qquad
x^{ 1/2 }
\end{displaymath}
\end{example}
%To typeset binomial coefficients or similar structures, you can use
%either the command \verb|{... |\ci{choose}\verb| ...}| or
%\verb|{... |\ci{atop}\verb| ...}|. The second command produces the
%same output as the first one, but without braces.
%\footnote{Note that the usage of these old-style commands is expressly forbidden
%by the \pai{amsmath} package. They are replaced by
%\ci{binom} and \ci{genfrac}. The latter is a superset of all related
%construct, e.g. you may get a similar construct to \ci{atop}
%by \texttt{$\backslash$newcommand\{$\backslash$newatop\}[2]\{$\backslash$genfrac\{\}\{\}\{0pt\}\{1\}\{\#1\}\{\#2\}\}}.}
%
排版二项系数或类似的结构可以使用命令~\verb|{... |\ci{choose}\verb| ...}|~
或~\verb|{... |\ci{atop}\verb| ...}|。第二个命令与第一个命令的
输出相同,只是没有括号\footnote{注意这些旧命令在~\pai{amsmath}~宏集中
禁止使用,而是用~\ci{binom}和~\ci{genfrac}来代替。后者是所有相关结构的超集,
例如可以通过~\texttt{$\backslash$newcommand\{$\backslash$newatop\}[2]\%
{$\backslash$genfrac\{\}\{\}\{0pt\}\{1\}\{\#1\}\{\#2\}\}}}~来得到~\ci{atop}~
的一个类似结构}。
\begin{example}
\begin{displaymath}
{n \choose k}\qquad {x \atop y+2}
\end{displaymath}
\end{example}
%For binary relations it may be useful to stack symbols over each other.
%\ci{stackrel} puts the symbol given
%in the first argument in superscript-like size over the second which
%is set in its usual position.
%
对于二元关系,将符号堆在一起可能更有用。\ci{stackrel}~将第一项中的符号
以上标大小放在处于正常位置的第二项上。
\begin{example}
\begin{displaymath}
\int f_N(x) \stackrel{!}{=} 1
\end{displaymath}
\end{example}
%The \textbf{\wi{integral operator}} is generated with \ci{int}, the
%\textbf{\wi{sum operator}} with \ci{sum} and the \textbf{\wi{product operator}}
%with \ci{prod}. The upper and lower limits are specified with~\verb|^|
%and~\verb|_| like subscripts and superscripts.
%\footnote{\AmS-\LaTeX{} in addition has multiline super-/subscripts}
%
\textbf{积分运算符}(\textbf{\wi{integral operator}})用~\ci{int}~来生成。
\textbf{求和运算符}(\textbf{\wi{sum operator}})由~\ci{sum}~生成。
\textbf{乘积运算符}(\textbf{\wi{product operator}})由~\ci{prod}~生成。
上限和下限用\nbs\verb|^|~和\nbs\verb|_|~来生成,类似于上标和下标
\footnote{\AmS-\LaTeX{}另外有多行上标/下标。}。
\begin{example}
\begin{displaymath}
\sum_{i=1}^{n} \qquad
\int_{0}^{\frac{\pi}{2}} \qquad
\prod_\epsilon
\end{displaymath}
\end{example}
%For \textbf{\wi{braces}} and other \wi{delimiters}, there exist all
%types of symbols in \TeX{} (e.g.~$[\;\langle\;\|\;\updownarrow$).
%Round and square braces can be entered with the corresponding keys,
%curly braces with \verb|\{|, all other delimiters are generated with
%special commands (e.g.~\verb|\updownarrow|). For a list of all
%delimiters available, check table~\ref{tab:delimiters} on page
%\pageref{tab:delimiters}.
对于\textbf{括号}(\textbf{\wi{braces}})和其它分隔符(\wi{delimiters}),
在~\TeX{}中有各种各样的符号(例如~$[\;\langle\;\|\;\updownarrow$)。
圆括号和方括号可以用相应的键输入。花括号用~\verb|\{|。其它的分隔符用
专门命令(例如~\verb|\updownarrow|)来生成。所有可使用的分隔符列表可以
参考第~\pageref{tab:delimiters}~页中的表~\ref{tab:delimiters}。
\begin{example}
\begin{displaymath}
{a,b,c}\neq\{a,b,c\}
\end{displaymath}
\end{example}
%If you put the command \ci{left} in front of an opening delimiter or
%\ci{right} in front of a closing delimiter, \TeX{} will automatically
%determine the correct size of the delimiter. Note that you must close
%every \ci{left} with a corresponding \ci{right}, and that the size is
%determined correctly only if both are typeset on the same line. If you
%don't want anything on the right, use the invisible `\ci{right.}'!
如果将命令~\ci{left}~放在开分隔符前,\TeX{}会自动决定分隔符的正确大小。
注意必须用对应的右分隔符~\ci{right}~来关闭每一个左分隔符~\ci{left},
并且只有当这两个分隔符排在同一行时大小才会被正确确定。如果不想在右边
放任何东西,使用隐藏的~`\ci{right.}'!
\begin{example}
\begin{displaymath}
1 + \left( \frac{1}{ 1-x^{2} }
\right) ^3
\end{displaymath}
\end{example}
%\pagebreak[4]
%In some cases it is necessary to specify the correct size of a
%mathematical delimiter\index{mathematical!delimiter} by hand,
%which can be done using the commands \ci{big}, \ci{Big}, \ci{bigg} and
%\ci{Bigg} as prefixes to most delimiter commands.\footnote{These
% commands do not work as expected if a size changing command has been
% used, or the \texttt{11pt} or \texttt{12pt} option has been
% specified. Use the \pai{exscale} or \pai{amsmath} packages to
% correct this behaviour.}
某些情况下有必要手工指出数学分隔符的正确大小,这可以使用命令~\ci{big},
\ci{Big}, \ci{bigg}~及~\ci{Bigg}~作为大多数分隔符命令的前缀
\footnote{如果使用了改变大小的命令或者指定了~\texttt{11pt}~或~
\texttt{12pt}~选项,这些命令并不像预料的那样起作用。
使用~\pai{exscale}或~\pai{amsmath}宏集来修正这种行为。}。
\begin{example}
$\Big( (x+1) (x-1) \Big) ^{2}$\\
$\big(\Big(\bigg(\Bigg($\quad
$\big\}\Big\}\bigg\}\Bigg\}$\quad
$\big\|\Big\|\bigg\|\Bigg\|$
\end{example}
%To enter \textbf{\wi{three dots}} into a formula, you can use several
%commands. \ci{ldots} typesets the dots on the baseline, \ci{cdots}
%sets them centred. Besides that, there are the commands \ci{vdots} for
%vertical and \ci{ddots} for \wi{diagonal dots}.\index{vertical
% dots}\index{horizontal!dots} You can find another example in section~\ref{sec:vert}.
将\textbf{三个圆点}(\textbf{\wi{three dots}})输入公式可以使用几种命令。
\ci{ldots}~将点排在基线上。\ci{cdots}~将它们设置为居中。除此之外,
可用~\ci{vdots}~命令使其垂直,而用~\ci{ddots}~将得到对角型(\wi{diagonal dots})。
第~\ref{sec:vert}~节中还有其它的例子。
\begin{example}
\begin{displaymath}
x_{1},\ldots,x_{n} \qquad
x_{1}+\cdots+x_{n}
\end{displaymath}
\end{example}
%\section{Math Spacing}
\section{数学空格}
%\index{math spacing} If the spaces within formulae chosen by \TeX{}
%are not satisfactory, they can be adjusted by inserting special
%spacing commands. There are some commands for small spaces: \ci{,} for
%$\frac{3}{18}\:\textrm{quad}$ (\demowidth{0.166em}), \ci{:} for $\frac{4}{18}\:
%\textrm{quad}$ (\demowidth{0.222em}) and \ci{;} for $\frac{5}{18}\:
%\textrm{quad}$ (\demowidth{0.277em}). The escaped space character
%\verb*.\ . generates a medium sized space and \ci{quad}
%(\demowidth{1em}) and \ci{qquad} (\demowidth{2em}) produce large
%spaces. The size of a \ci{quad} corresponds to the width of the
%character `M' of the current font. The \verb|\!|\cih{"!} command produces a
%negative space of $-\frac{3}{18}\:\textrm{quad}$ (\demowidth{0.166em}).
如果公式中由~\TeX{}选择的的空格不令人满意,可以通过插入特殊的空格命令来进行调节。
有几个命令用于小空格:\ci{,}~对应于~%$\frac{3}{18}\:\textrm{quad}$ (\demowidth{0.166em}),
\ci{:}~对应于~$\frac{4}{18}\:\textrm{quad}$ (\demowidth{0.222em}),
\ci{;}~对应于~$\frac{5}{18}\:\textrm{quad}$ (\demowidth{0.277em})。
脱离的空格符号~\verb*.\ .~生成中等大小的空格。\ci{quad} (\demowidth{1em})~和~
\ci{qquad} (\demowidth{2em})~产生大空格。\ci{quad}~的大小对应于目前字体中字
符~`M'~的宽度。\verb|\!|\cih{"!}~命令生成负空格~$-\frac{3}{18}\:\textrm{quad}$
(\demowidth{0.166em})。
\begin{example}
\newcommand{\ud}{\mathrm{d}}
\begin{displaymath}
\int\!\!\!\int_{D} g(x,y)
\, \ud x\, \ud y
\end{displaymath}
instead of
\begin{displaymath}
\int\int_{D} g(x,y)\ud x \ud y
\end{displaymath}
\end{example}
%Note that `d' in the differential is conventionally set in roman.
注意微分中的~`d'~按惯例设为罗马字体。
%\AmS-\LaTeX{} provides another way for finetuning
%the spacing between multiple integral signs,
%namely the \ci{iint}, \ci{iiint}, \ci{iiiint}, and \ci{idotsint} commands.
%With the \pai{amsmath} package loaded, the above example can be
%typeset this way:
\AmS-\LaTeX{}提供微调多重积分符号间空格的另一种方式,也就是~\ci{iint}, \ci{iiint},
\ci{iiiint}~和~\ci{idotsint}~等命令。使用~\pai{amsmath}~宏集,以上的例子
可以用下面这种方式来排版。
\begin{example}
\newcommand{\ud}{\mathrm{d}}
\begin{displaymath}
\iint_{D} \, \ud x \, \ud y
\end{displaymath}
\end{example}
%See the electronic document testmath.tex (distributed with
%\AmS-\LaTeX) or Chapter 8 of ``The LaTeX Companion'' for further details.
更详细的介绍请参考电子文件~testmath.tex(包括在~\AmS-\LaTeX{}中)
或~``The LaTeX Companion''~中的第八章。
%\section{Vertically Aligned Material}
%\label{sec:vert}
\section{垂直对齐}\label{sec:vert}
%To typeset \textbf{arrays}, use the \ei{array} environment. It works
%somewhat similar to the \texttt{tabular} environment. The \verb|\\| command is
%used to break the lines.
排版~\textbf{arrays}~
使用~\ei{array}~环境来排版\textbf{数组}(\textbf{arrays})。
它有些类似于\texttt{tabular}环境,使用~\verb|\\|~命令来分行。
\begin{example}
\begin{displaymath}
\mathbf{X} =
\left( \begin{array}{ccc}
x_{11} & x_{12} & \ldots \\
x_{21} & x_{22} & \ldots \\
\vdots & \vdots & \ddots
\end{array} \right)
\end{displaymath}
\end{example}
%The \ei{array} environment can also be used to typeset expressions which have one
%big delimiter by using a ``\verb|.|'' as an invisible \ci{right}
%delimiter:
\ei{array}~环境也可以使用~``\verb|.|''~作为隐藏右分隔符来排版只有一个大分隔符的
表达式。
\begin{example}
\begin{displaymath}
y = \left\{ \begin{array}{ll}
a & \textrm{if $d>c$}\\
b+x & \textrm{in the morning}\\
l & \textrm{all day long}
\end{array} \right.
\end{displaymath}
\end{example}
%As within the \verb|tabular| environment you can also
%draw lines in the \ei{array} environent, e.g. separating the entries of
%a matrix:
像在~\verb|tabular|~环境中一样,也可以在~\ei{array}~环境中画线。
例如分隔矩阵中的元素。
\begin{example}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -