在 RMarkdown 中更改 PDF 文档的边距
pagedown
包中的默认简历模板在视觉上不太吸引人。边框有相当多的空白,侧边栏太粗,字体也不合适。我想我应该熟悉 CSS 来进行更改以操纵更改。这是我到目前为止所尝试过的:
# Manipulating the margins
p * {
/* Override default margins*/
--pagedjs-margin-right: 0.2in;
--pagedjs-margin-left: 0.2in;
--pagedjs-margin-top: 0.2in;
--pagedjs-margin-bottom: 0.2in;
}
# Manipulating the sidebar
:root{
--sidebar-width: 10rem; /* side bar width */
--sidebar-background-color: #e2a2a2;
--decorator-border: 2px solid #a2e2e2; /* change color and thickness of timeline */
}
# Manipulate the font
/* Define the font family here */
body{
font-family: "Roboto", sans-serif;
我在定义 YAML 后插入了这个代码块。当我尝试第二个和第三个选项并编织文件时,它们按预期工作。但是,无论我使用什么数字来更改边距,它都保持不变。我应该怎么办?
The default resume template from the pagedown
package is visually not very appealing. There are quite white spaces along the borders, the sidebar is too thick, and the font is not appropriate. I guess I should be knowledgeable in CSS to make changes to manipulate the changes. This is what I have tried so far:
# Manipulating the margins
p * {
/* Override default margins*/
--pagedjs-margin-right: 0.2in;
--pagedjs-margin-left: 0.2in;
--pagedjs-margin-top: 0.2in;
--pagedjs-margin-bottom: 0.2in;
}
# Manipulating the sidebar
:root{
--sidebar-width: 10rem; /* side bar width */
--sidebar-background-color: #e2a2a2;
--decorator-border: 2px solid #a2e2e2; /* change color and thickness of timeline */
}
# Manipulate the font
/* Define the font family here */
body{
font-family: "Roboto", sans-serif;
I have inserted this code chunk after defining YAML. When I play around with the second and third options and knit the file, they work as intended. However, no matter what number I use to change the margins, it remains the same. What should I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论