Typora如何自动生成标题序号
--打开主题文件夹:
设置 -> 偏好设置 -> 打开主题文件夹
-新建base.user.css
并拷贝下面内容到文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | #write { counter-reset : h 1 } h 1 { counter-reset : h 2 } h 2 { counter-reset : h 3 } h 3 { counter-reset : h 4 } h 4 { counter-reset : h 5 } h 5 { counter-reset : h 6 } #write h 1: before { counter-increment : h 1 ; content : counter (h 1 ) ". " } #write h 2: before { counter-increment : h 2 ; content : counter (h 1 ) "." counter (h 2 ) ". " } #write h 3: before, h 3 .md-focus.md-heading:before { counter-increment : h 3 ; content : counter (h 1 ) "." counter (h 2 ) "." counter (h 3 ) ". " } #write h 4: before, h 4 .md-focus.md-heading:before { counter-increment : h 4 ; content : counter (h 1 ) "." counter (h 2 ) "." counter (h 3 ) "." counter (h 4 ) ". " } #write h 5: before, h 5 .md-focus.md-heading:before { counter-increment : h 5 ; content : counter (h 1 ) "." counter (h 2 ) "." counter (h 3 ) "." counter (h 4 ) "." counter (h 5 ) ". " } #write h 6: before, h 6 .md-focus.md-heading:before { counter-increment : h 6 ; content : counter (h 1 ) "." counter (h 2 ) "." counter (h 3 ) "." counter (h 4 ) "." counter (h 5 ) "." counter (h 6 ) "." } #write > h 3 .md-focus:before, #write > h 4 .md-focus:before, #write > h 5 .md-focus:before, #write > h 6 .md-focus:before, h 3 .md-focus:before, h 4 .md-focus:before, h 5 .md-focus:before, h 6 .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; } |
重启Typora
注意,目录功能没有同步标题名称。
为了与已有主题区分,也可以:
新建立主题:copy 已有主题和css,并加入上面的css。
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决