typora: simple, yet powerful

Typora: simple, yet powerful

Introduction

A TRULY MINIMAL MARKDOWN EDITOR. AND A NEW WAY TO READ & WRITE MARKDOWN.

  • Distractions Free
  • Seamless Live Preview
  • What You See Is What You Mean

Images

插入图片的方式有多种。最简单的是直接拖拽或者复制粘贴。

当然也支持用 markdown 语法插入图片:![beauty](E:\img\hero-beauty-2.jpg)

甚至我们还可以用 html 代码改变图片的样式,比如指定图片的宽高,缩放等。比如:

<img src="E:\img\hero-beauty-2.jpg" style="zoom:30%"/>

Headers

目录:[toc]
一级标题:ctrl+1, #
二级标题:ctrl+2, ##
...
六级标题:ctrl+6, ######

Lists

Ordered List

  1. ctrl + shift + [
  2. 序号 + . + 空格

Unordered List

  • ctrl + shift + ]
  • *、+、-

Task List

Tables

插入表格有多种方式:ctrl + t,右键-->插入-->表格,或者使用 markdown 语法 | 学号 | 姓名 | 年龄 |

学号 姓名 年龄
9527 张三 26
9528 李四 27
9529 王五 28

Code Fences

我们使用``` 或者 ~~~ 插入代码块,通过选择语言对关键字进行高亮显示。

public class BinarySearch {
	public int rank(int key, int[] arr) {
        int low = 0;
        int high = arr.length - 1;
        while(low <= high) {
            int mid = low + ((high - low) >> 1);
            if(arr[mid] < key) low = mid + 1;
            else if(arr[mid] > key) hi = mid - 1;
            else return mid;
        }
        return -1;
    }
}

Mathematics

Typora 支持 LaTeX 语法,提供了行内公式 $公式$ 和块间公式 $$公式$$ 两个格式。

我们可以写出漂亮的数学公式 $cos(\theta+\varphi)=cos(\theta)cos(\varphi)-sin(\theta)sin(\varphi)$,化学反应方程式 $SO_4{2-}+Ba \longrightarrow BaSO_4\downarrow$ 等,我们还可以利用块间公式写出漂亮的矩阵公式。
$$
\mathbf{V_1}\times\mathbf{V_2}=\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \
\frac{\partial{X}}{\partial{u}} & \frac{\partial{Y}}{\partial{u}} & 0 \
\frac{\partial{X}}{\partial{v}} & \frac{\partial{Y}}{\partial{v}} & 0 \
\end{vmatrix}
$$

Diagrams

Flowchart

在代码块中输入下面的代码,语言选择 flow,即可生成 Flowchart 图表。

st=>start: 开始
cond=>condition: 关系表达式
op1=>operation: 语句体1
op2=>operation: 语句体2
e=>end: 结束

st->cond
cond(yes)->op1->e
cond(no)->op2->e
st=>start: 开始
cond=>condition: 关系表达式
op1=>operation: 语句体1
op2=>operation: 语句体2
e=>end: 结束

st->cond
cond(yes)->op1->e
cond(no)->op2->e

Sequence

在代码块中输入下面的代码,语言选择 sequence,即可生成 Sequence 图表。

Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!

Mermaid

官网 中,mermaid是这样介绍自己的:

A simple markdown-like script language for generating charts from text via javascript.

mermaid 支持多种图表,其中包括甘特图 (gantt)。在代码块中输入下面的代码,语言选择 mermaid,即可生成 甘特图。

gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram to mermaid
section A section
Completed task	:		done,	des1, 2014-01-06, 2014-01-08
Active task		:crit, active, 	des2, 2014-01-09, 3d
Future task1	:crit, 			des3, after des2, 5d
Future task2	:				des4, after des3, 5d
gantt dateFormat YYYY-MM-DD title Adding GANTT diagram to mermaid section A section Completed task : done, des1, 2014-01-06, 2014-01-08 Active task :crit, active, des2, 2014-01-09, 3d Future task1 :crit, des3, after des2, 5d Future task2 : des4, after des3, 5d

Inline Styles

Support inline styles from common Markdown engines, such as **Strong**, *Emphasis*, `code`, :heart: emoji, ~~Strikethrough~~, <u>underline<\u>, <!--comment-->, etc.

Support inline styles from common Markdown engines, such as Strong, Emphasis, code, ❤️ emoji, Strikethrough, underline, , etc.

And hyperlinks of course, link to a internal location [Jump to Headers](# Headers), link to local file [LaTeX.md](LaTeX.md), reference link to a [website](https://typora.io/), etc.

And hyperlinks of course, link to a internal location [Jump to Headers](# Headers) , link to local file LaTeX.md, reference link to a website, etc.

Some uncommon markdown syntax can be supported if you enable it in preference panel, such as ==highlight==, subscript H~2~O, superscript X^2^ and inline math.

Some uncommon markdown syntax can be supported if you enable it in preference panel, such as highlight, subscript H2O, superscript X2 and inline math.

etc..

Blockquote

我们使用 > 来添加块引用。

Read the fucking source code.

Horizontal line

我们使用 --- 或者*** 添加水平线。


Footnote

我们使用 [^ 1] 添加脚注。

Contrary to popular belief, Lorem Ipsum[^ 1], is not simple random text.
[^ 1]: There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..

Contrary to popular belief, Lorem Ipsum[^ 1], is not simple random text.

[^ 1]: There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..

posted @ 2019-08-06 14:31  Thomas_hzp  阅读(211)  评论(0)    收藏  举报