Learn R Programming

texor (version 1.5.3)

convert_to_native: convert LaTeX wrapper to native pandoc AST

Description

Uses pandoc along with several lua filters found at inst/extdata/filters in texor package

Usage

convert_to_native(article_dir, autonumber_eq = FALSE)

Value

creates a converted native AST file, as well as a pkg_meta.yaml file

Arguments

article_dir

path to the directory which contains tex article

autonumber_eq

whether to autonumber the equations, default is FALSE

Details

convert latex(wrapper) file to pandoc AST

Examples

Run this code
# Note This is a minimal example to execute this function
article_dir <- system.file("examples/article",
                 package = "texor")
dir.create(your_article_folder <- file.path(tempdir(), "tempdir"))
x <- file.copy(from = article_dir, to = your_article_folder,recursive = TRUE,)
your_article_path <- paste(your_article_folder,"article",sep="/")
rmarkdown::pandoc_version()
texor::include_style_file(your_article_path)
rebib::aggregate_bibliography(your_article_path)
texor::convert_to_native(your_article_path)
unlink(your_article_folder,recursive = TRUE)

Run the code above in your browser using DataLab