Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sf88ux opened this issue Sep 14, 2024 · 2 comments
Open

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

sf88ux opened this issue Sep 14, 2024 · 2 comments

Comments

@sf88ux
Copy link

sf88ux commented Sep 14, 2024

导出pdf后,正文包含自动生成的序号,但侧边栏没有自动生成的序号,能否解决一下,谢谢

@Keldos-Li
Copy link
Owner

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

如果你一定要解决,可以在标题处手动编号,然后在导出时让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>
image

@sf88ux
Copy link
Author

sf88ux commented Sep 14, 2024

Screenshot from 2024-09-14 14-50-13
问下,插入图片后,图片本身和标题(表2 全球****)中间的空白特别大,看上去不太好,能解决一下吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants