经常会看到许多以“down”结尾的单词,其中最重要的当属markdown,但作为R语言的学习者,开发了各种各样的down,我大致梭罗了一些,做一介绍,
1 markdown
一款轻量级语句工具,基础中的基础,码字之王。
Markdown 是一种轻量级的标记语言,可用于在纯文本文档中添加格式化元素。Markdown 由 John Gruber 于 2004 年创建,如今已成为世界上最受欢迎的标记语言之一。
- 专注于文字内容;
- 纯文本,易读易写,可以方便地纳入版本控制;
- 语法简单,没有什么学习成本,能轻松在码字的同时做出美观大方的排版。
2 R Markdown
Rstudio中高度集成的工具,可以使用markdown语句,几乎是后续所有down都离不开它,源自谢益辉,其中集成的Knit可以渲染各种效果。
The rmarkdown package (Allaire, Xie, McPherson, et al. 2021) was first created in early 2014. During the past four years, it has steadily evolved into a relatively complete ecosystem for authoring documents, so it is a good time for us to provide a definitive guide to this ecosystem now. At this point, there are a large number of tasks that you could do with R Markdown:
Compile a single R Markdown document to a report in different formats, such as PDF, HTML, or Word.
Create notebooks in which you can directly run code chunks interactively.
Make slides for presentations (HTML5, LaTeX Beamer, or PowerPoint).
Produce dashboards with flexible, interactive, and attractive layouts.
Build interactive applications based on Shiny.
Write journal articles.
Author books of multiple chapters.
Generate websites and blogs.
https://bookdown.org/yihui/rmarkdown/
3 bookdown
同样是谢大神的杰作,基于Rmarkdown的电子书生成工具,可以生成gitbook、pdf、word和epub格式的电子书,也是后续各种down的基础
The bookdown package is an open-source R package that facilitates writing books and long-form articles/reports with R Markdown. Features include:
Generate printer-ready books and ebooks from R Markdown documents.
A markup language easier to learn than LaTeX, and to write elements such as section headers, lists, quotes, figures, tables, and citations.
Multiple choices of output formats: PDF, LaTeX, HTML, EPUB, and Word.
Possibility of including dynamic graphics and interactive applications (HTML widgets and Shiny apps).
Support a wide range of languages: R, C/C++, Python, Fortran, Julia, Shell scripts, and SQL, etc.
LaTeX equations, theorems, and proofs work for all output formats.
Can be published to GitHub, bookdown.org, and any web servers.
Integrated with the RStudio IDE.
One-click publishing to https://bookdown.org.
4 blogdown
还是谢大神的巨作,使用Rmarkdown创建网站,使用的是hugo主题,包括我的个人博客站也是基于此。
The goal of the blogdown package is to provide a powerful and customizable website output format for R Markdown. Use dynamic R Markdown documents to build webpages featuring:
R code (or other programming languages that knitr supports),
automatically rendered output such as graphics, tables, analysis results, and HTML widgets, and
technical writing elements such as citations, footnotes, and LaTeX math, enabled by the bookdown package.
By default, blogdown uses Hugo, a popular open-source static website generator, which provides a fast and flexible way to build your site content to be shared online. Other website generators like Jekyll and Hexo are also supported.
A useful feature of blogdown sites, compared to other R Markdown-based websites, is that you may organize your website content (including R Markdown files) within subdirectories. This makes blogdown a good solution not just for blogging or sites about R — it can also be used to create general-purpose websites to communicate about data science, statistics, data visualization, programming, or education.
https://bookdown.org/yihui/blogdown/
5 pagedown
使用R标记和CSS创建漂亮的PDF,再安装rticles这个包以后可以集成多种模版,包括个人简历、期刊杂志、论文等等,也是后续期刊杂志的基础。
The traditional way to beautiful PDFs is often through LaTeX or Word, but have you ever thought of printing a web page to PDF? Web technologies (HTML/CSS/JavaScript) are becoming more and more amazing. It is entirely possible to create high-quality PDFs through Google Chrome or Chromium now. Web pages are usually single-page documents, but they can be paginated thanks to the JavaScript library Paged.js, so that you can have elements like headers, footers, and page margins for the printing purpose. In this talk, we introduce a new R package, pagedown (https://github.com/rstudio/pagedown), to create PDF documents based on R Markdown and Paged.js. Applications of pagedown includes, but not limited to, books, articles, posters, resumes, letters, and business cards. With the power of CSS and JavaScript, you can typeset your documents with amazing elegance (e.g., a single line of CSS, “tr:nth-child(even) { background: #eee; }”, will give you a striped table, and “border-radius: 50%;” gives you a circular element) and power (e.g., HTML Widgets).
https://github.com/rstudio/pagedown
6 pkgdown
一看为R包快速轻松地构建网站的包,建立网站介绍你的包
pkgdown is designed to make it quick and easy to build a website for your package. You can see pkgdown in action at https://pkgdown.r-lib.org: this is the output of pkgdown applied to the latest version of pkgdown. Learn more in vignette(“pkgdown”) or ?build_site.
7 officedown
可以集成生成word和ppt的R包,基于的是R Markdown 。
Word
The package facilitates the formatting of Microsoft Word documents produced by R Markdown documents by providing a range of features:
PowerPoint
The package also enhances PowerPoint productions with R Markdown by providing a mechanism for placing results according to the slide template contained in the PowerPoint document used as “reference_doc”. It becomes easy to add several contents in the same slide.
https://github.com/davidgohel/officedown
https://ardata-fr.github.io/officeverse/officedown-for-word.html
8 ElegantBookdown
黄湘云制作的一款将ElegantBook制作成bookdown格式的模板,可以生成很好看的word
在线预览
源码地址:https://github.com/XiangyunHuang/ElegantBookdown
9 thesisdown
使用bookdown软件包更新的R Markdown论文模板的包,是今后写毕业论文的方向,目前衍生了若干高效的’down’,下面有各种例子,有兴趣的话,你也可以自己制作一个。
This project was inspired by the bookdown package and is an updated version of my Senior Thesis template in the reedtemplates package here. It was originally designed to only work with the Reed College LaTeX template, but has since been adapted to work with many different institutions by many different individuals. Check out the Customizing thesisdown to your institution section below for examples.
Currently, the PDF and gitbook versions are fully-functional. The word and epub versions are developmental, have no templates behind them, and are essentially calls to the appropriate functions in bookdown.
https://github.com/ismayc/thesisdown
<colgroup style="box-sizing: border-box;"><col width="27%" style="box-sizing: border-box;"><col width="42%" style="box-sizing: border-box;"><col width="29%" style="box-sizing: border-box;"></colgroup>