01 · Syntax
先认识四种写法
Four forms to remember
行内公式跟随正文排列;块级公式独占一行并居中。化学式写在 \ce{} 中,编号写在块级公式的 \tag{} 中。
Inline math flows with text; display math gets its own centered line. Put chemistry inside \ce{} and numbering inside \tag{}.
在软件中打开“学科公式”时默认选择行内公式,支持按名称、学科或关键词搜索 79 个模板。点击编辑器内公式旁的“修改公式”或双击渲染公式,进入可视化编辑;用鼠标定位、方向键移动、Tab 切换空位,可插入分数、根号、积分和矩阵并增删行列。模板参数与高级源码可展开;不支持的复杂语法继续保留源码。
Academic Formulas defaults to inline mode and lets you search 79 templates by name, discipline, or keyword. Use Edit formula beside the rendered formula or double-click it. Click to position the caret, use arrows and Tab to move, and insert fractions, roots, integrals, or matrices with row/column controls. Expand template parameters or advanced source when needed; unsupported complex syntax remains intact in source.
行内“常规排版/大号排版”控制分数与求和的展开方式,不改变行内/块级类型;实时预览展示最终阅读效果。正文风格同步编辑与阅读区域,公式保留专用数学字体。
Normal / Large inline layout controls fractions and sums without changing inline versus display mode. Live preview shows the final reading result. Body styles apply to editing and reading while math keeps its dedicated fonts.
$E=mc^2$$$ ... $$\ce{H2O}\tag{1}02 · Inline math
行内公式:与正文一起阅读
Inline math: flow with prose
用一对半角美元符号包住公式,美元符号与公式内容之间不要留空格。
Wrap the expression in single dollar signs, without spaces just inside the delimiters.
圆的面积是 $S=\pi r^2$,质能方程是 $E=mc^2$。圆的面积是 ,质能方程是 。
03 · Display math
块级公式:独占一行并居中
Display math: centered on its own line
把开始和结束的 $$ 分别放在独立行上,适合分数、矩阵、方程组和较长公式。
Put the opening and closing $$ on separate lines for fractions, matrices, systems, and longer equations.
$$
\frac{-b\pm\sqrt{b^2-4ac}}{2a}
$$04 · Equation numbering
公式编号:使用 \\tag
Equation numbering with \\tag
编号写在块级公式内部,可以使用数字,也可以使用有意义的文字。
Place the tag inside display math. It can be a number or a meaningful label.
$$
E=mc^2 \tag{1}
$$05 · Chemistry
化学公式:使用 \\ce
Chemistry with \\ce
轻阅内置 mhchem,可以显示上下标、电荷、反应箭头、物态和反应条件。行内与块级写法都支持。
Quillite includes mhchem for subscripts, charges, reaction arrows, states, and conditions in inline or display math.
水的化学式是 $\ce{H2O}$,硫酸是 $\ce{H2SO4}$。水的化学式是 ,硫酸是 。
$$
\ce{2H2 + O2 -> 2H2O} \tag{反应-1}
$$\ce{N2 + 3H2 <=> 2NH3}\ce{Na+ + Cl- -> NaCl}\ce{CaCO3(s) -> CaO(s) + CO2(g)}06 · Quick reference
常用 LaTeX 语法速查
Common LaTeX reference
| 功能Purpose | 写法Syntax | 效果Result |
|---|---|---|
| 分数Fraction | \frac{a}{b} | |
| 平方根Square root | \sqrt{x} | |
| 求和Sum | \sum_{i=1}^n | |
| 积分Integral | \\int_0^1 | |
| 极限Limit | \lim_{x\to0} | |
| 上下标Scripts | a_1+x^2 |
07 · Complete template catalog
软件内置公式:全部 79 项
All 79 built-in templates
内容与最新版软件源码同步。参数栏显示插入模板时可修改的字段及默认值;复制按钮会复制可直接粘贴的块级 Markdown。
Synchronized with the current desktop source. Parameters show every editable field and default value; Copy places paste-ready display Markdown on the clipboard.
基础数学
Mathematics
10E = mc^2E = mc^2y等号右侧Right sideax+by = ax+ba+b分母Denominatorc+d\frac{a+b}{c+d}x指数Exponent2下标(可空)Subscript (optional)ix_{i}^{2}a^2+b^2根指数(平方根可空)Root index (optional)—\sqrt{a^2+b^2}a真数Argumentx\log_{a} xx-a\left|x-a\right|nn!n选取数 rChosen rrA_{n}^{r}=\frac{n!}{(n-r)!}n选取数 rChosen rrC_{n}^{r}=\binom{n}{r}=\frac{n!}{r!(n-r)!}代数与函数
Algebra & functions
9a系数 bCoefficient bb系数 cCoefficient ccx = \frac{-b \pm \sqrt{b^{2}-4\cdot a\cdot c}}{2\cdot a}a常数 bConstant bba\cdot x+b=0\quad\Rightarrow\quad x=-\frac{b}{a}a_1x+b_1y=c_1第二个方程Second equationa_2x+b_2y=c_2\begin{cases}a_1x+b_1y=c_1 \\ a_2x+b_2y=c_2\end{cases}a第二项Second termb次数 nPower nn(a+b)^{n}=\sum_{k=0}^{n}\binom{n}{k}a^{n-k}\cdot b^{k}a_1公差Common differenced项数Indexna_{n}=a_1+\left(n-1\right)\cdot da_1末项Last terma_n项数Number of termsnS_{n}=\frac{n\cdot \left(a_1+a_n\right)}{2}a_1公比Common ratioq项数Indexna_{n}=a_1\cdot q^{n-1}a_1公比Common ratioq项数Number of termsnS_{n}=a_1\cdot \frac{1-q^{n}}{1-q}x^2第一段条件First conditionx \ge 0第二段结果Second result-x第二段条件Second conditionx < 0f(x)=\begin{cases}x^2, & x \ge 0 \\ -x, & x < 0\end{cases}几何
Geometry
10a直角边 bSide bb斜边 cHypotenuse cca^{2}+b^{2}=c^{2}x_1y₁y₁y_1x₂x₂x_2y₂y₂y_2d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}x_1y₁y₁y_1x₂x₂x_2y₂y₂y_2M\left(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\right)x_1y₁y₁y_1x₂x₂x_2y₂y₂y_2k=\frac{y_2-y_1}{x_2-x_1}rS=\pi\cdot r^{2}rC=2\cdot \pi\cdot ra高HeighthS=\frac{1}{2}\cdot a\cdot ha边 bSide bb边 cSide ccp=\frac{a+b+c}{2},\quad S=\sqrt{p(p-a)(p-b)(p-c)}a边 bSide bb边 cSide cc\frac{a}{\sin A}=\frac{b}{\sin B}=\frac{c}{\sin C}a边 bSide bb边 cSide cc夹角Included angleCc^{2}=a^{2}+b^{2}-2\cdot a\cdot b\cdot \cos\left(C\right)微积分
Calculus
11f(x)变量Variablex\frac{d}{dx}\left(f(x)\right)a上限Upper boundb被积函数Integrandf(x)积分变量Variablex\int_{a}^{b} f(x)\,dxf(x)积分变量Variablex\int f(x)\,dx=F(x)+Cf(x)变量Variablex阶数Ordern\frac{d^{n}}{dx^{n}}\left(f(x)\right)f(x,y)求导变量Variablex\frac{\partial}{\partial x}\left(f(x,y)\right)D被积函数Integrandf(x,y)第一积分变量First integration variablex第二积分变量Second integration variabley\iint_{D} f(x,y)\,dx\,dyf自变量Independent variablex展开点Centera求和下标Indexnf(x)=\sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}\left(x-a\right)^{n}f变量(逗号分隔,最多 16 个)Variables (comma-separated, up to 16)x,y,z\nabla f=\left(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y},\frac{\partial f}{\partial z}\right)x趋近值Approaches0表达式Expression\frac{\sin x}{x}\lim_{x \to 0} \frac{\sin x}{x}i起始值Start1结束值Endn求和项Termi^2\sum_{i=1}^{n} i^2i起始值Start1结束值Endn连乘项Factora_i\prod_{i=1}^{n} a_i线性代数
Linear algebra
8a第 1 行第 2 列Row 1, column 2b第 2 行第 1 列Row 2, column 1c第 2 行第 2 列Row 2, column 2d\begin{bmatrix}a & b \\ c & d\end{bmatrix}a分量(逗号分隔)Componentsa_1,a_2,a_3\vec{a}=\left(a_1,a_2,a_3\right)\vec a向量 bVector b\vec b夹角Angle\theta\left(\vec a\right)\cdot \left(\vec b\right)=\lVert\vec a\rVert\lVert\vec b\rVert\cos\left(\theta\right)\vec a向量 bVector b\vec b夹角Angle\theta\lVert\vec a\times\vec b\rVert=\lVert\vec a\rVert\lVert\vec b\rVert\sin \thetaa第 1 行第 2 列Row 1, column 2b第 2 行第 1 列Row 2, column 1c第 2 行第 2 列Row 2, column 2d\begin{vmatrix}a&b\\c&d\end{vmatrix}=a\cdot d-b\cdot ca,b,c第 2 行Row 2d,e,f第 3 行Row 3g,h,i\begin{bmatrix}a&b&c\\d&e&f\\g&h&i\end{bmatrix}a元素 bElement bb元素 cElement cc元素 dElement ddA^{-1}=\frac{1}{a\cdot d-b\cdot c}\begin{bmatrix}d&-b\\-c&a\end{bmatrix}A特征值Eigenvalue\lambda单位矩阵Identity matrixI\det\left(A-\lambda\,I\right)=0概率统计
Probability & statistics
9x样本数Sample countn\bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_ix权重符号Weight symbolw样本数Sample countn\bar{x}=\frac{\sum_{i=1}^{n}w_ix_i}{\sum_{i=1}^{n}w_i}X均值Mean\mu\operatorname{Var}(X)=\mathbb{E}\left[(X-\mu)^2\right]\operatorname{Var}(X)\sigma=\sqrt{\operatorname{Var}(X)}\mu标准差Standard deviation\sigmaf(x)=\frac{1}{\sigma\cdot \sqrt{2\pi}}\exp\left[-\frac{(x-\mu)^2}{2\cdot \sigma^{2}}\right]n成功次数Successesk成功概率ProbabilitypP(X=k)=\binom{n}{k}\cdot p^{k}\cdot (1-p)^{n-k}A事件 BEvent BBP(A\mid B)=\frac{P(A\cap B)}{P(B)}A事件 BEvent BBP(A\mid B)=\frac{P(B\mid A)P(A)}{P(B)}X变量 YVariable YY\rho_{X,Y}=\frac{\operatorname{Cov}(X,Y)}{\sigma_{X}\sigma_{Y}}物理
Physics
8F质量Massm加速度AccelerationaF=m\cdot am速度VelocityvE_k=\frac{1}{2}\cdot m\cdot v^{2}m重力加速度Gravityg高度HeighthE_p=m\cdot g\cdot hm光速Speed of lightcE=m\cdot c^{2}U电流CurrentI电阻ResistanceRU=I\cdot RU电流CurrentIP=U\cdot Iv频率Frequencyf波长Wavelength\lambdav=f\cdot \lambdap体积VolumeV物质的量Amountn气体常数Gas constantR温度TemperatureTp\cdot V=n\cdot R\cdot T基础化学
Chemistry
72H2 + O2 -> 2H2O\ce{2H2 + O2 -> 2H2O}H2SO4\ce{H2SO4}SO4^2-\ce{SO4^2-}m摩尔质量Molar massMn=\frac{m}{M}n溶液体积Solution volumeVc=\frac{n}{V}m_{\text{solute}}溶液质量Solution massm_{\text{solution}}w=\frac{m_{\text{solute}}}{m_{\text{solution}}}\times100\%[\ce{H+}]\mathrm{pH}=-\log_{10}[\ce{H+}]化学反应
Chemical reactions
72H2 + O2生成物Products2H2O\ce{2H2 + O2 -> 2H2O}N2 + 3H2生成物Products2NH3反应条件(可空)Condition (optional)heat\ce{N2 + 3H2 <=>[heat] 2NH3}CaCO3(s)生成物(含物态)Products with statesCaO(s) + CO2(g)\ce{CaCO3(s) -> CaO(s) + CO2(g)}Ag+ + Cl-沉淀物PrecipitateAgCl v\ce{Ag+ + Cl- -> AgCl v}2H+ + CO3^2-生成物ProductsH2O + CO2 ^\ce{2H+ + CO3^2- -> H2O + CO2 ^}[C]^c[D]^d反应物浓度乘积Reactant concentrations[A]^a[B]^bK_c=\frac{[C]^c[D]^d}{[A]^a[B]^b}\Delta c时间变化Time change\Delta tv=-\frac{\Delta c}{\Delta t}08 · Troubleshooting
公式没有正确显示时
When a formula does not render
- 确认使用半角美元符号和反斜杠。
- 行内公式的美元符号与内容之间不要留空格。
- 块级公式开始与结束的
$$建议分别独占一行。 - 化学式必须放在
\ce{...}内。 - 三个反引号包围的是代码块,只显示源码,不会渲染公式。
- Use half-width dollar signs and backslashes.
- Do not leave spaces just inside inline dollar delimiters.
- Put the opening and closing
$$on separate lines. - Put chemistry inside
\ce{...}. - Triple-backtick code blocks show source and do not render math.
在编辑器“更多格式 → 学科公式”中新建公式,或把光标放进已有公式后直接修改。
Create math through More Formats → Subject Formulas, or place the cursor inside existing math to edit it directly.