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自动生成标题编号的更多相关文章

  1. 使用Python从Markdown文档中自动生成标题导航

    概述 知识与思路 代码实现 概述 Markdown 很适合于技术写作,因为技术写作并不需要花哨的排版和内容, 只要内容生动而严谨,文笔朴实而优美. 为了编写对读者更友好的文章,有必要生成文章的标题导航 ...

  2. 【SQL-自动生成编号】按规则自动生成单据编号 以及并发问题_使用触发器、函数 等

    描述:每种单据新建时,自动生成它的单据编号. 规则如:固定码+日期+流水号 (ABC1603180001) 方法一:触发器 触发器的缺点是,执行了sql之后才看到编码. 测试:流水号不能超过最大数,否 ...

  3. commonhelper 通用类:计时器、数组去重、自动生成日志编号、生成随机数、处理字符串

    using System;using System.Collections.Generic;using System.Diagnostics;using System.Text; namespace ...

  4. 重复打印相同内容(Doc档)的时候自动生成打印编号

    昨天突然接到一个好久未联系的朋友电话,说是江湖救急,要打印一份单据,单据上有个号码要自动生成,如下图,最土的办法是打印完一张,手工改下号码,但这种方法估计碰到成百上千张时估计会疯掉 网上找了实现方法, ...

  5. Microsoft Dynamics CRM4.0 创建单据的时候,自动生成单据编号的通用方法

    一.新建两个实体,具体如下: 单据流水号(new_maxbillcode) 显示名称 名称 类型 格式 最大长度 需求级别 IME模式 备注 名称 new_name nvarchar 文本 100 业 ...

  6. odoo10如何自定义自动生成单据编号

    1.在已有的model中穿件一个字段name class qingjiadan(models.Model): _name = 'qingjia.qingjiadan' name = fields.Ch ...

  7. Word2010 自动生成二级编号

    http://jingyan.baidu.com/article/3ea5148901919752e61bbafe.html

  8. 帝国cms实现自动生成缩略图和自动分页功能

    无论你手工发布,还是采集而来,免不了要进行手工操作弄缩略图,不然标题图片没有,挺烦人的 只需一次设定,就可以在文章编辑框里自动勾选上分页和生成缩略图,免除你次次进行操作的麻烦,好了,废话不多说,上菜“ ...

  9. Word章 节标题自动编号并由此自动生成目录 -- 含视频教程(1)

    1. 写论文之前事先调好 写论文的时候,难免要用到章节,如何实现下图的效果呢? 其实结合用好两个功能就行了: >> 视频教程链接:B站,速度快,清晰 事先调好,可以给后续工作带来很多便利, ...

随机推荐

  1. IE浏览器复选框遍历不兼容问题

    obj = document.getElementsByName("userIdCheckbox"); ids = []; for(var k=0;k<obj.length; ...

  2. 【NOI2002】银河英雄传说

    [NOI2002]银河英雄传说 这道题暴力模拟会TLE,因为它是并查集的一个应用…… #include<bits/stdc++.h> using namespace std; ],q[], ...

  3. 一次列表页伪静态的实现;结合nginx rewrite

    nginx伪静态: rewrite ^/(.*)-htm-(.*)$ /$1.php?$2; 将 list-html-t-3-p-4.html 转到list.php?t-3-p-4 t-3-p-4 用 ...

  4. python之路之课后作业

    以下代码只包含管理员代码,用户代码和管理员相似 #!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os sys.path. ...

  5. tianmao项目的学习笔记

    1.后台-分类管理/查询 实体相关的知识: 1.1@Entity和@Table的区别:https://www.cnblogs.com/softidea/p/6216722.html 1.2@JsonI ...

  6. 我竟然把today = new Date();写在了全局变量里面

    let today = new Date();应该在每次用之前重新生成新的对象,因为对于例如 today.getTime() 这种方法,取得是today对象的time,而非调用today对象取得实时时 ...

  7. 每天进步一点点------Allegro 蛇形走线

    对于高速数据总线,如果芯片内部没有延时调节功能,通常使用蛇形走线来调整延时以满足时序要求,也就是通常所说的等长线.蛇形走线的目的是调整延时,所以这一类网络都有延迟或相对延迟约束.所以在做蛇形走线调整时 ...

  8. MyBatis(5)——解决属性名与列名不一致的问题

    解决属性名与列名不一致的问题 问题描述: 当实体类的属性与数据库的列名不对应时取不到该列数据 说明:MyBatis会根据查询的列名设值(列名的setter方法),然后以此列名为做查询等操作,在此过程中 ...

  9. 旋转坐标+前缀和(zqu 25001)

    本题题意:在一个矩阵中,去随机一点,设定一个步数K,求出从这个点可以走到的范围的和,求最大值 思路:这个范围的和是一个菱形,我们把他旋转45°,然后成为一个正放的矩阵,求出二维前缀和 然后用前缀和的性 ...

  10. linux下修改mysql的编码格式

    修改编码格式:https://blog.csdn.net/qq_30038111/article/details/79376137         改编码格式在配置文件中修改才有效,在命令行中修改没效 ...