82

您所在的位置:网站首页 markdown输出html 82

82

#82| 来源: 网络整理| 查看: 265

前言

不知道你们的观点如何,个人觉得Rmd 默认模板下的风格过于朴素:

即便加上了一些设置:

其实也有非常多的内置Rmd 模板的:

比如这样的poster:

这里介绍一些拓展包里的主题。

1-prettydoc

参考:Themes (statr.me)[2]

这个包有以下主题:

颜值还是蛮高的:

安装后,就可以在模板里调用了。

--- title: "Your Document Title" author: "Document Author" date: "`r Sys.Date()`" output: prettydoc::html_pretty: theme: architect highlight: github --- 2-rmdformats

参考:HTML Output Formats and Templates for rmarkdown Documents • rmdformats (juba.github.io)[3]

这里直接选择模板:

奇怪的是,在该主题下运行,会出现报错:

pandoc: HttpExceptionContentWrapper {unHttpExceptionContentWrapper = InvalidProxyEnvironmentVariable "http_proxy"

对比一下这个包的几个主题的功能:

不过我发现这个包有个通病,就是如果用浏览器打开html 文件,并没有一个很好的排版适配:

其他模板

还有如cerulean,tufte 包等。

我的模板

我还是基础rmd 派的啦:https://mugpeng.notion.site/Rmd_template-a1bd26e71a6343eb86d0788621eb6a13

主要还是考虑到我对于目录组件,以及浏览器html一些排版适配的考虑。

参考资料

[1](10条消息) Rmarkdown第四弹—— 主题格式更换_庄闪闪的r语言手册的博客-CSDN博客_rmdformats包: https://blog.csdn.net/qq_37379316/article/details/115734718

[2]Themes (statr.me): https://prettydoc.statr.me/themes.html

[3]HTML Output Formats and Templates for rmarkdown Documents • rmdformats (juba.github.io): https://juba.github.io/rmdformats/



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3