Skip to content

导出pdf时侧边栏没有自动生成的序号 #168

Answered by Keldos-Li
sf88ux asked this question in Q&A
Discussion options

You must be logged in to vote

试过了,解决不了,抱歉。

如果你一定要解决,可以在标题处手动编号,然后在导出时让Typora移除由样式自动添加的编号。方法是:
在设置中导出选项中,对PDF的导出选项,插入额外内容出添加如下代码:

<script>
const styleSheet = document.styleSheets[0];
styleSheet.insertRule('h1::before, h2::before, h3::before, h4::before, h5::before, h6::before { content: none !important; }', styleSheet.cssRules.length);
</script>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Keldos-Li
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #153 on November 22, 2024 14:36.