convert_to_markdown {texor}R Documentation

convert LaTeX wrapper to markdown

Description

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

Usage

convert_to_markdown(article_dir)

Arguments

article_dir

path to the directory which contains tex article

Details

convert latex(wrapper) file to markdown

Value

creates a converted markdown file, as well as a pkg_meta.yaml file

Note

pandoc (along with lua interpreter) is already installed with R-studio, hence if not using R-studio you will need to install pandoc. https://pandoc.org/installing.html @note Use pandoc version greater than or equal to 2.17

Examples

# Note This is a minimal example to execute this function
# Checking for pandoc version
# texor works with pandoc version >= 2.17
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_markdown(your_article_path)
unlink(your_article_folder,recursive = TRUE)

[Package texor version 1.3.0 Index]