Typora自动生成标题编号
1、要实现的效果
按照markdown语法输入 # 一级标题后,自动生成前面的编号
2、配置方法
2.1、进入目录
2.2、创建文件
2.3、编辑文件 base.user.css
/** initialize css counter */
#write, .sidebar-content,.md-toc-content {
counter-reset: h1
} #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,
h1.md-focus.md-heading: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,
h2.md-focus.md-heading:before,
.outline-h2>.outline-item>.outline-label:before,
.md-toc-item.md-toc-h2>.md-toc-inner:before{
counter-increment: h2;
content: counter(h1) "." counter(h2) " "
} #write h3:before,
h3.md-focus.md-heading:before,
.outline-h3>.outline-item>.outline-label:before,
.md-toc-item.md-toc-h3>.md-toc-inner:before {
counter-increment: h3;
content: counter(h1) "." 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 {
counter-increment: h4;
content: counter(h1) "." 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 {
counter-increment: h5;
content: counter(h1) "." 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 {
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.4、重新启动Typora
Typora自动生成标题编号的更多相关文章
- 使用Python从Markdown文档中自动生成标题导航
概述 知识与思路 代码实现 概述 Markdown 很适合于技术写作,因为技术写作并不需要花哨的排版和内容, 只要内容生动而严谨,文笔朴实而优美. 为了编写对读者更友好的文章,有必要生成文章的标题导航 ...
- 【SQL-自动生成编号】按规则自动生成单据编号 以及并发问题_使用触发器、函数 等
描述:每种单据新建时,自动生成它的单据编号. 规则如:固定码+日期+流水号 (ABC1603180001) 方法一:触发器 触发器的缺点是,执行了sql之后才看到编码. 测试:流水号不能超过最大数,否 ...
- commonhelper 通用类:计时器、数组去重、自动生成日志编号、生成随机数、处理字符串
using System;using System.Collections.Generic;using System.Diagnostics;using System.Text; namespace ...
- 重复打印相同内容(Doc档)的时候自动生成打印编号
昨天突然接到一个好久未联系的朋友电话,说是江湖救急,要打印一份单据,单据上有个号码要自动生成,如下图,最土的办法是打印完一张,手工改下号码,但这种方法估计碰到成百上千张时估计会疯掉 网上找了实现方法, ...
- Microsoft Dynamics CRM4.0 创建单据的时候,自动生成单据编号的通用方法
一.新建两个实体,具体如下: 单据流水号(new_maxbillcode) 显示名称 名称 类型 格式 最大长度 需求级别 IME模式 备注 名称 new_name nvarchar 文本 100 业 ...
- odoo10如何自定义自动生成单据编号
1.在已有的model中穿件一个字段name class qingjiadan(models.Model): _name = 'qingjia.qingjiadan' name = fields.Ch ...
- Word2010 自动生成二级编号
http://jingyan.baidu.com/article/3ea5148901919752e61bbafe.html
- 帝国cms实现自动生成缩略图和自动分页功能
无论你手工发布,还是采集而来,免不了要进行手工操作弄缩略图,不然标题图片没有,挺烦人的 只需一次设定,就可以在文章编辑框里自动勾选上分页和生成缩略图,免除你次次进行操作的麻烦,好了,废话不多说,上菜“ ...
- Word章 节标题自动编号并由此自动生成目录 -- 含视频教程(1)
1. 写论文之前事先调好 写论文的时候,难免要用到章节,如何实现下图的效果呢? 其实结合用好两个功能就行了: >> 视频教程链接:B站,速度快,清晰 事先调好,可以给后续工作带来很多便利, ...
随机推荐
- linux - mysql:注意事项
1.mysql和orcal数据中的数据类型不一致,比如:mysql中没有类型varchar2.number 2.mysql环境中的命令后面都带一个分号作为命令结束符 - “:”
- C#画图超出屏幕的部分无法显示的解决方法
C#画图超出屏幕的部分无法显示,通过AutoScrollMinSize属性及相关方法解决问题. 可以实现 到 的转变. 代码如下: using System.Drawing; using System ...
- pyodbc 一些内容
如果表格里是空的,读出来是会变为None,所以用是否等于None来判断内容是否为空.
- 第四篇,JavaScript面试题汇总
JavaScript是一种属于网络的脚本语言,已经被广泛用于web实用开发,常用来为网页添加各种各样的动态功能,为用户提供更流畅美观的浏览效果.通常JavaScript脚本是通过嵌入在HTML中来实现 ...
- 随缘记录 LeetCode第168场周赛 2019-12-22
5292. 划分数组为连续数字的集合 给你一个整数数组 nums 和一个正整数 k,请你判断是否可以把这个数组划分成一些由 k 个连续数字组成的集合. 如果可以,请返回 True:否则,返回 Fals ...
- quartus在线调试的方法
quartus在线调试的方法 在Quartus II Version 7.2 Handbook Volume 3: Verification中的Section V. In-System Design ...
- 家庭记账小账本Android studio
经过长达7天多的时间,从Android studio的安装碰到很多的问题,真的很不走运,别人安装Android studio都是一气呵成,我的Android真的没话说 把自己的这些天的开发成果展示一下 ...
- dfs题型二(迷宫问题)
取自:<王道论坛计算机考研机试指南>6.5节 例 6.7 Temple of the bone(九度 OJ 1461)时间限制:1 秒 内存限制:32 兆 特殊判题:否题目描述:The d ...
- centos7 源码编译安装nginx教程 nginx安装脚本 lua-nginx-module
安装nginx需要pcre zlib openssl的库,下文都是在官网直接下载用作编译安装 该nginx安装教程,有安装maxmind IP 库 该nginx安装教程有安装lua-nginx-mod ...
- 不间断会话服务:screen
1.screen命令: screen 是一款能够实现多窗口远程控制的开源服务程序,简单来说就是为了解决网络异 常中断或为了同时控制多个远程终端窗口而设计的程序.用户还可以使用 screen 服务程序同 ...