Typora自动编号设置
找到C:\Users\用户名\AppData\Roaming\Typora\themes\路径下的base.user.css,用文本编辑器打开(若不存在,则自己创建一个),将一下内容复制进去,然后重启Typora即可。
以下是我的Typora自动编号配置:
/* 正文标题区: #write */
/* [TOC]目录树区: .md-toc-content */
/* 侧边栏的目录大纲区: .sidebar-content */ /** initialize css counter */
#write, .sidebar-content,.md-toc-content{
counter-reset: h2
} #write h1, .outline-h1, .md-toc-item.md-toc-h1 {
counter-reset: h2
} #write h2, .outline-h2, .md-toc-item.md-toc-h2 {
counter-reset: h3
} #write h3, .outline-h3, .md-toc-item.md-toc-h3 {
counter-reset: h4
} #write h4, .outline-h4, .md-toc-item.md-toc-h4 {
counter-reset: h5
} #write h5, .outline-h5, .md-toc-item.md-toc-h5 {
counter-reset: h6
} /** put counter result into headings */
/* 一级标题不展示 */
#write h1:before,
.outline-h1>.outline-item>.outline-label:before,
.md-toc-item.md-toc-h1>.md-toc-inner:before {
/* counter-increment: h1;
content: counter(h1) ". " */
} /* 二级标题 */
#write h2:before,
.outline-h2>.outline-item>.outline-label:before,
.md-toc-item.md-toc-h2>.md-toc-inner:before {
counter-increment: h2;
content: counter(h2) ". ";
/* content: counter(h2) ". " */
} /* 三级标题 */
#write h3:before,
h3.md-focus.md-heading:before, /** override the default style for focused headings */
.outline-h3>.outline-item>.outline-label:before,
.md-toc-item.md-toc-h3>.md-toc-inner:before {
text-decoration: none;
counter-increment: h3;
/* content: counter(h1) "." counter(h2) "." counter(h3) ". " */
/* content: counter(h2) "." counter(h3) ". " */
content: counter(h2) "." counter(h3) " "
} /* 四级标题 */
#write h4:before,
h4.md-focus.md-heading:before,
.outline-h4>.outline-item>.outline-label:before,
.md-toc-item.md-toc-h4>.md-toc-inner:before {
text-decoration: none;
counter-increment: h4;
/* content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) ". " */
/* content: counter(h2) "." counter(h3) "." counter(h4) ". " */
content: counter(h2) "." counter(h3) "." counter(h4) " "
} /* 五级标题 */
#write h5:before,
h5.md-focus.md-heading:before,
.outline-h5>.outline-item>.outline-label:before,
.md-toc-item.md-toc-h5>.md-toc-inner:before {
text-decoration: none;
counter-increment: h5;
/* content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". " */
/* content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". " */
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " "
} /* 六级标题 */
#write h6:before,
h6.md-focus.md-heading:before,
.outline-h6>.outline-item>.outline-label:before,
.md-toc-item.md-toc-h6>.md-toc-inner:before {
text-decoration: none;
counter-increment: h6;
/* content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". " */
/* content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". " */
content: 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;
} /* 设置行距 */ /* 设置一级标题行距 */
#write h1 {
margin-bottom:50px;
margin-top:50px;
} #write h2 {
margin-bottom:30px;
margin-top:50px;
} #write h3 {
margin-bottom:30px;
margin-top:30px;
} #write h4 {
margin-bottom:30px;
margin-top:30px;
} #write h5 {
margin-bottom:30px;
margin-top:30px;
}
效果如下,

使用起来非常方便,再也不用自己手动来维护这个标号了。
Typora自动编号设置的更多相关文章
- Word 2010 制作文档结构之图标自动编号设置
注意: 使用图片自动编号时,如果文档标题使用的样式是通过“将所选内容保存为新快速样式”所生成的样式,则图片自动编号不会生效 因此设置标题样式时,不要 新建样式,直接使用word预设的“标题 1”样式和 ...
- word2010 标题自动编号设置
今天打算写篇文档,发现生成标题时无法自动生成编号,上网查了一下,现在把解决办法跟附图一块儿奉上. 新建word文档: 默认版式: 设置自动编号所在工具栏位置: 设置选择: 最终结果:
- Word2013对公式处理:样式、自动编号、交叉引用
因快写毕业论文,专门研究了一下Word2013对公式的处理,有一点小心得,记在这里. 文章中公式展示的预期效果是:公式居中,尾端有编号,同时在文章中可以实现引用.实现该效果有很多方法,这里就说一种,其 ...
- 轻松搞定word中让人抓狂的自动编号
在word中使用自动编号时,如果一级编号是2,想让其后面的二级编号自动编号为2.1.2.2--,三级编号自动编号为2.1.1.2.1.2--:且在该一级编号调整为3时,后面的二级编号和三级编号的第一位 ...
- Typora标题自动编号+设定快捷键技巧
Typora标题自动编号 提示:要了解将这些CSS片段放在哪里,请参阅添加自定义CSS. 打开Typora偏好设置,打开主题文件夹,在主题文件夹中创建base.user.css文件,放置以下内容,则T ...
- Access自动编号的初始值设置及重置编号
项目上需要在Access数据库,发现自动编号的列无法设置初始值和步长,但是可以使用SQL语句来设置它. 方法如下: ALTER TABLE tableName ALTER COLUMN ID COUN ...
- 关于设置oracle中系统编号SYSID自动编号的问题;
http://liye9801.blog.163.com/blog/static/601970320086210039591/ 如何在oracle里设置自动编号列 2008-07-21 12:00:3 ...
- SQL2005中设置自动编号字段【转】
如果希望重新定义在表中添加新记录时该列中自动生成并存储于列中的序列号,则可以更改该列的标识属性.在每个表中只能设置一个列的标识属性. 具有标识属性的列包含系统生成的连续值,该值唯一地标识表中的每一行( ...
- Access自动编号的初始值设置及重置编号 转
方法如下: ALTER TABLE tableName ALTER COLUMN Id COUNTER (100, 5) 其中:tableName为要修改的表名,Id为自动编号列,100为初始值,5为 ...
随机推荐
- tomcat梳理
tomcat梳理 Tomcat的缺省端口是多少,怎么修改? 默认接口是8080 修改 1)找到Tomcat目录下的conf文件夹 2)进入conf文件夹里面找到server.xml文件 3)打开ser ...
- 20190710双人开黑CF模拟赛
Codeforces Round #571 (Div. 2) 日常被tanao_大佬带飞,我AC了A和C(B题没了...否则tanao_大佬肯定把我吊打) A. Vus the Cossack and ...
- PE可执行文件加载器
PE文件加载器 模仿操作系统,加载pe文件到内存中 该项目主要是为了检测pe的学习程度,是否都完全理解了.当然没有完全理解 实现功能的如下: 模仿操作系统,加载pe文件到内存中,然后执行待执行的pe文 ...
- NetModular 新年第一更以及升级指南(打造简单易用的.Net Core模块化快速开发框架~)
先给大家拜个晚年,祝大家身体健康,远离肺炎~ NetModular开源已有一年,在这一年收到了很多建议,框架也变得越来越完善.这次更新包括了从去年年尾到现在所做的更改,感觉更改的内容还是蛮多的,所以记 ...
- css: line-height 与box-sizing
css 1.line-hight: 行高line-height,是文本行基线这件的距离,不是字体大小,它确定了各个元素框的高度增加或减少多少. 对于块级元素:定义了元素中文本基线之间的最小距离. li ...
- webdriver高级应用 -更改一个对象界面的属性值
#-*- coding=utf-8 -*- #更改一个对象界面的属性值 from selenium import webdriver import unittest def addAttribute( ...
- Actix-web Rust连接Postgres数据库
Actix-web Rust连接Postgres数据库 Rust1.39支持了异步async,await,Actix-web在2.0.0-alpha支持了原生异步写法,所以本文中使用的Actix- ...
- HDU 1005 Number Sequence(矩阵快速幂,快速幂模板)
Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1 ...
- AppBox实战: 如何实现一对多表单的增删改查
本篇通过完整示例介绍如何实现一对多关系表单的相应服务及视图. 一.准备数据结构 示例所采用的数据结构为"物资需求"一对多"物资清单",通过IDE的实体设 ...
- Golang定时任务简单实现
下载cron包: go get github.com/robfig/cron 开启一个定时: 根据cron表达式进行时间调度,cron可以精确到秒,大部分表达式格式也是从秒开始. c := cron. ...