[英]How to break a long R markdown document
I often find that in using RStudio R markdown, the resulting HTML can get quite long and heavy. 我经常发现在使用RStudio R markdown时,生成的HTML会变得非常冗长。 What strategies can someone use to break down or otherwise manage long documents? 有人可以使用什么策略来分解或管理长文档?
Create a table of contents (TOC) to move quickly to the different sections of your document. 创建目录(TOC)以快速移动到文档的不同部分。 You do it by requesting a toc in the doc header, something like this: 您可以通过在doc标头中请求toc来实现,如下所示:
---
title: "MyDoc"
output:
html_document:
toc: yes
---
Instead of being stuck at the top of a long document you can also produce a “floating toc" by adding a custom css-file. Have a look at this example . 您可以通过添加自定义css文件来生成“浮动toc”,而不是卡在长文档的顶部。看看这个示例 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.