⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 math.tex

📁 用于公式编辑
💻 TEX
📖 第 1 页 / 共 3 页
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Contents: Math typesetting with LaTeX
% $Id: math.tex,v 1.2 2002/05/26 22:44:33 zuohuijun Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
%\chapter{Typesetting Mathematical Formulae}
%
\chapter{数学公式}

%\begin{intro}
%  Now you are ready! In this chapter, we will attack the main strength
%  of \TeX{}: mathematical typesetting. But be warned, this chapter
%  only scratches the surface. While the things explained here are
%  sufficient for many people, don't despair if you can't find a
%  solution to your mathematical typesetting needs here. It is highly likely
%  that your problem is addressed in \AmS-\LaTeX{}%
%  \footnote{\texttt{CTAN:/tex-archive/macros/latex/required/amslatex}}
%  or some other package.
%\end{intro}
\begin{intro}
   准备好了!接下来我们就要领略到~\TeX{}~强大之所在:数学符号和公式
   的排版。本章所介绍的内容基本可以满足大部分人的需要。即便如此,也只
   是对此项功能的概括性的描述。如果不能在此章中找到你所需要的排版数学
   公式的方法,那么你可以在~\AmS-\LaTeX{}
   \footnote{\texttt{CTAN:/tex-archive/macros/latex/required/amslatex}}
   或其它宏集中找到答案。
\end{intro}
%  
%\section{General}

\section{基本知识}

%\LaTeX{} has a special mode for typesetting \wi{mathematics}.
%Mathematical text within a paragraph is entered between \ci{(}
%and \ci{)}, \index{$@\texttt{\$}} %$
%between \texttt{\$} and \texttt{\$} or between %}
%\verb|\begin{|\ei{math}\verb|}| and \verb|\end{math}|.\index{formulae}
%
\LaTeX{}~使用一种特殊的模式来排版数学符号和公式(\wi{mathematics})。
段落中的数学表达式应该置于~\ci{(}~和~\ci{)},\index{$@\texttt{\$}}
\texttt{\$}~和~\texttt{\$}~或者~\verb|\begin{|\ei{math}\verb|}|~和~
\verb|\end{math}|~之间。\index{formulae}

\begin{example}
Add $a$ squared and $b$ squared 
to get $c$ squared. Or, using 
a more mathematical approach:
$c^{2}=a^{2}+b^{2}$
\end{example}

\begin{example}
\TeX{} is pronounced as 
$\tau\epsilon\chi$.\\[6pt]
100~m$^{3}$ of water\\[6pt]
This comes from my $\heartsuit$
\end{example}

%It is preferable to \emph{display} larger mathematical equations or formulae,
%rather than to typeset them on separate lines. This means you enclose them
%in \ci{[} and \ci{]} or between
%\verb|\begin{|\ei{displaymath}\verb|}| and
%  \verb|\end{displaymath}|.  This produces formulae which are not
%numbered. If you want \LaTeX{} to number them, you can use the
%\ei{equation} environment.

对于较大的数学式子,最好的方法是使用\emph{显示式样}来排版:
将它们放置于~\ci{[}~和~\ci{]}~或~\verb|\begin{|\ei{displaymath}\verb|}|~和~
\verb|\end{displaymath}|~之间。这样排版出的公式是没有编号的。如果你希望~\LaTeX{}~
对其添加编号的话,可以使用~\ei{equation}~环境来达到这一目的。

\begin{example}
Add $a$ squared and $b$ squared 
to get $c$ squared. Or, using 
a more mathematical approach:
\begin{displaymath}
c^{2}=a^{2}+b^{2}
\end{displaymath}
And just one more line.
\end{example}
%
%You can reference an equation with \ci{label} and \ci{ref}

利用~\ci{label}~和~\ci{ref}~对公式加以引用。

\begin{example}
\begin{equation} \label{eq:eps}
\epsilon > 0
\end{equation}
From (\ref{eq:eps}), we gather 
\ldots
\end{example}
%
%Note that expressions will be typeset in a different style if displayed:

对比一下用不同式样排版所得到的结果:

\begin{example}
$\lim_{n \to \infty} 
\sum_{k=1}^n \frac{1}{k^2} 
= \frac{\pi^2}{6}$
\end{example}
\begin{example}
\begin{displaymath}
\lim_{n \to \infty} 
\sum_{k=1}^n \frac{1}{k^2} 
= \frac{\pi^2}{6}
\end{displaymath}
\end{example}

%There are differences between \emph{math mode} and \emph{text mode}. For
%example in \emph{math mode}: 

\emph{数学模式}和\emph{文本模式}有很多不同之处。例如在数学模式中:

%\begin{enumerate}
%
%\item Most spaces and linebreaks do not have any significance, as all spaces
%either are derived logically from the mathematical expressions or
%have to be specified using special commands such as \ci{,}, \ci{quad} or
%\ci{qquad}.
% 
%\item Empty lines are not allowed. Only one paragraph per formula.
%
%\item Each letter is considered to be the name of a variable and will be
%typeset as such. If you want to typeset normal text within a formula
%(normal upright font and normal spacing) then you have to enter the
%text using the \verb|\textrm{...}| commands.
%\end{enumerate}

\begin{enumerate}

\item 空格和分行都将被忽略。所有的空格或是由数学表达式逻辑的衍生,
      或是由特殊的命令如~\ci{,},\ci{quad}~或~\ci{qquad}~来得到。
\item 不允许有空行,每个公式中只能有一个段落。
\item 每个字符都将被看作是一个变量名并以此来排版。如果你希望在公式中
      出现普通的文本(使用正体字并可以有空格),那么你必须使用命令~
      \verb|\textrm{...}|~来输入这些文本。
\end{enumerate}

\begin{example}
\begin{equation}
\forall x \in \mathbf{R}:
\qquad x^{2} \geq 0
\end{equation}
\end{example}
\begin{example}
\begin{equation}
x^{2} \geq 0\qquad
\textrm{for all }x\in\mathbf{R}
\end{equation}
\end{example}

%%
%% Add AMSSYB Package ... Blackboard bold .... R for realnumbers
%%
%Mathematicians can be very fussy about which symbols are used:
%it would be conventional here to use `\wi{blackboard bold}',
%\index{bold symbols} which is obtained using \ci{mathbb} from the
%package \pai{amsfonts} or \pai{amssymb}.
%\ifx\mathbb\undefined\else
%The last example becomes
%
数学家们通常对使用什么样的符号非常挑剔:习惯上使用“\textbf{空心粗体}”
(\wi{blackboard bold})来表示实数集合。这种字体可用~\pai{amsfonts}~
或~\pai{amssymb}~宏包中的命令~\ci{mathbb}~来得到。
\ifx\mathbb\undefined\else
上面的例子变为:

\begin{example}
\begin{displaymath}
x^{2} \geq 0\qquad
\textrm{for all }x\in\mathbb{R}
\end{displaymath}
\end{example}
\fi

%\section{Grouping in Math Mode}
\section{数学模式中的分组}

%Most math mode commands act only on the next character. So if you
%want a command to affect several characters, you have to group them
%together using curly braces: \verb|{...}|.

数学模式中的命令仅对其后面第一个字符起作用。所以,如果你希望某一命令作用
于多个字符的话,那么你就必须将它们放置于括号中:\verb|{...}|。

\begin{example}
\begin{equation}
a^x+y \neq a^{x+y}
\end{equation}
\end{example}
% 
%\section{Building Blocks of a Mathematical Formula}
\section{建立数学公式模块}

%In this section, the most important commands used in mathematical
%typesetting will be described. Take a look at section~\ref{symbols} on
%page~\pageref{symbols} for a detailed list of commands for typesetting
%mathematical symbols.
%
在这一节中将介绍排版数学符号和公式的最重要的命令。详细的命令列表可参考
第~\pageref{symbols}~页第~\ref{symbols}~节。

%\textbf{Lowercase \wi{Greek letters}} are entered as \verb|\alpha|,
% \verb|\beta|, \verb|\gamma|, \ldots, uppercase letters
%are entered as \verb|\Gamma|, \verb|\Delta|, \ldots\footnote{There is no
%  uppercase Alpha defined in \LaTeXe{} because it looks the same as a
%  normal roman A. Once the new math coding is done, things will
%  change.} 
%
\textbf{小写希腊字母}(\textbf{Lowercase \wi{Greek letters}} )
的输入命令为:\verb|\alpha|, \verb|\beta|, \verb|\gamma|, \ldots,
相应地,大写形式的输入命令为:\verb|\Gamma|, \verb|\Delta|, \ldots。
\footnote{\LaTeXe{}~没有定义~Alpha~的大写形式,因为它和普通的罗马字体~
\textrm{A}~很像。也许新的数学编码完成后会有所变化。}
%
\begin{example}
$\lambda,\xi,\pi,\mu,\Phi,\Omega$
\end{example}
%\enlargethispage{\baselineskip}
%\pagebreak[4]

%\textbf{Exponents and Subscripts} can be specified using\index{exponent}\index{subscript}
%the \verb|^|\index{^@\verb"|^"|} and the \verb|_|\index{_@\verb"|_"|} character.
%
\textbf{指数和下标}\index{exponent}\index{subscript}可用~\verb|^|\index{^@\verb"|^"|}~
和~\verb|_|\index{_@\verb"|_"|}~后加相应的字符来实现。
\begin{example}
$a_{1}$ \qquad $x^{2}$ \qquad
$e^{-\alpha t}$ \qquad
$a^{3}_{ij}$\\
$e^{x^2} \neq {e^x}^2$
\end{example}

%The \textbf{\wi{square root}} is entered as \ci{sqrt}, the
%$n^\mathrm{th}$ root is generated with \verb|\sqrt[|$n$\verb|]|. The size of
%the root sign is determined automatically by \LaTeX. If just the sign
%is needed, use \verb|\surd|.
%
\textbf{平方根}(\textbf{\wi{square root}})的输入命令为:\ci{sqrt},
$n$~次方根相应地为:~\verb|\sqrt[|$n$\verb|]|。方根符号的大小由~\LaTeX{}自动
加以调整。也可用~\verb|\surd|~仅给出符号。

\begin{example}
$\sqrt{x}$ \qquad 
$\sqrt{ x^{2}+\sqrt{y} }$ 
\qquad $\sqrt[3]{2}$\\[3pt]
$\surd[x^2 + y^2]$
\end{example}

%The commands \ci{overline} and \ci{underline} create
%\textbf{horizontal lines} directly over or under an expression.
%\index{horizontal!line}
%
命令~\ci{overline}~和~\ci{underline}~在表达式的上、下方
画出水平线。\index{horizontal!line}

\begin{example}
$\overline{m+n}$ \qquad 
$\underline{m+n}$
\end{example}

%The commands \ci{overbrace} and \ci{underbrace} create
%long \textbf{horizontal braces} over or under an expression.
%\index{horizontal!brace}

命令~\ci{overbrace}~和~\ci{underbrace}~在表达式的上、下方
给出一水平的大括号。\index{horizontal!brace}

\begin{example}
$\underbrace{ a+b+\cdots+z }_{26}$ 
\end{example}

%\index{mathematical!accents} To add mathematical accents such as small
%arrows or \wi{tilde} signs to variables, you can use the commands
%given in Table~\ref{mathacc} on page \pageref{mathacc}.  Wide hats and
%tildes covering several characters are generated with \ci{widetilde}
%and \ci{widehat}.  The \verb|'|\index{'@\verb"|'"|} symbol gives a
%\wi{prime}.
%% a dash is --
%
\index{mathematical!accents} 数学重音符号如小箭头和~$\tilde{}$
(\wi{tilde})等的输入命令可参考第\nbs\pageref{mathacc}~页中的表
\nbs\ref{mathacc}。可覆盖多个字符的宽重音符号可由~\ci{widetilde}~
和~\ci{widehat}~等得到。字符~\verb|'|\index{'@\verb"|'"|}~将生
成~$'$(\wi{prime})。

\begin{example}
\begin{displaymath}
y=x^{2}\qquad y'=2x\qquad y''=2
\end{displaymath}
\end{example}

%\textbf{Vectors}\index{vectors} often are specified by adding small
%\wi{arrow symbols} on top of a variable. This is done with the
%\ci{vec} command. The two commands \ci{overrightarrow} and
%\ci{overleftarrow} are useful to denote the vector from $A$ to $B$.

\textbf{向量}(\textbf{Vectors}\index{vectors})通常用上方有小箭头
(\wi{arrow symbols})的变量表示。这可由~\ci{vec}~得到。另两个
命令~\ci{overrightarrow}~和~\ci{overleftarrow}~在定义从~$A$~到~$B$~
的向量时非常有用。

\begin{example}
\begin{displaymath}
\vec a\quad\overrightarrow{AB}
\end{displaymath}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -