29-04-2021



  1. Pandoc Beamer 5
  2. Pandoc Beamer Example
  3. Pandoc Beamer Parts

Markdown-beamer templates for pandoc. Contribute to cympfh/beamer development by creating an account on GitHub. Making presentations with Pandoc beamer. This is a short guide about how I make PDF slides using beamer format output from the pandoc. Note: Commands are updated for the latest Pandoc version: 2.10.x and newer. How-to for docs preparation Tools. Template: I use my own modified template in order to produce nicer looking listings of code.

If you need to convert files from one markup format into another, pandoc is your swiss-army knife. Pandoc can convert between the following formats:

(← = conversion from; → = conversion to; ↔︎ = conversion from and to)

Lightweight markup formats
↔︎ Markdown (including CommonMark and GitHub-flavored Markdown)
↔︎ reStructuredText
→ AsciiDoc
↔︎ Emacs Org-Mode
↔︎ Emacs Muse
↔︎ Textile
← txt2tags
HTML formats
↔︎ (X)HTML 4
↔︎ HTML5
Ebooks
↔︎ EPUB version 2 or 3
↔︎ FictionBook2
Documentation formats
→ GNU TexInfo
↔︎ Haddock markup
Roff formats
↔︎ roff man
→ roff ms
TeX formats
↔︎ LaTeX
→ ConTeXt
XML formats
↔︎ DocBook version 4 or 5
↔︎ JATS
→ TEI Simple
Outline formats
↔︎ OPML
Bibliography formats
← BibTeX
← BibLaTeX
↔︎ CSL JSON
↔︎ CSL YAML
Word processor formats
↔︎ Microsoft Word docx
↔︎ OpenOffice/LibreOffice ODT
→ OpenDocument XML
→ Microsoft PowerPoint
Interactive notebook formats
↔︎ Jupyter notebook (ipynb)
Page layout formats
→ InDesign ICML
Wiki markup formats
↔︎ MediaWiki markup
↔︎ DokuWiki markup
← TikiWiki markup
← TWiki markup
← Vimwiki markup
→ XWiki markup
→ ZimWiki markup
↔︎ Jira wiki markup
Slide show formats
→ LaTeX Beamer
→ Slidy
→ reveal.js
→ Slideous
→ S5
→ DZSlides
Data formats
← CSV tables
Custom formats
→ custom writers can be written in lua.
PDF
→ via pdflatex, lualatex, xelatex, latexmk, tectonic, wkhtmltopdf, weasyprint, prince, context, or pdfroff.

Source: Pandoc – About pandoc

Let us know if you liked the post. That’s the only way we can improve.

The goal of reproducible research is to tie specific instructions to data analysis and experimental data so that scholarship can be recreated, better understood and verified. Packages in R for this purpose can be split into groups for: literate programming, pipeline toolkits, package reproducibility, project workflows, code/data formatting tools, format convertors, and object caching.

The maintainers gratefully acknowledge Anna Krystalli , Max Kuhn , Will Landau , Ben Marwick , and Daniel Nüst for their useful feedback and contributions.

Yaml

If you would like to recommend a package to be included in this task view, please open a GitHub Issue to discuss.

The primary way that R facilitates reproducible research is using a document that is a combination of content and data analysis code. TheSweave function (in the base R utils package) and theknitr package can be used to blend the subject matter and R code so that a single document defines the content and the analysis. Thebrew andR.rsp packages contain alternative approaches to embedding R code into various markups.

The resources for literate programming are best organized by the document type/markup language:

LaTeX

Pandoc Beamer

BothSweave andknitr can process LaTeX files.lazyWeave can create LaTeX documents from scratch.

Theknitr andrmarkdown packages (along with pandoc ) can be used to create slides using the LaTeX beamer class.

Object Conversion Functions:

  • summary tables/statistics :Hmisc,NMOF,papeR,quantreg,rapport,reporttools,sparktex,tables,xtable,ztable
  • tables/cross-tabulations :Hmisc,lazyWeave,knitLatex,knitr,reporttools,ztable
  • graphics :animation,Hmisc,grDevices:::pictex,sparktex,tikzDevice
  • statistical models/methods :apsrtable,memisc,quantreg,rms,stargazer,suRtex,texreg,xtable,ztable
  • bibtex :bibtex andRefManageR
  • others :latex2exp converts LaTeX equations to plotmath expressions.

Miscellaneous Tools

Pandoc
  • Hmisc contains a function to correctly escape special characters. Standardized exams can be created using theexams package.

HTML

Theknitr package can process HTML files directly.Sweave can also work with HTML by way of theR2HTML package.lazyWeave can create HTML format documents from scratch.

For HTML slides, a combination of theknitr andrmarkdown packages (along with pandoc ) can be used to create slides using ioslides , reveal.js , Slidy , or remark.js (from thexaringan package).

Object Conversion Functions:

  • summary tables/statistics :stargazer
  • tables/cross-tabulations :DT,flextable,formattable,htmlTable,HTMLUtils,hwriter,knitr,lazyWeave,SortableHTMLTables,texreg,ztable
  • statistical models/methods :rapport,stargazer,xtable
  • others :knitcitations,RefManageR

Miscellaneous Tools:htmltools has various tools for working with HTML.tufterhandout for creating Tufte-style handouts

Markdown

Theknitr package can process markdown files without assistance. The packagesmarkdown andrmarkdown have general tools for working with documents in this format.lazyWeave can create markdown format documents from scratch. Also, theascii package can write R objects to the AsciiDoc format.

Object Conversion Functions:

  • summary tables/statistics :papeR
  • tables/cross-tabulations :DT,formattable,htmlTable,knitr,lazyWeave,papeR
  • statistical models/methods :pander,papeR,rapport,texreg
  • others :RefManageR

Miscellaneous Tools:tufterhandout for creating Tufte-style handouts.kfigr allows for figure indexing in markdown documents.

Microsoft/LibreOffice Formats

Theofficer (formerly ReporteRs and before that R2DOCX) package can create docx and pptx files.R2wd (windows only) can also create Word documents from scratch andR2PPT (also windows only) can create PowerPoint slides. Thertf package does the same for Rich Text Format documents. Theopenxlsx package creates xlsx files. ThereadODS package can read and write Open Document Spreadsheets.

Object Conversion Functions:

  • tables/cross-tabulations :flextable
  • graphics :mschart

Pipeline toolkits help maintain and verify reproducibility. They synchronize computational output with the underlying code and data, and they tell the user when everything is up to date. In other words, they provide concrete evidence that results are re-creatable from the starting materials, and the data analysis project does not need to rerun from scratch. Thetargets package is such a pipeline toolkit. It is similar to GNU Make , but it is R-focused.

Pandoc Beamer
  • drake: A general-purpose computational engine for data analysis, drake rebuilds intermediate data objects when their dependencies change, and it skips work when the results are already up to date.
  • flowr: This framework allows you to design and implement complex pipelines, and deploy them on your institution's computing cluster.
  • repo: A data manager meant to avoid manual storage/retrieval of data to/from the file system.
  • targets: As a pipeline toolkit for Statistics and data science in R, the 'targets' package brings together function-oriented programming and 'Make'-like declarative workflows.

R also has tools for ensuring that specific packages versions can be required for analyses.checkpoint,groundhog,rbundler,packrat andrenv install packages required for a project to a local archive as they existed at a specified point in time. This allows specific package versions to be maintained over time and different users. TheminiCRAN andswitchr packages facilitate the creation of local CRAN-like repositories and their simultaneous operation.liftr allows to containerize an R Markdown document using Docker by providing additional metadata.

Successfully completing a data analysis project often requires much more than statistics and visualizations. Efficiently managing the code, data, and results as the project matures helps reduce stress and errors. The following 'workflow' packages assist the R programmer by managing project infrastructure and/or facilitating a reproducible workflow.

Workflow utility packages provide single-use functions to implement project infrastructure or solve a specific problem. As a typical example,usethis::use_git() initializes a Git repository, ignores common R files, and commits all project files.

  • cabinets: Creates project specific directory and file templates that are written to a .Rprofile file.
  • here: Constructs paths to your project's files.
  • prodigenr: Create a project directory structure, along with typical files for that project.
  • RepoGenerator: Generates a project and repo for easy initialization of a GitHub repo for R workshops.
  • rrtools ( GitHub only ): Instructions, templates, and functions for making a basic compendium suitable for doing reproducible research with R.
  • starters ( GitHub only ): Setting up R project directories for teaching, presenting, analysis, package development can be a pain. starters shortcuts this by creating folder structures and setting good defaults for you.
  • usethis: Automate package and project setup tasks that are otherwise performed manually.

Pandoc Beamer 5

Workflow framework packages provide an organized directory structure and helper functions to assist during the development of the project. As a typical example,ProjectTemplate::create.project() creates an organized setup with many subdirectories, andProjectTemplate::run.project() executes each R script that is saved in thesrc/ subdirectory.

Pandoc beamer template
  • exreport: Analysis of experimental results and automatic report generation in both interactive HTML and LaTeX.
  • madrat: Provides a framework which should improve reproducibility and transparency in data processing. It provides functionality such as automatic meta data creation and management, rudimentary quality management, data caching, work-flow management and data aggregation.
  • makeProject: This package creates an empty framework of files and directories for the 'Load, Clean, Func, Do' structure described by Josh Reich.
  • orderly: Order, create and store reports from R.
  • projects: Provides a project infrastructure with a focus on manuscript creation.
  • ProjectTemplate: Provides functions to automatically build a directory structure for a new R project. Using this structure, 'ProjectTemplate' automates data loading, preprocessing, library importing and unit testing.
  • reportfactory: Provides an infrastructure for handling multiple R Markdown reports, including automated curation and time-stamping of outputs, parameterisation and provision of helper functions to manage dependencies.
  • represtools: Reproducible research tools automates the creation of an analysis directory structure and work flow. There are R markdown skeletons which encapsulate typical analytic work flow steps. Functions will create appropriate modules which may pass data from one step to another.
  • RSuite: Supports safe and reproducible solutions development in R. It will help you with environment separation per project, dependency management, local packages creation and preparing deployment packs for your solutions.
  • tinyProject: Creates useful files and folders for data analysis projects and provides functions to manage data, scripts and output files.
  • worcs: Create reproducible and transparent research projects in 'R'. This package is based on the Workflow for Open Reproducible Code in Science (WORCS), a step-by-step procedure based on best practices for Open Science.
  • workflowr: Provides a workflow for your analysis projects by combining literate programming ('knitr' and 'rmarkdown') and version control ('Git', via 'git2r') to generate a website containing time-stamped, versioned, and documented results.
  • zoon: Reproducible and remixable species distribution modelling.

formatR,highlight, andhighr can be used to color and/or format R code.

PackageshumanFormat,lubridate,prettyunits, andrprintf have functions to better format data.

Pandoc Beamer Example

pander can be used for rendering R objects into Pandoc's markdown.knitr has the function pandoc that can call an installed version of Pandoc to convert documents between formats such as Markdown, HTML, LaTeX, PDF and Word.tth facilitates TeX to HTML/MathML conversions.

Pandoc Beamer Parts

When usingSweave andknitr it can be advantageous to cache the results of time consuming code chunks if the document will be re-processed (i.e. during debugging).knitr facilitates object caching and the Bioconductor packageweaver can be used withSweave.

Non-literate programming packages to facilitating caching/archiving areR.cache,archivist,storr, andtrackr.