当在VS代码上以PDF为PDF时,如何更改字体大小? (Markdown PDF -yzane)
我已经使用了将近2个月的Markdown PDF扩展名,并且是它的忠实拥护者,但我觉得默认字体大小有点大,我想编辑它。我之前没有使用任何扩展程序的默认设置,所以不知道该怎么办。
I have been using the Markdown PDF extension for almost 2 months now and been a big fan of it but I feel like the default font size is a bit big and I would like to edit that. I haven't played around with the default settings of any extension before so have no idea what to do.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
您可以添加CSS文件以更改生成器的样式。
首先,创建一个CSS文件,
您需要创建CSS文件。例如,在项目的根源上: markdown.css 。
我使用的内容:
然后,在文件 .vscode/settings.json 中更新vscode项目的设置
,添加行:
如果 settings.json 的文件丢失了,您需要创建它并且不要忘记卷曲括号:
进一步
markdown-pdf.styles 是插件解释的选项(现有选项的列表)。您可以使用选项 markdown-pdf.includedeDefaultStyles 设置为 false 。
而且,如果您想将CSS文件调整为您的需求,请使用命令将其作为HTML文件生成:“ markdown PDF:export(html)”。然后,您可以检查HTML标签。
You can add css files to change the style for the generator.
First, create a css file
You need to create the css file. For example, at the root of the project: markdown.css.
The content I use:
Then, update the vscode project's settings
In the file .vscode/settings.json, add the lines:
If the settings.json's file is missing, you need to create it and do not forget the curly brackets :
To go further
markdown-pdf.styles is an option interpreted by the plugin (the list of the existing options). You can remove the default style with the option markdown-pdf.includeDefaultStyles set to false.
And if you want to adapt the css file to your needs, generate the markdown as an html file with the command: "Markdown PDF: Export (html)". And then, you can check the HTML tags.