📄 math.tex
字号:
\begin{displaymath}
\left(\begin{array}{c|c}
1 & 2 \\
\hline
3 & 4
\end{array}\right)
\end{displaymath}
\end{example}
%For formulae running over several lines or for \wi{equation system}s,
%you can use the environments \ei{eqnarray}, and \verb|eqnarray*|
%instead of \texttt{equation}. In \texttt{eqnarray} each line gets an
%equation number. The \verb|eqnarray*| does not number anything.
对于分布于几行的公式或者方程组(\wi{equation system}),可以使用~\ei{eqnarray}~
和~\verb|eqnarray*|~环境来代替~\texttt{equation}。在~\texttt{eqnarray}~中,
每一行都会有一个方程编号。\verb|eqnarray*|~不对方程进行编号。
%The \texttt{eqnarray} and the \verb|eqnarray*| environments work like
%a 3-column table of the form \verb|{rcl}|, where the middle column can
%be used for the equal sign or the not-equal sign. Or any other sign
%you see fit. The \verb|\\| command breaks the lines.
\texttt{eqnarray}~和~\verb|eqnarray*|~环境类似于~\verb|{rcl}|~形式的三列
表格。中间的一列可以用作等号或不等号,或者其它看起来适合的符号。使用~\verb|\\|~
命令分行。
\begin{example}
\begin{eqnarray}
f(x) & = & \cos x \\
f'(x) & = & -\sin x \\
\int_{0}^{x} f(y)dy &
= & \sin x
\end{eqnarray}
\end{example}
%Notice that the space on either side of the
%the equal signs is rather large. It can be reduced by setting
%\verb|\setlength\arraycolsep{2pt}|, as in the next example.
\noindent 注意等号每边的空格都很大。可通过设定~\verb|\setlength\arraycolsep{2pt}|~来
减小空格,如下一个例子中所示。
%\index{long equations} \textbf{Long equations} will not be
%automatically divided into neat bits. The author has to specify
%where to break them and how much to indent. The following two methods
%are the most common ones used to achieve this.
\index{long quations} \textbf{长方程}不会自动地分割成小的。作者必须指定在哪里
分割以及缩进多少。以下是最常使用的两种方法。
\begin{example}
{\setlength\arraycolsep{2pt}
\begin{eqnarray}
\sin x & = & x -\frac{x^{3}}{3!}
+\frac{x^{5}}{5!}-{}
\nonumber\\
& & {}-\frac{x^{7}}{7!}+{}\cdots
\end{eqnarray}}
\end{example}
\begin{example}
\begin{eqnarray}
\lefteqn{ \cos x = 1
-\frac{x^{2}}{2!} +{} }
\nonumber\\
& & {}+\frac{x^{4}}{4!}
-\frac{x^{6}}{6!}+{}\cdots
\end{eqnarray}
\end{example}
%%\enlargethispage{\baselineskip}
%\noindent The \ci{nonumber} command causes \LaTeX{} to not generate a number for
%this equation.
\noindent \ci{nonumber}~命令将阻止~\LaTeX{}为此方程生成一个编号。
%It can be difficult to get vertically aligned equations to look right
%with these methods; the package \pai{amsmath} provides a more
%powerful set of alternatives. (see \verb|split| and \verb|align| environments).
使用这些方法很难得到垂直对齐的方程。\pai{amsmath}~提供了一些更有用的方法(见
~\verb|split|~和~\verb|align|~环境)。
%\section{Phantom}
\section{幻影}
%We can't see phantoms, but they still occupy some space in the minds of a
%lot of people. \LaTeX{} is no different. We can use this for
%some interesting spacing tricks.
我们无法看到幻影(phantom),但是它们在许多人印象中仍然会占据一些空间。\LaTeX{}没有不同,
我们也可以使用这些作一些有趣的空格技巧。
%When vertically aligning text using \verb|^| and \verb|_| \LaTeX{} sometimes
%is just a little bit too helpful. Using the \ci{phantom} command you can
%reserve space for characters which do not show up in the final output. Best
%is to look at the following examples.
垂直对齐文本时使用~\verb|^|~和~\verb|_|。\LaTeX{}~有时只是有一点帮助。
使用~\ci{phantom}~命令可以为不在最终输出中出现的字符预留空间。
最好参考下面的例子。
\begin{example}
\begin{displaymath}
{}^{12}_{\phantom{1}6}\textrm{C}
\qquad \textrm{versus} \qquad
{}^{12}_{6}\textrm{C}
\end{displaymath}
\end{example}
\begin{example}
\begin{displaymath}
\Gamma_{ij}^{\phantom{ij}k}
\qquad \textrm{versus} \qquad
\Gamma_{ij}^{k}
\end{displaymath}
\end{example}
%\section{Math Font Size}
\section{数学字体大小}
%\index{math font size} In math mode, \TeX{} selects the font size
%according to the context. Superscripts, for example, get typeset in a
%smaller font. If you want to typeset part of an equation in roman,
%don't use the \verb|\textrm| command, because the font size switching
%mechanism will not work, as \verb|\textrm| temporarily escapes to text
%mode. Use \verb|\mathrm| instead to keep the size switching mechanism
%active. But pay attention, \ci{mathrm} will only work well on short
%items. Spaces are still not active and accented characters do not
%work.\footnote{The \AmS-\LaTeX{} package makes the \ci{textrm} command
% work with size changing.}
\index{math font size} 在数学模式中,\TeX{}根据上下文选择字体大小。
例如,使用较小的字体排版上标。如果想用罗马字体排版方程中的一部分,不要
使用~\verb|\textrm|~命令,因为当~\verb|\textrm|~暂时脱离文本模式时字体大小
交换机制不起作用。这时可以使用~\verb|\mathrm|~来确保字体大小交换机制起作用。
但是需要注意的是,\ci{mathrm}~只对于较短的项才起作用。空格仍然
不起作用,并且重音字符也不起作用\footnote{\AmS-\LaTeX{}宏集使得~\ci{textrm}~
命令与字体大小改变相兼容。}。
\begin{example}
\begin{equation}
2^{\textrm{nd}} \quad
2^{\mathrm{nd}}
\end{equation}
\end{example}
%Nevertheless, sometimes you need to tell \LaTeX{} the correct font
%size. In math mode, the fontsize is set with the four commands:
尽管如此,有时必须告诉~\LaTeX{}正确的字体大小。在数学模式中,字体大小
用四个命令来设定:
\begin{flushleft}
\ci{displaystyle}~($\displaystyle 123$),
\ci{textstyle}~($\textstyle 123$),
\ci{scriptstyle}~($\scriptstyle 123$) and
\ci{scriptscriptstyle}~($\scriptscriptstyle 123$).
\end{flushleft}
%Changing styles also affects the way limits are displayed.
改变式样也会影响上下界显示的方式。
\begin{example}
\begin{displaymath}
\mathop{\mathrm{corr}}(X,Y)=
\frac{\displaystyle
\sum_{i=1}^n(x_i-\overline x)
(y_i-\overline y)}
{\displaystyle\biggl[
\sum_{i=1}^n(x_i-\overline x)^2
\sum_{i=1}^n(y_i-\overline y)^2
\biggr]^{1/2}}
\end{displaymath}
\end{example}
%% This is not a math accent, and no maths book would be set this way.
%% mathop gets the spacing right.
%\noindent This is one of those examples in which we need larger
%brackets than the standard \verb|\left[ \right]| provides.
这个例子中,我们需要比标准的~\verb|\left[ \right]|还要大一些的括号。
%\section{Theorems, Laws, \ldots}
\section{定理、定义~\ldots}
%When writing mathematical documents, you probably need a way to
%typeset ``Lemmas'', ``Definitions'', ``Axioms'' and similar
%structures. \LaTeX{} supports this with the command
写数学文档时有可能需要一种方式来排版“引理”、“定义”、“公理”以及类似
的结构。\LaTeX{}为此提供了下述命令:
\begin{lscommand}
\ci{newtheorem}\verb|{|\emph{name}\verb|}[|\emph{counter}\verb|]{|%
\emph{text}\verb|}[|\emph{section}\verb|]|
\end{lscommand}
%The \emph{name} argument, is a short keyword used to identify the
%``theorem''. With the \emph{text} argument, you define the actual name
%of the ``theorem'' which will be printed in the final document.
\emph{name}~是短关键字,用于标识“定理”。\emph{text}~定义“定理”的真实名称,
会在最终文件中打印出来。
%The arguments in square brackets are optional. They are both used to
%specify the numbering used on the ``theorem''. With the \emph{counter}
%argument you can specify the \emph{name} of a previously declared
%``theorem''. The new ``theorem'' will then be numbered in the same
%sequence. The \emph{section} argument allows you to specify the
%sectional unit within which you want your ``theorem'' to be numbered.
方括号中的选项是任意的,可以用于指定“定理”中使用的标号。\emph{counter}~
可以指定先前声明的“定理”的~\emph{name}。然后新“定理”会按同样的顺序编号。
\emph{section}~指定“定理”编号所在的章节层次。
%After executing the \ci{newtheorem} command in the preamble of your
%document, you can use the following command within the document.
在文件的导言中执行~\ci{newtheorem}~命令之后,在文件中可以使用如下命令。
\begin{code}
\verb|\begin{|\emph{name}\verb|}[|\emph{text}\verb|]|\\
This is my interesting theorem\\
\verb|\end{|\emph{name}\verb|}|
\end{code}
%This should be enough theory. The following examples will hopefully
%remove the final remains of doubt and make it clear that the
%\verb|\newtheorem| environment is way too complex to understand.
理论上这是足够的。下面的例子有望尽释前疑,并使人清楚地意识到,
\verb|\newtheorem|~环境非常复杂,很难理解。
\begin{example}
% definitions for the document
% preamble
\newtheorem{law}{Law}
\newtheorem{jury}[law]{Jury}
%in the document
\begin{law} \label{law:box}
Don't hide in the witness box
\end{law}
\begin{jury}[The Twelve]
It could be you! So beware and
see law~\ref{law:box}\end{jury}
\begin{law}No, No, No\end{law}
\end{example}
%The ``Jury'' theorem uses the same counter as the ``Law''
%theorem. Therefore it gets a number which is in sequence with
%the other ``Laws''. The argument in square brackets is used to specify
%a title or something similar for the theorem.
``Jury''~定理和~``Law''~定理使用同一个计数器。因此,编号是顺序排列的。
方括号中的选项用于为这个定理指定一个标题或者类似的东西。
\begin{example}
\flushleft
\newtheorem{mur}{Murphy}[section]
\begin{mur}
If there are two or more
ways to do something, and
one of those ways can result
in a catastrophe, then
someone will do it.\end{mur}
\end{example}
%The ``Murphy'' theorem gets a number which is linked to the number of
%the current section. You could also use another unit, for example chapter or
%subsection.
``Murphy''~定理的编号与当前节相链接。也可以使用其它单位,例如章或小节。
%\section{Bold symbols}
%\index{bold symbols}
\section{粗体符号}
\index{bold symbols}
%It is quite difficult to get bold symbols in \LaTeX{}; this is
%probably intentional as amateur typesetters tend to overuse them. The
%font change command \verb|\mathbf| gives bold letters, but these are
%roman (upright) whereas mathematical symbols are normally italic.
%There is a \ci{boldmath} command, but \emph{this can only be used
%outside mathematics mode}. It works for symbols too.
在~\LaTeX{}中很难得到粗体符号。这也许是故意的,因为业余排版者总是过份使用粗体。
字体改变命令~\verb|\mathbf|~给出粗体字母,但是这些是罗马字体(竖直的),而数学
符号通常是斜体。有一个~\ci{boldmath}~命令,但是\emph{这只能用于数学模式之外}。
对于符号也是如此。
\begin{example}
\begin{displaymath}
\mu, M \qquad \mathbf{M} \qquad
\mbox{\boldmath $\mu, M$}
\end{displaymath}
\end{example}
%\noindent
%Notice that the comma is bold too, which may not be what is required.
\noindent 注意逗号也是粗体,这可能不是所需要的。
%The package \pai{amsbsy} (included by \pai{amsmath}) as well as the
%\pai{bm} from the tools bundle make this much easier as they include
%a \ci{boldsymbol} command.
使用工具包中的~\pai{amsbsy}(包括在~\pai{amsmath}~中)和~\pai{bm}~很容易办到这点,
因为它们包含\ci{boldsymbol}命令。
\ifx\boldsymbol\undefined\else
\begin{example}
\begin{displaymath}
\mu, M \qquad
\boldsymbol{\mu}, \boldsymbol{M}
\end{displaymath}
\end{example}
\fi
%%%% Local Variables:
%%%% mode: latex
%%%% TeX-master: "lshort"
%%%% End:
%
%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -