MathJax 语法

MathJax和相关的Latex语法。 本文从math.stackexchange.com上名为MathJax basic tutorial and quick reference的问题翻译而来,并有所改动。主要讲述了如何使用MathJax和相关的Latex语法。 MathJax简介 MathJax是一款运行在浏览器中的开源数学符号渲染引擎,使用MathJax可以方便的在浏览器中显示数学公式,不需要使用图片。目前,MathJax可以... 阅读详情
  1. To see how any formula was written in any question or answer, including this one, right-click on the expression it and choose "Show Math As > TeX Commands". (When you do this, the '$' will not display. Make sure you add these. See the next point.)

  2. For inline formulas, enclose the formula in $...$. For displayed formulas, use $$...$$.
    These render differently. For example, type
    $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$
    to show  ∑ni=0i2=(n2+n)(2n+1)6 ∑i=0ni2=(n2+n)(2n+1)6 (which is inline mode) or type
    $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$
    to show

    ∑i=0ni2=(n2+n)(2n+1)6 ∑i=0ni2=(n2+n)(2n+1)6
    (which is display mode).

  3. For Greek letters, use \alpha, \beta, …, \omega:  α,β,…ω α,β,…ω. For uppercase, use \Gamma, \Delta, …, \Omega:  Γ,Δ,…,Ω Γ,Δ,…,Ω.

  4. For superscripts and subscripts, use ^ and _. For example, x_i^2:  x2i xi2, \log_2 x:  log2x log2⁡x.

  5. Groups. Superscripts, subscripts, and other operations apply only to the next “group”. A “group” is either a single symbol, or any formula surrounded by curly braces {…}. If you do 10^10, you will get a surprise:  1010 1010. But 10^{10} gives what you probably wanted:  1010 1010. Use curly braces to delimit a formula to which a superscript or subscript applies: x^5^6 is an error; {x^y}^z is  xyz xyz, and x^{y^z} is  xyz xyz. Observe the difference between x_i^2  x2i xi2 and x_{i^2}  xi2 xi2.

  6. Parentheses Ordinary symbols ()[] make parentheses and brackets  (2+3)[4+4] (2+3)[4+4]. Use \{ and \} for curly braces  {} {}.

    These do not scale with the formula in between, so if you write (\frac{\sqrt x}{y^3}) the parentheses will be too small:  (x√y3) (xy3). Using \left(…\right) will make the sizes adjust automatically to the formula they enclose: \left(\frac{\sqrt x}{y^3}\right) is  (x√y3) (xy3).

    \left and\right apply to all the following sorts of parentheses: ( and )  (x) (x), [ and ]  [x] [x], \{ and \}  {x} {x}, |  |x| |x|, \vert  |x| |x|, \Vert  ∥x∥ ‖x‖, \langle and \rangle  ⟨x⟩ ⟨x⟩, \lceil and \rceil  ⌈x⌉ ⌈x⌉, and \lfloor and \rfloor  ⌊x⌋ ⌊x⌋. There are also invisible parentheses, denoted by .: \left.\frac12\right\rbrace is  12} 12}.

  7. Sums and integrals \sum and \int; the subscript is the lower limit and the superscript is the upper limit, so for example \sum_1^n  ∑n1 ∑1n. Don't forget {…} if the limits are more than a single symbol. For example, \sum_{i=0}^\infty i^2 is  ∑∞i=0i2 ∑i=0∞i2. Similarly, \prod  ∏ ∏, \int  ∫ ∫, \bigcup  ⋃ ⋃, \bigcap  ⋂ ⋂, \iint  ∬ ∬.

  8. Fractions There are two ways to make these. \frac ab applies to the next two groups, and produces  ab ab; for more complicated numerators and denominators use {…}: \frac{a+1}{b+1} is  a+1b+1 a+1b+1. If the numerator and denominator are complicated, you may prefer \over, which splits up the group that it is in: {a+1\over b+1} is  a+1b+1 a+1b+1.

  9. Fonts

    • Use \mathbb or \Bbb for "blackboard bold":  CHNQRZ CHNQRZ.
    • Use \mathbf for boldface:  ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz.
    • Use \mathtt for "typewriter" font:  ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ  abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz.
    • Use \mathrm for roman font:  ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz.
    • Use \mathsf for sans-serif font:  ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz.
    • Use \mathcal for "calligraphic" letters:  ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ
    • Use \mathscr for script letters:  ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ
    • Use \mathfrak for "Fraktur" (old German style) letters:  ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.
  10. Radical signs Use sqrt, which adjusts to the size of its argument: \sqrt{x^3}  x3−−√ x3; \sqrt[3]{\frac xy}  xy−−√3 xy3. For complicated expressions, consider using {...}^{1/2} instead.

  11. Some special functions such as "lim", "sin", "max", "ln", and so on are normally set in roman font instead of italic font. Use \lim, \sin, etc. to make these: \sin x  sinx sin⁡x, not sin x  sinx sinx. Use subscripts to attach a notation to \lim: \lim_{x\to 0}

    limx→0 limx→0

  12. There are a very large number of special symbols and notations, too many to list here; see this shorter listing, or this exhaustive listing. Some of the most common include:

    • \lt \gt \le \ge \neq  <>≤≥≠ <>≤≥≠. You can use \not to put a slash through almost anything: \not\lt  ≮ ≮ but it often looks bad.
    • \times \div \pm \mp  ×÷±∓ ×÷±∓. \cdot is a centered dot:  x⋅y x⋅y
    • \cup \cap \setminus \subset \subseteq \subsetneq \supset \in \notin \emptyset \varnothing  ∪∩∖⊂⊆⊊⊃∈∉∅∅ ∪∩∖⊂⊆⊊⊃∈∉∅∅
    • {n+1 \choose 2k} or \binom{n+1}{2k}  (n+12k) (n+12k)
    • \to \rightarrow \leftarrow \Rightarrow \Leftarrow \mapsto  →→←⇒⇐↦ →→←⇒⇐↦
    • \land \lor \lnot \forall \exists \top \bot \vdash \vDash  ∧∨¬∀∃⊤⊥⊢⊨ ∧∨¬∀∃⊤⊥⊢⊨
    • \star \ast \oplus \circ \bullet  ⋆∗⊕∘∙ ⋆∗⊕∘∙
    • \approx \sim \simeq \cong \equiv \prec \lhd  ≈∼≃≅≡≺,⊲ ≈∼≃≅≡≺,⊲.
    • \infty \aleph_0  ∞ℵ0 ∞ℵ0 \nabla \partial  ∇∂ ∇∂ \Im \Re  IR ℑℜ
    • For modular equivalence, use \pmod like this: a\equiv b\pmod n  a≡b(modn) a≡b(modn).
    • \ldots is the dots in  a1,a2,…,an a1,a2,…,an \cdots is the dots in  a1+a2+⋯+an a1+a2+⋯+an
    • Some Greek letters have variant forms: \epsilon \varepsilon  ϵε ϵε, \phi \varphi  ϕφ ϕφ, and others. Script lowercase l is \ell  ℓ ℓ.

    Detexify lets you draw a symbol on a web page and then lists the  TEX TEX symbols that seem to resemble it. These are not guaranteed to work in MathJax but are a good place to start. To check that a command is supported, note that MathJax.org maintains a list of currently supported  LATEX LATEX commands, and one can also check Dr. Carol JVF Burns's page of  TEX TEXCommands Available in MathJax.

  13. Spaces MathJax usually decides for itself how to space formulas, using a complex set of rules. Putting extra literal spaces into formulas will not change the amount of space MathJax puts in: a␣b and a␣␣␣␣b are both  ab ab. To add more space, use \, for a thin space  ab ab; \; for a wider space  ab ab. \quad and \qquad are large spaces:  ab ab,  ab ab.

    To set plain text, use \text{…}:  {x∈s∣x is extra large} {x∈s∣x is extra large}. You can nest $…$ inside of \text{…}.

  14. Accents and diacritical marks Use \hat for a single symbol  x^ x^, \widehat for a larger formula  xyˆ xy^. If you make it too wide, it will look silly. Similarly, there are \bar  x¯ x¯ and \overline  xyz¯¯¯¯¯¯¯¯ xyz¯, and \vec  x⃗  x→ and \overrightarrow  xy−→ xy→ and \overleftrightarrow  xy←→ xy↔. For dots, as in  ddxxx˙=x˙2+xx¨ ddxxx˙=x˙2+xx¨, use \dot and \ddot.

  15. Special characters used for MathJax interpreting can be escaped using the \ character: \$  $ $, \{  { {, \_  _ _, etc. If you want \ itself, you should use \backslash  ∖ ∖, because \\ is for a new line.

(Tutorial ends here.)

MathJax 基础 (1):基础语法 MathJax基础教程 阅读详情

相关推荐

MathJax展示数学公式

服务器返回Latex的字符串 我在客户端用webView来展示与交互,H5混合开发

MathJax新手使用教程

的开源软件,方便在网络上显示数学公式和符号,插入方法是。

weixin_46119529的博客 3471

从0开始学GEE python——Google Earth Engine (GEE) 和 geemap 库来获取 Sentinel-2 卫星影像,并将其可视化

这段代码的目的是从 Sentinel-2 卫星影像中获取特定地点的影像,并将其可视化在地图上。通过设置合适的波段和可视化参数,用户可以清晰地查看该地区的卫星影像。

此星光明博客 1169

Mathjax语法总结

目录 目录 1.基本语法 1.1呈现位置 1.2字母与杂项 1.2.1希腊字母 1.2.2字母修饰 a.上下标 b.矢量 c.特殊修饰 d.字体 e.空格 1.2.3分组 1.2.4括号 1.2.5常用数学运算符 a.基础符号 b.集合符号 c.字母修饰 d.杂项 1.3求和、极限与积分 1.3.1求和 1.3.2极限 1.3.3积分 1.4分式与根式 1.4.1分式 1.4...

ajacker的博客 2万+

opencv实践项目-图片拼接之缝合线算法

opencv 图片缝合线算法

wyw0000的博客 2628

从原理到代码:拆解UniFormer中动态位置嵌入(DPE)的3D卷积实现

本文深入解析了UniFormer模型中动态位置嵌入(DPE)模块的3D卷积实现原理与代码。DPE通过一个轻量的3D深度可分离卷积,替代传统静态位置编码,使模型能自动学习视频数据的时空位置关系。文章对比了其与Swin Transformer相对位置偏置的优劣,并提供了PyTorch实现代码与高级定制方案,为视频理解任务提供了高效灵活的动态位置编码解决方案。

weixin_29207149的博客 310

数学公式语法(Mathjax语法)

数学公式语法、Mathjax语法

小匠的Blog 2605

EEVDF调度算法核心实现解析(一)

本文深入解析Linux kernel 6.6引入的EEVDF调度算法核心实现,详细讲解其基于虚拟截止时间(virtual deadline)的进程挑选机制和红黑树优化设计。通过代码实例展示算法如何平衡系统响应速度与公平性,特别适合需要优化Linux系统性能的开发者参考。

weixin_42522953的博客 483

MathJax基础教程和快速参考

更多内容,请看这里.本文是本人对其中部分的翻译,若有疏漏,还请联系作者更正。 基础部分 对于行内公式,使用$...$括起来。对于整行显示公式,使用$$...$$括起来。 比方说,键入$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$可以在一行内嵌入公式∑ni=0i2=(n2+n)(2n+1)6∑i=0ni2=(n2+n)(2n+1)6\sum_{i=0...

_TFBoy的小茶馆 5508

chipseeker Y叔

这一次讲解非常重要的peak注释,注释在ChIPseeker里只需要用到一个函数annotatePeak,它可以满足大家各方面的需求。 输入 当然需要我们上次讲到的BED文件,ChIPseeker自带了5个BED文件,用getSampleFiles()可以拿到文件的全路径,它返回的是个named list,我这里取第4个文件来演示。annotatePeak的输入也可以是GRanges对象,你如果用R做peak calling的话,直接就可以衔接上ChIPseeker了。 require(ChIPseeke

生信小博士的博客 1602

告别硬件!用Wokwi在线模拟ESP32点灯,5分钟搞定开发环境搭建

本文介绍如何使用Wokwi在线模拟器快速搭建ESP32开发环境,5分钟内完成点灯实验。无需硬件即可体验GPIO控制、PWM调光等核心功能,特别适合物联网开发初学者和快速原型验证。Wokwi的零成本、全功能模拟特性让嵌入式开发变得前所未有的简单高效。

weixin_42567497的博客 504

MathJax语法

MathJax语法—win7本地markdown 在win7下使用MathJax行间公式无法正常显示,找了挺多资料,最终livepreview还是无法显示,只能在浏览器显示,特将该方法以及本地使用的语法做个记录,语法主要转自MathJax语法。针对本地MathJax的行间公式做了修改:$ $改为\\( \\)(本来应该是\( \),但是由于语法原因,需要使用转义符\\来表示\,因此改为\\( \...

luyaxige的博客 3616

从零开始理解异构算力调度:全国一体化算力算网平台实战解析

本文深入解析了异构算力调度技术在全国一体化算力算网平台中的实战应用。通过资源抽象层设计、动态感知引擎和跨云调度算法,实现AI训练任务的高效资源分配,显著提升计算效率并降低成本。特别针对GPU等异构算力的智能调度方案,为多云协同环境下的AI开发提供实用指南。

weixin_28730927的博客 336

MathJax语法简介

MathJax是一个开源的JavaScript显示引擎,专门用于在Web页面上高质量渲染数学公式,支持LaTeX、MathML和AsciiMath等多种数学标记语言,在现代浏览器中无需插件即可实现跨平台数学公式显示。CSDN也支持MathJax。CSDN支持富文本和Markdown编辑方式,推荐使用Markdown编辑方式。

weixin_54978309的博客 194

Unity 热更 之 【YooAsset 热更】几分钟快速了解 YooAsset [功能面板]、以及 [基础代码] 说明

Unity 的资源管理系统不断发展,以适应不同项目的需求和解决特定的问题。AssetBundle 和 Addressable Asset System 是 Unity 官方提供的资源管理解决方案,而 YooAsset 是第三方提供的资源管理系统。简化的API和易用性YooAsset 可能提供了更简单直观的 API,使得资源加载和管理更加容易。对于不熟悉 Addressable 或 AssetBundle 复杂配置的开发者来说,YooAsset 可能是一个更易于上手的选择。性能优化。

仙魁XAN 2965

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

MathJax 语法与小技巧

相对比较全的MathJax小技巧及语法 Here

Lemopig的博客 287

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

python mathjax_MathJax(Markdown中的公式)的基本使用语法

本文主要介绍MathJax公式的基本语法。插入公式如果是在文本中插入公式,则用$...$。如果公式自成段落,则使用$$...$$。字体使用\mathbb或\Bbb来显示黑板粗体字,$\mathbb{NQRZ}$使用\mathbf来显示粗体字,$\mathbf {ABCDabcd}$使用\mathtt来显示打印式字体,$\mathtt{ABCDabcd}$使用\mathrm来显示罗马字体,$\mat...

weixin_39529302的博客 835

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

MathJax基本语法(持续更新)

昨天给hexo装了mathjax 以后好直接写公式 基本语法 位置 公式插入在文档中的一句话 (有点像html 的display: inline) $(中间写正文)$ 公式直接占用一行 (有点像 html display: block) $$(中间写正文)$$ 希腊字母 这个直接照搬一位大佬的 显示 命令 显示 命令 α \alpha β ...

尘的博客 6554

mathjax语法

原文在此

sinat_16968575的专栏 837

MathJax使用LaTeX语法编写数学公式教程

MathJax是一款相当强悍的在网页显示数学公式的插件。本教程介绍MathJax如何使用LaTeX语法编写数学公式。 1.如何插入公式 LaTeX的数学公式有两种:行中公式和独立公式。行中公式放在文中与其它文字混编,独立公式单独成行。 行中公式可以用如下两种方法表示: \(数学公式\) 或 ¥数学公式¥(要把人民币符号换成美元符号) 独立公式可以用如下两种方法表示:

Mr.Phoebe的专栏 7428

介绍MathJax如何使用LaTeX语法编写数学公式

MathJax是一款相当强悍的在网页显示数学公式的插件。本教程介绍MathJax如何使用LaTeX语法编写数学公式。 1.如何插入公式 LaTeX的数学公式有两种:行中公式和独立公式。行中公式放在文中与其它文字混编,独立公式单独成行。 行中公式可以用如下两种方法表示: \(数学公式\) 或 ¥数学公式¥(要把人民币符号换成美元符号) 独立公式可以用如下两种方法表示:

LLXLQY的博客 1055

基本数学公式语法(of MathJax)

概述在Markdown中输入数学公式需要LaTeX语法的支持。基本语法呈现位置 正文(inline)中的LaTeX公式用$...$定义 语句为$\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t$ 显示为∑Ni=0∫bag(t,i)dt\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t 单独显示(display)的LaTeX公式用$$...$

树屋Treehouse 3万+

MathJax——markdown公式输入语法

官方文档: https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference 常用: https://www.jianshu.com/p/a0aa94ef8ab2

qq_43284141的博客 417
上一篇: c++中vector的用法详解
下一篇: LM method
mucai1
博客等级 码龄16年 161粉丝 63原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值