简体   繁体   English

生成PDF时,有什么方法可以控制R Markdown中的样式选项?

[英]Is there any way to control styling options in R Markdown when generating PDF?

I am using R Markdown in RStudio to generate some documentation. 我在RStudio中使用R Markdown生成一些文档。

My output looks good when I try the option of "Knit HTML". 尝试使用“编织HTML”选项时,我的输出看起来不错。 I am able to control styling options and apply CSS Files explicitly. 我能够控制样式选项并显式应用CSS文件。

However when I try to "Knit PDF" (I had to install pdf-tex before being able to do that) I can't change the default styling method. 但是,当我尝试“编织PDF”时(必须先安装pdf-tex才能这样做),我无法更改默认的样式设置方法。 Also, the tables go out of margins. 此外,表超出了边距。 Is there any method to provide or use CSS Files or themes before creating PDF in RStudio using RMarkdown? 在使用RMarkdown在RStudio中创建PDF之前,是否有任何方法可以提供或使用CSS文件或主题?

Unfortunately, according to the R Markdown Reference Guide , there is no in-built solution to style a document with CSS or theme when knitting a PDF. 不幸的是,根据《 R Markdown 参考指南》 ,在编织PDF时,没有内置的解决方案可以用CSS主题设置文档样式

See screenshot below: 请参见下面的屏幕截图:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 生成R减价报告时,如何以任何格式(PDF,HTML,WORD)通过电子邮件发送? - How to email an R markdown report in any format (PDF, HTML, WORD) when it is generated? 有没有办法从 PDF 文件生成准确的 HTML 页面? - Is there any way of generating exact HTML page from a PDF file? 使用jsPDF生成保留HTML页面样式的pdf - Generating a pdf that preserves styling of the HTML page with jsPDF CSS 是覆盖样式,有什么方法可以删除样式? - CSS is overriding styles, any way to remove styling? 按钮样式在 JS 中不起作用 - Button Styling is not working in any way in JS 打开PDF /任何文件时如何删除window.open中的选项选项卡 - How to remove options tab in window.open when we open PDF / any file “编织”到html时使用R Markdown生成图 - Producing plots with R Markdown when “knitting” to html 使用dompdf生成PDF时文本溢出表 - Text overflowing tables when generating PDF with dompdf 有什么方法可以将 markdown 转换为 asciidoc(或能够生成相同的 HTML 输出)? - Is there any way to convert markdown to asciidoc (or be able to produce the same HTML output)? 寻找一种简单的方法将 profvis output 包含在 R 的 Markdown 文件中 - Looking for a simple way to include profvis output in a Markdown file in R
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM