Keldos-Li / typora-latex-theme

将Typora伪装成LaTeX的中文样式主题,本科生轻量级课程论文撰写的好帮手。This is a theme disguising Typora into Chinese LaTeX style.
GNU General Public License v3.0
4.89k stars 314 forks source link

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

Closed sf88ux closed 4 days ago

sf88ux commented 2 months ago

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

Keldos-Li commented 2 months ago

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

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

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