欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

玩欧卡就用莱仕达V10方向盘欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 8477|回复: 4
收起左侧

如何在论坛输入数学公式?

[复制链接]
知行 发表于 2012-11-11 12:19 | 显示全部楼层 |阅读模式
如何在论坛输入数学公式?--LaTex使用帮助
一、LaTex简介
LaTeX(LATEX,音译“拉泰赫”)是一种基于TeX的排版系统,由美国计算机学家莱斯利·兰伯特(Leslie Lamport)在20世纪80年代初期开发,利用这种格式,即使使用者没有排版和程序设计的知识也可以充分发挥由TeX所提供的强大功能,能在几天,甚至几小时内生成很多具有书籍质量的印刷品。对于生成复杂表格和数学公式,这一点表现得尤为突出。因此它非常适用于生成高印刷质量的科技和数学类文档。这个系统同样适用于生成从简单的信件到完整书籍的所有其他种类的文档。

二、所见所得方式编辑公式
在线LaTex公式编辑器
http://www.codecogs.com/products/eqneditor/editor.php?lang=zh-cn

用上面的在线公式编辑器编辑好公式之后,复制公式代码,然后粘贴到论坛tex标签之间。
例子1.
公式代码:a^{2}+b^{2}=\int (a^{b}+c) dx
复制到tex标签中:
[tex]a^{2}+b^{2}=\int (a^{b}+c) dx[/tex]
效果

 楼主| 知行 发表于 2012-11-11 12:24 | 显示全部楼层
三、高级编辑
如果你是高手,可以直接敲latex代码。新手想敲代码也可以学下哦,下面是简单的教程。
更加详细的教程请参考维基百科词条帮助:数学公式

3.1 函数符号及特殊字符
标准函数 显示效果
\sin a \cos b \tan c
\sec d \csc e \cot f
\arcsin h \arccos i \arctan j
\sinh k \cosh l \tanh m \coth n\!
\operatorname{sh}o\,\operatorname{ch}p\,\operatorname{th}q\!
\operatorname{arsinh}r\,\operatorname{arcosh}s\,\operatorname{artanh}t
\lim u \limsup v \liminf w \min x \max y\!
\inf z \sup a \exp b \ln c \lg d \log e \log_{10} f \ker g\!
\deg h \gcd i \Pr j \det k \hom l \arg m \dim n



模代数显示效果
s_k \equiv 0 \pmod{m}
a\,\bmod\,b



微分显示效果

abla \, \partial x \, dx \, \dot x \, \ddot y\, dy/dx\, \frac{\mathrm{d} y}{\mathrm{d} x}\, \frac{\partial^2 y}{\partial x_1\partial x_2}



集合显示效果
\forall \exists \empty \emptyset \varnothing
\in
i
ot \in
otin \subset \subseteq \supset \supseteq
\cap \bigcap \cup \bigcup \biguplus \setminus \smallsetminus
\sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup



运算符显示效果
+ \oplus \bigoplus \pm \mp -
\times \otimes \bigotimes \cdot \circ \bullet \bigodot
\star * / \div \frac{1}{2}



逻辑符号显示效果
\land (or \and) \wedge \bigwedge \bar{q} \to p
\lor \vee \bigvee \lnot
eg q \And



根号显示效果
\sqrt{2} \sqrt[n]{x}



关系符号显示效果
\sim \approx \simeq \cong \dot= \overset{\underset{\mathrm{def}}{}}{=}
\le < \ll \gg \ge > \equiv
ot\equiv
e \mbox{or}
eq \propto
\geqq \geqslant \eqslantgtr \gtrsim \gtrapprox
 楼主| 知行 发表于 2012-11-14 14:50 | 显示全部楼层
上标、下标及积分
功能
语法
效果
上标a^2
下标a_2
组合a^{2+2}
a_{i,j}
结合上下标x_2^3
前置上下标{}_1^2\!X_3^4
导数
HTML
x'
导数
PNG
x^\prime
导数
错误
x\prime
导数点\dot{x}
\ddot{y}
矢量\vec{c}
\overleftarrow{a b}
\overrightarrow{c d}
\widehat{e f g}
上弧
(注: 正确应该用 \overarc, 但在这里行不通。要用建议的语法作为解决办法)
\overset{\frown} {AB}
上划线\overline{h i j}
下划线\underline{k l m}
上括号\overbrace{1+2+\cdots+100}
\begin{matrix} 5050 \\ \overbrace{ 1+2+\cdots+100 } \end{matrix}
下括号\underbrace{a+b+\cdots+z}
\begin{matrix} \underbrace{ a+b+\cdots+z } \\ 26 \end{matrix}
求和\sum_{k=1}^N k^2
\begin{matrix} \sum_{k=1}^N k^2 \end{matrix}
求积\prod_{i=1}^N x_i
\begin{matrix} \prod_{i=1}^N x_i \end{matrix}
上积\coprod_{i=1}^N x_i
\begin{matrix} \coprod_{i=1}^N x_i \end{matrix}
极限\lim_{n \to \infty}x_n
\begin{matrix} \lim_{n \to \infty}x_n \end{matrix}
积分\int_{-N}^{N} e^x\, dx
\begin{matrix} \int_{-N}^{N} e^x\, dx \end{matrix}
双重积分\iint_{D}^{W} \, dx\,dy
三重积分\iiint_{E}^{V} \, dx\,dy\,dz
四重积分\iiiint_{F}^{U} \, dx\,dy\,dz\,dt
闭合的曲线曲面积分\oint_{C} x^3\, dx + 4y^2\, dy
交集\bigcap_1^{n} p
并集\bigcup_1^{k} p

 楼主| 知行 发表于 2012-11-14 14:57 | 显示全部楼层
分数矩阵和多行列式
功能
语法
效果
分数\frac{2}{4}=0.5
小型分数\tfrac{2}{4} = 0.5
大型分数(嵌套)\cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a
大型分数(不嵌套)\dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a
二项式系数\dbinom{n}{r}=\binom{n}{n-r}=C^n_r=C^n_{n-r}
小型二项式系数\tbinom{n}{r}=\tbinom{n}{n-r}=C^n_r=C^n_{n-r}
大型二项式系数\binom{n}{r}=\dbinom{n}{n-r}=C^n_r=C^n_{n-r}
矩阵\begin{matrix}x & y \\z & v\end{matrix}
\begin{vmatrix}x & y \\z & v\end{vmatrix}
\begin{Vmatrix}x & y \\z & v\end{Vmatrix}
\begin{bmatrix}0      & \cdots & 0      \\\vdots & \ddots & \vdots \\0      & \cdots & 0\end{bmatrix}
\begin{Bmatrix}x & y \\z & v\end{Bmatrix}
\begin{pmatrix}x & y \\z & v\end{pmatrix}
\bigl( \begin{smallmatrix}a&b\\ c&d\end{smallmatrix} \bigr)
条件定义f(n) =\begin{cases} n/2,  & \mbox{if }n\mbox{ is even} \\3n+1, & \mbox{if }n\mbox{ is odd}\end{cases}
多行等式\begin{align}f(x) & = (m+n)^2 \\& = m^2+2mn+n^2 \\\end{align}
\begin{alignat}{2}f(x) & = (m-n)^2 \\f(x) & = (-m+n)^2 \\& = m^2-2mn+n^2 \\\end{alignat}
多行等式(左对齐)\begin{array}{lcl}z        & = & a \\f(x,y,z) & = & x + y + z \end{array}
多行等式(右对齐)\begin{array}{lcr}z        & = & a \\f(x,y,z) & = & x + y + z    \end{array}
长公式换行<math>f(x) \,\!</math><math>= \sum_{n=0}^\infty a_n x^n </math><math>= a_0+a_1x+a_2x^2+\cdots</math>
方程组\begin{cases}3x + 5y +  z \\7x - 2y + 4z \\-6x + 3y + 2z\end{cases}
数组\begin{array}{|c|c||c|} a & b & S \\\hline0&0&1\\0&1&1\\1&0&1\\1&1&0\\\end{array}


 楼主| 知行 发表于 2012-11-14 15:01 | 显示全部楼层

希腊字母
小写字母
\alpha \beta \gamma \delta \epsilon \zeta \eta \theta
\iota \kappa\varkappa \lambda \mu \nu \xi \omicron \pi
\rho \sigma \tau \upsilon \phi \chi \psi \omega

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-4-20 14:00 , Processed in 0.054232 second(s), 9 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表