当前位置:网站首页>MD文档中插入数学公式,Typora中插入数学公式
MD文档中插入数学公式,Typora中插入数学公式
2022-07-01 08:26:00 【Gisleung】
Markdown是一种标记语言,它简直不能再简单!仅仅用一些符号,就可以排版出简洁大方的文档笔记。
所以,如何优雅的在MD文档中插入公式?(下文以Typora中插入LaTeX为例)

首先需要了解一下什么是LaTeX
然后学习如何在MD中使用它。
LaTeX数学公式
什么是LaTeX数学公式,可以查看官网:The fastest math typesetting library for the web.
我认为,它就像Typora一样,仅仅用简单的文本符号,就可以排版出复杂的数学公式,可以很方便地嵌入网页或者MD文档中。
插入内敛公式
内敛公式即直接跟在文本后面,不单独占一行。以 f ^ i k \hat f_i^k f^ik 为例(这可不是图片哦),这样一个带上下标的内敛数学公式,只需要在文档中键入:
$\hat f_i^k$
其中$$为内敛公式标识,只需要在中间填入LaTeX即可。(赶紧复制到文档里,体验一下)
插入行内公式
行内公式单独占一行,以下面的行内公式为例:
r i k = M L P ( p i ⊕ p i k ⊕ ( p i − p i k ) ⊕ ∥ p i − p i k ∥ ) r_i^k = MLP\left( { {p_i} \oplus p_i^k \oplus \left( { {p_i} - p_i^k} \right) \oplus \left\| { {p_i} - p_i^k} \right\|} \right) rik=MLP(pi⊕pik⊕(pi−pik)⊕∥∥pi−pik∥∥)
需要使用公式块(类似代码块):
$$
r_i^k = MLP\left( {
{p_i} \oplus p_i^k \oplus \left( {
{p_i} - p_i^k} \right) \oplus \left\| {
{p_i} - p_i^k} \right\|} \right)
$$
其中$$为公式块,中间填入LateX即可。(赶紧复制到文档里,体验一下)
如何快速地书写LaTeX公式
看到这里,对于如何插入公式,你或许已经明朗了。但是怎么快速的书写 LaTeX 呢?
三种方案(最后一种最傻瓜式!)
1 学习 LaTeX语法(程序员入)
其实把书写 LaTeX 理解为编写代码,完全没有问题,数学公式中任何符号,其都提供了相应的字符表达(语法)。
如何学习语法,网上应该可以搜到好多。。。
当你学会之后,可以 边写边看:
2 便捷的可视化书写
3 从MathType转换(学生党入!)
相信大家对MathType都很熟悉,打开 预置—剪切和复制预置,按照下面截图中进行设置。
然后我们正常的编写公式,完了之后,选中,Ctrl+C直接复制,在MD文档中直接Ctrl+V粘贴,既是LaTeX格式的公式了!
或许粘贴之后,你还要删除公式两端的\],对于MD文档来说\]是多余的。
边栏推荐
- Learn reptiles for a month and earn 6000 a month? Tell you the truth about the reptile, netizen: I wish I had known it earlier
- 【C】 Summary of wrong questions in winter vacation
- leetcode T31:下一排列
- Leetcode T29: 两数相除
- Principle and application of single chip microcomputer - off chip development
- 串口转WIFI模块通信
- 2022 Chinese cook (technician) simulation test and Chinese cook (technician) practice test video
- Koltin35, headline Android interview algorithm
- Mavros sends a custom topic message to Px4
- SPL Introduction (I)
猜你喜欢

When using charts to display data, the time field in the database is repeated. How to display the value at this time?

01 numpy introduction

NIO-零拷贝

MATLAB【函数求导】

Li Kou 1358 -- number of substrings containing all three characters (double pointer)

Using settoolkit to forge sites to steal user information

Use threejs simple Web3D effect

Learn reptiles for a month and earn 6000 a month? Tell you the truth about the reptile, netizen: I wish I had known it earlier

Field agricultural irrigation system

Mavros sends a custom topic message to Px4
随机推荐
Download jackson codehaus. org jar - downloading jackson. codehaus. org jar
《微机原理》——微处理器内部及外部结构
使用beef劫持用户浏览器
What is 1cr0.5mo (H) material? 1cr0.5mo (H) tensile yield strength
使用beef劫持用戶瀏覽器
leetcode T31:下一排列
shardingSphere
初学者如何正确理解google官方建议架构原则(疑问?)
Manually dig XSS vulnerabilities
《单片机原理与应用》——并行IO口原理
How to recruit Taobao anchor suitable for your own store
一套十万级TPS的IM综合消息系统的架构实践与思考
[untitled]
Codeworks round 803 (Div. 2) VP supplement
Leetcode t34: find the first and last positions of elements in a sorted array
Leetcode T39: 组合总和
Tita OKR: a dashboard to master the big picture
Yolov5 advanced 7 target tracking latest environment setup
Leetcode t40: combined sum II
2022 ordinary scaffolder (special type of construction work) examination question bank and the latest analysis of ordinary scaffolder (special type of construction work)