This post was written bilingually, in English and Chinese.
本文用英文和中文写作,中文在后半部分。
Introduction
All Steemians are familiar with markdown, the default syntax on steemit.com and utopian.io. In recent years markdown has been widely applied in many websites and software packages. For example, you can use the markdown editor Typora, on which I wrote a tutorial in my previous post, to create pdf documents or html webpages. You could also use the R bookdownplus package, which I developed on the basis of bookdown, to create high-quality academic papers or theses instead of using Microsoft Word or LaTeX syntax. You could even create mindmaps with markdown syntax in the R mindr package I developed.
In this article, I introduced the R package postr, which creates posters (especially academic ones) with markdown syntax.
Features
A demo poster is shown as follows. Common poster elements can be inserted in markdown sytax into a poster created with postr, including:
- a title and authors,
- a logo,
- columns,
- figures,
- tables,
- footnotes,
- R codes with reproducible returned results, and
- citations and bibliography.
Quick Start
Preparation
postr is built on the giants' shoulders. The following depended programs have to be installed before using postr.
- Install a LaTeX distribution, e.g. MiKTeX. For Chinese users CTeX is highly recommended.
- Install Texmaker
- Install R
- Install RStudio
- Install Python 2
- Install Python filter support for Pandoc:on a Windows command prompt, type
pip install pandocfilters
Installation of postr
In R environment, run the following codes to install pinyin.
devtools::install_github("pzhaonet/postr")
Create a demo poster
In RStudio, run the following codes to create a demo poster.
getwd() # this is your working directory. run setwd() to change it.
postr::postr()
Now open poster.Rmd
in RStudio, and press ctrl+shift+k
to compile it. You will get a file named poster.pdf
in your working directory. Open it with any pdf viewer (SumatraPDF, Adebe Reader, whatever).
If the bibliography section is not displayed in the poster, knitr poster.Rmd
once more.
A lot of annoying files and folders produced? You can remove them by running (Caution! You won't find them in your recycle bin!):
postr::postr_del()
Have fun!
Link to the Repo
https://github.com/pzhaonet/postr
Proof of Work
In my profile on Utopian.io, the github repo pinyin is listed in my project page, which is show in the screenshot as follows:
The login page on github.com is shown in the following screenshot:
Markdown 是最近几年风行世界的标记性语言,是很多网站的默认发帖格式。steem 的用户,不管是不是喜欢 markdown,都逐渐接受了这个简单而强大的工具。
我是 markdown 的重度用户。前两天,我撰文介绍了 Typora 这款优秀的 markdown 编辑器,用它可以直接生成 pdf 文档 和 html 网页。你也可以用我开发的 R bookdownplus ,通过 markdown 语法来编写技术文档、期刊论文、学术论文、诗集 、散文集等,基本可以取代微软的 Word 了。甚至还可以用我开发的 R mindr 扩展包,用 markdown 语法来绘制思维导图。
本文介绍的是我开发的另一个跟 markdown 有关的扩展包 postr。用它,可以制作海报。
本文的英文部分第一张插图展示了 postr 制作的示范海报。这是在 rmarkdown 的框架上的可重复研究海报。简单来说,在制作海报时,你只需插入 R 语言的绘图函数,不用插入图片文件,就可以在得到的海报展示所绘的图形。数据也一样。
postr 制作的海报要素,包括了标题、作者、工作单位、logo、分栏、文字、图表、脚注、交叉引用、参考文献等,完全能胜任常见的学术海报制作。如果你使用了我的 R bookdownplus 写论文,那么可以直接把论文里的文字、绘图代码、参考文献拷贝粘贴进 postr,就自动生成啦!
Posted on Utopian.io - Rewarding Open Source Contributors