admin 管理员组文章数量: 1086019
2024年2月28日发(作者:uuid为什么不会重复)
数学公式小结
请运行以下程序:
documentclass[11pt]{article}
usepackage{CJK}
usepackage{indentfirst}
usepackage{latexsym}
usepackage{bm}
usepackage{amsmath,amssymb,amsfonts}
usepackage{wasysym}
usepackage{xcolor}
usepackage{cases}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 重定义字体、字号命令 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
newcommand{song}{CJKfamily{song}} % 宋体 (Windows自带
newcommand{fs}{CJKfamily{fs}} % 仿宋体 (Windows自带
newcommand{kai}{CJKfamily{kai}} % 楷体 (Windows自带
newcommand{hei}{CJKfamily{hei}} % 黑体 (Windows自带
newcommand{li}{CJKfamily{li}} % 隶书 (Windows自带
newcommand{you}{CJKfamily{you}} % 幼圆 (Windows自带
newcommand{chuhao}{fontsize{42pt}{baselineskip}selectfont} % 字号设置
newcommand{xiaochuhao}{fontsize{36pt}{baselineskip}selectfont} % 字号设置
newcommand{yichu}{fontsize{32pt}{baselineskip}selectfont} % 字号设置
newcommand{yihao}{fontsize{28pt}{baselineskip}selectfont} % 字号设置
newcommand{erhao}{fontsize{21pt}{baselineskip}selectfont} % 字号设置
newcommand{xiaoerhao}{fontsize{18pt}{baselineskip}selectfont} % 字号设置
newcommand{sanhao}{fontsize{}{baselineskip}selectfont} % 字号设置
newcommand{xiaosanhao}{fontsize{15pt}{baselineskip}selectfont} % 字号设置
newcommand{sihao}{fontsize{14pt}{baselineskip}selectfont} % 字号设置
newcommand{xiaosihao}{fontsize{12pt}{baselineskip}selectfont} % 字号设置
newcommand{wuhao}{fontsize{}{baselineskip}selectfont} % 字号设置
newcommand{xiaowuhao}{fontsize{9pt}{baselineskip}selectfont} % 字号设置
newcommand{liuhao}{fontsize{}{baselineskip}selectfont} % 字号设置
newcommand{qihao}{fontsize{}{baselineskip}selectfont} % 字号设置
%%%%%%%%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{baselinestretch}{}
begin{document}
begin{CJK*}{GBK}{song}
CJKtildeCJKindent
{heisanhao 数学公式举例:}
bigskip
section{概述}
数学模式中的普通文本必须放入一个~LR 盒子里. 如:
$ x^2+sin(x)=0 is a nonlinear equation$.
$ x^2+sin(x)=0 mbox{ is a nonlinear equation} $.
$ x^2+sin(x)=0 mbox{ 是一个非线性方程}$.
section{行内公式}
勾股定理~begin{math}a^2+b^2=c^2end{math}~也称商高定理.
勾股定理~(a^2+b^2=c^2)~也称商高定理.
勾股定理~$a^2+b^2=c^2$~也称商高定理.
section{行间公式}
subsection{单行公式}
begin{displaymath}
a^2+b^2=c^2.
end{displaymath}
[
a^2+b^2 = c^2.
]
begin{equation}
a^2+b^2=c^2.
end{equation}
$$
a^2+b^2=c^2. eqno (*)
$$
$$
a^2+b^2=c^2. eqno (4a)
$$
begin{equation}label{eq:square}
x^2+y^2=R^2.
end{equation}
公式~ref{eq:square}~表示的是一个圆的标准方程.
setcounter{equation}{5}
begin{equation}label{lap}
-triangle u(x,y) = f(x,y),quad (x,y)inOmega .
end{equation}
方程~eqref{lap}~则是一个椭圆型的偏微分方程.
subsection{多行公式}
begin{eqnarray*}
x^2 + y^2 = R^2
2x + 3y = b
end{eqnarray*}
begin{eqnarray}
x^2 + y^2 & = & R^2
2x + 3y & = & b
end{eqnarray}
setlength{arraycolsep}{}
setcounter{equation}{1}
begin{eqnarray}
d(uv) & = & (uv)' dx
& = & (u'v+uv') dx
& = & v(u'dx)+u(v'dx) nonumber
setcounter{equation}{5}
& = & v du+u dv label{leibniz}
end{eqnarray}
这样就得到了公式~(ref{leibniz}).
section{角标: 上标与下标}
注意: 这里的角标命令必须在数学模式下使用!!
$$
x_1, quad
x_{11}, quad
x_{11}^{22}, quad
x_{m}^{(k)},quad
{}^* x ^*, quad
x^{m^n}, quad
{x^x}^{x^x}
$$
中文角标:qquad
$ x^{mbox{scriptsize 平方}},quad x^{y^{mbox{tiny 平方}}} $
导数符号:qquad
$ f^{prime} quadmbox{或者}quad f' $
section{分式}
出现在行内的分式: $ (x+y)/2 $ 和~$ frac{x+y}{2} $, 第二个分式用的是一级角标字体.
分式中的分式: $frac{frac{x}{x+y}}{x+y+z}$, 字体会更小, 但最小为二级角标字体.
行间公式
$$
frac{x+y}{2},qquad frac{frac{x}{x+y}}{x+y+z}
$$
section{根式}
$ sqrt{x},quad sqrt{1+sqrt{2}} $
$ surd{x},quad surd{1+sqrt{2}} $
当被开方式字符高度不同时, 根号线会在不同水平线上, 如:
$sqrt{a}, sqrt{b}$.
解决办法: 加入{hei数学支柱}~
textbackslash{}mathstrutfootnote{宽度为~0,高度与圆括号相同}, 例:
$sqrt{a}, sqrt{b},quad sqrt{amathstrut}, sqrt{bmathstrut}$.
section{求和与积分}
newcommand{dx}{mathrm{d},x}
$$
int_a^b f(x)mathrm{d}x,quad
oint_a^b f(x)mathrm{d}x,quad
$$
$$
intlimits_a^b f(x)mathrm{d}x,quad
ointlimits_a^b f(x)mathrm{d}x,quad
$$
直立的积分号:
$$
varint_a^b f(x)dx, quad
iint_a^b f(x)dx, quad
iiint_a^b f(x)dx,quad
varoint_a^b f(x)dx,quad
oiint_a^b f(x)dx,quad
$$
$$
varintnolimits_a^b f(x)dx, quad
iintnolimits_a^b f(x)dx, quad
iiintnolimits_a^b f(x)dx,quad
varointnolimits_a^b f(x)dx,quad
oiintnolimits_a^b f(x)dx,quad
$$
section{数学重音符号}
newcommand{ml}[1]{texttt{textcolor{blue}{char` #1}}}
renewcommand{arraystretch}{}
setlength{tabcolsep}{6pt}
begin{tabular}{|p{textwidth}|p{textwidth}|}hline
ml{hat}{a}~$to hat{a}$ & ml{bar}{a}~$to bar{a}$
ml{dot}{a}~$to dot{a}$ & ml{ddot}{a}~$to ddot{a}$
ml{tilde}{a}~$to tilde{a}$ & ml{vec}{a}~$to vec{a}$
ml{breve}{a}~$to breve{a}$ & ml{check}{a}~$to check{a}$
ml{acute}{a}~$to acute{a}$ & ml{grave}{a}~$to grave{a}$
ml{mathring}{a}~$to mathring{a}$ &
hline
end{tabular}
bigskip
加宽的帽子和波浪号: $widehat{hello},quad widetilde{good}$
section{上划线、下划线及类似符号}
$$ overline{overline{a}^2 + underline{ab} + bar{b}^2} $$
bigskip
$$ underbrace{a+overbrace{b+dots+b}^{mmbox{scriptsize个}}+ c}_
{20mbox{scriptsize个}}
$$
section{堆积符号}
$$
vec{x} stackrel{mathrm{def}}{=} (x_1,ldots,x_n)
$$
section{可以变大的定界符}
略
section{阵列}
一个简单的阵列(行内):
$
begin{array}{ccc}
11 & 12 & 13
21 & 22 & 23
end{array}
$
阵列(行间)
$$
left(
begin{array}{ccc}
11 & 12
21 & 22 & 23
end{array}
right)
$$
一个较复杂的例子
$$
left{
begin{array}{ccccccccc}
a_{11}x_1 &+& a_{12}x_2 &+& cdots &+& a_{1n}x_n &=& b_1
a_{21}x_1 &+& a_{22}x 2 &+& cdots &+& a_{2n}x_n &=& b_2
multicolumn{9}{c}{dotfill}
a_{n1}x_1 &+& a_{n2}x_2 &+& cdots &+& a_{nn}x_n &=& b_n
end{array}
right.
$$
另一个较复杂的例子
begin{equation}
f(x)=left{
begin{array}{ll}
x & mbox{当~$xge 0$~时;}
-x & mbox{其它情形}
end{array}
right.
end{equation}
section{添加宏包 quad $backslash mbox{usepackage{cases}}$}
subsection{cases 环境}
begin{numcases}{|x|=}
x, & for $xgeq0$
-x, & for $x<0$
end{numcases}
begin{subnumcases}{|x|=}
x, & for $xgeq0$
-x, & for $x<0$
end{subnumcases}
begin{subnumcases}{ }
x, & for $xgeq0$
-x, & for $x<0$
end{subnumcases}
begin{equation}
f(x)=begin{cases}
1 & -1 end{cases} end{equation} subsection{subequations~环境} begin{subequations} begin{align} (a+b)^2 & =a^2+b^2 a+b+c)^2 & =a^2+b^2+c^2+2ab+2ac+2bc end{align} begin{equation} (a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3 end{equation} end{subequations} begin{equation} (a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3 end{equation} end{CJK*} end{document}
版权声明:本文标题:latex数学公式总结 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1709056771a537353.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论