Typora 是什么
Typora 是一款支持实时预览的 Markdown 文本编辑器。它有 OS X、Windows、Linux 三个平台的版本,并且完全免费。
Typora设置
Typora默认无法在行内插入公式,只能单独一行,以及没有高亮。所以我们修改下设置,将这两个功能开启。
文件->偏好->Markdown, 勾选“内联公式”和“高亮”。然后重启Typora,我们就可以在Typora中使用这两个功能了。
1. 一些基本操作
1.1 标题
# 这是一级标题
## 这是二级标题
#### 这是四级标题
1.2 加粗
**你要加粗的内容**
1.3 斜体
*你要斜体的内容*
1.4 下划线
<u>你要下划线的内容</u>
1.5 删除线
~你要删除线的内容~
1.6 分割线
***或---
1.7 无序列表
- 第一条内容
- 第二条内容
效果如下:
- 第一条内容
- 第二条内容
1.8 有序列表
1. 第一条内容
2. 第二挑内容
效果如下:
- 第一条内容
- 第二条内容
1.9 任务列表
- [ ] 任务1
- [ ] 任务2
- [ ] 任务3
效果如下:
1.10 URL链接
<www.baidu.com>
效果如下:
1.11 图片
通过拖拉的方法,将本地文件夹中的图片或网络图片插入。
效果如下:(还可以插入动图哦!)
1.12 表格
|姓名|性别|年龄|
|:-:|:-:|:-:|
|小明|男|21|
|小红|女|18|
效果如下:
其中 :- 表示左对齐, -: 表示右对齐, :-:表示居中对齐。
1.13 注释
这个功能比较少用。我们可以对某一个词进行注释。
Trump is the [^president] of American.
[^president]: The president is a leader of an country.
1.14 目录列表
[toc]
效果如下:
1.15 表情
:happy:
:cry:
:1st_place_medal:
:2nd_place_medal:
:3rd_place_medal:
:girl:
:family_man_girl:
:family_man_girl_boy:
:family_man_man_girl_boy:
1.16 标题自动添加标号
文件->偏好设置->外观->打开主题文件夹,在打开的文件夹下新建文件名为“base.user.css”的文件,把下面内容复制到这个文件里。重启Typora。
/** initialize css counter */
#write {
counter-reset: h1
}
h1 {
counter-reset: h2
}
h2 {
counter-reset: h3
}
h3 {
counter-reset: h4
}
h4 {
counter-reset: h5
}
h5 {
counter-reset: h6
}
/** put counter result into headings */
#write h1:before {
counter-increment: h1;
content: counter(h1) " "
}#write h2:before {
counter-increment: h2;
content: counter(h1) "." counter(h2) " "
}
#write h3:before,
h3.md-focus.md-heading:before /** override the default style for focused headings */ {
counter-increment: h3;
content: counter(h1) "." counter(h2) "." counter(h3) " "
}
#write h4:before,
h4.md-focus.md-heading:before {
counter-increment: h4;
content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) " "
}
#write h5:before,
h5.md-focus.md-heading:before {
counter-increment: h5;
content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " "
}
#write h6:before,
h6.md-focus.md-heading:before {
counter-increment: h6;
content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " "
}
/** override the default style for focused headings */
#write>h3.md-focus:before,
#write>h4.md-focus:before,
#write>h5.md-focus:before,
#write>h6.md-focus:before,
h3.md-focus:before,
h4.md-focus:before,
h5.md-focus:before,
h6.md-focus:before {
color: inherit;
border: inherit;
border-radius: inherit;
position: inherit;
left:initial;
float: none;
top:initial;
font-size: inherit;
padding-left: inherit;
padding-right: inherit;
vertical-align: inherit;
font-weight: inherit;
line-height: inherit;
}
效果如下:
建议慎用!
2. 插入块
2.1 代码块
输入```,然后回车
2.2 行内插入代码
一行的左边`你要插入的代码`一行的右边
效果如下:
一行的左边你要插入的代码
一行的右边
2.3 引用块
>你要引用的内容
效果如下:
你要引用的内容
2.4 公式块
数学公式以$
开头和结尾,如果要独占一行的话,以$$
开头和结尾。
$$
Y=Ax+b
$$
效果如下:
Y=Ax+b
我在行左 $Y=Ax+b$ 我在行右
效果如下:
我在行左 Y=Ax+b 我在行右
3. 数学相关
3.1 常用符号
3.2 集合符号
3.3 希腊符号
空心字母与Fraktur字母与花体字