Typora 語法結構與功能
我看的文章地址http://blog.csdn.net/moonclearner/article/details/52842679數學表達式
要啓用這個功能,首先到Preference
->Editor
中啓用。然後使用$</code>符號包裹Tex命令,例如:<code>$lim_{x \to \infty} \ exp(-x)=0$
將產生如下的數學表達式:
limx→∞ exp(−x)=0
Typora支持Latex的公式編輯,公式編輯幾乎和代碼編輯的使用方法相同,同樣分行內公式和行間公式,行內公式用兩個$
包裹起來,行間公式可以使用快捷鍵command + alt + b
和$$ + enter
插入:
下標
下標使用~
包裹,例如:H~2~O
將產生水的分子式。
H 2 O
上標
x2
插入表情
使用:happy:
輸入高興的表情,使用:sad:
輸入悲傷的表情,使用:cry:
輸入哭的表情等。以此類推!
:happy:
:sad:
下劃線
用HTML的語法<u>underline</u>
將產生下劃線Underline.
underline
刪除線
GFM添加了刪除文本的語法,這是標準的Markdown語法木有的。使用包裹的文本將會具有刪除的樣式,例如刪除文本~~的樣式。~刪除文本~
將產生
代碼
輸入~~~
或者“`然後回車,可以輸入代碼塊,並且可以選擇代碼的語言。例如:
public Class HelloWorld{
System.out.println("Hello World!");
}
- 1
- 2
- 3
- 4
- 5
- 6
- 1
- 2
- 3
- 4
- 5
- 6
插入代碼的語法和其他markdown並沒有區別,同樣支持行內代碼和行間代碼塊,語法是相同的,只是在插入行間代碼時可以選擇快捷鍵command + alt + c
和輸入“`後按回車兩種方式,效果是一樣的:
右下角可以輸入代碼的語言,可以根據不同的語言自動高亮顯示。
強調
**使用兩個*號強調內容**
__使用兩個下劃線強調內容__
- 1
- 2
- 1
- 2
使用兩個*號強調內容
使用兩個下劃線強調內容
斜體
在標準的Markdown語法中,*和_包裹的內容會是斜體顯示,但是GFM下劃線一般用來分隔人名和代碼變量名,因此我們推薦是用星號來包裹斜體內容。如果要顯示星號,則使用轉義:
\*
- 1
- 1
插入圖片
這個功能和簡書的拖入圖片即可插入圖片功能是一樣的,但是這個功能默認是關閉的需要在設置中手動開啓,設置的路徑爲:
Preferences -> Editor
- 1
- 1
在Image Drag & Drop
後打上勾就可以了,如圖所示:
插入URL連接
使用尖括號包裹的url將產生一個連接,例如:<www.baidu.com>
將產生連接:www.baidu.com.
如果是標準的url,則會自動產生連接,例如:www.google.com
目錄列表Table of Contents(TOC)
輸入[toc]然後回車,將會產生一個目錄,這個目錄抽取了文章的所有標題,自動更新內容。
水平分割線
使用***
或者---
,然後回車,來產生水平分割線。
標註
我們可以對某一個詞語進行標註。例如
某些人用過了才知道[^註釋]
[^註釋]:Somebody that I used to know.
- 1
- 2
- 1
- 2
把鼠標放在註釋
上,將會有提示內容1。
表格
|姓名|性別|畢業學校|工資|
|:---|:---:|:---:|---:|
|楊洋|男|重慶交通大學|3200|
|峯哥|男|貴州大學|5000|
|坑貨|女|北京大學|2000|
- 1
- 2
- 3
- 4
- 5
- 1
- 2
- 3
- 4
- 5
其中代碼的第二行指定對齊的方式,第一個是左對齊,第二個和第三個是居中,最後一個是右對齊。
姓名 | 性別 | 畢業學校 | 工資 |
---|---|---|---|
楊洋 | 男 | 重慶交通大學 | 3200 |
峯哥 | 男 | 貴州大學 | 5000 |
坑貨 | 女 | 北京大學 | 2000 |
使用快捷鍵ctrl+T
可以快速插入表格,最上面可以選擇行列數、沒一列的對齊方式,並且支持在表格中使用tab
鍵跳到下一單元格。
數學表達式塊
輸入兩個美元符號,然後回車,就可以輸入數學表達式塊了。例如:
$$<span class="hljs-command">\mathbf</span><span class="hljs-special">{</span>V<span class="hljs-special">}</span>_1 <span class="hljs-command">\times</span> <span class="hljs-command">\mathbf</span><span class="hljs-special">{</span>V<span class="hljs-special">}</span>_2 = <span class="hljs-command">\begin</span><span class="hljs-special">{</span>vmatrix<span class="hljs-special">}</span> <span class="hljs-command">\mathbf</span><span class="hljs-special">{</span>i<span class="hljs-special">}</span> <span class="hljs-special">&</span> <span class="hljs-command">\mathbf</span><span class="hljs-special">{</span>j<span class="hljs-special">}</span> <span class="hljs-special">&</span> <span class="hljs-command">\mathbf</span><span class="hljs-special">{</span>k<span class="hljs-special">}</span> <span class="hljs-command">\\</span><span class="hljs-command">\frac</span><span class="hljs-special">{</span><span class="hljs-command">\partial</span> X<span class="hljs-special">}</span><span class="hljs-special">{</span><span class="hljs-command">\partial</span> u<span class="hljs-special">}</span> <span class="hljs-special">&</span> <span class="hljs-command">\frac</span><span class="hljs-special">{</span><span class="hljs-command">\partial</span> Y<span class="hljs-special">}</span><span class="hljs-special">{</span><span class="hljs-command">\partial</span> u<span class="hljs-special">}</span> <span class="hljs-special">&</span> 0 <span class="hljs-command">\\</span><span class="hljs-command">\frac</span><span class="hljs-special">{</span><span class="hljs-command">\partial</span> X<span class="hljs-special">}</span><span class="hljs-special">{</span><span class="hljs-command">\partial</span> v<span class="hljs-special">}</span> <span class="hljs-special">&</span> <span class="hljs-command">\frac</span><span class="hljs-special">{</span><span class="hljs-command">\partial</span> Y<span class="hljs-special">}</span><span class="hljs-special">{</span><span class="hljs-command">\partial</span> v<span class="hljs-special">}</span> <span class="hljs-special">&</span> 0 <span class="hljs-command">\\</span><span class="hljs-command">\end</span><span class="hljs-special">{</span>vmatrix<span class="hljs-special">}</span>$$
- 1
- 1
任務列表
- [ ] 吃飯
- [ ] 逛街
- [ ] 看電影
- 1
- 2
- 3
- 1
- 2
- 3
- [ ] 吃飯
- [ ] 逛街
- [ ] 看電影
列表
輸入+, -, *,創建無序的列表,使用任意數字開頭,創建有序列表,例如:
**無序的列表**
* tfboys
* 楊洋
* 我愛你
- 1
- 2
- 3
- 4
- 1
- 2
- 3
- 4
塊引用
使用>來插入塊引用。例如:
這是一個塊引用!
標題
使用#表示一級標題,##表示二級標題,以此類推,有6個標題。
- Somebody that I used to know. ↩