latex_to_web: latex to web

View source: R/automation-tools.R

latex_to_webR Documentation

latex to web

Description

automated function for converting a single RJarticle to web

Usage

latex_to_web(
  dir,
  log_steps = TRUE,
  example = FALSE,
  auto_wrapper = TRUE,
  temp_mode = TRUE,
  web_dir = FALSE,
  interactive_mode = FALSE,
  autonumber_eq = FALSE,
  compile_rmd_in_temp = !temp_mode,
  kable_tab = TRUE,
  fig_in_r = TRUE
)

Arguments

dir

directory path

log_steps

Enable/Disable Logging of conversion steps

example

for examples only by default keep it FALSE.

auto_wrapper

automatically creates a wrapper if TRUE, else asks user. default value TRUE

temp_mode

temp mode will convert the document in a temporary folder and keep the original article untouched. default value = TRUE

web_dir

option to create a new web directory, default FALSE

interactive_mode

interactive mode for converting articles with options. default FALSE

autonumber_eq

whether to autonumber the equations, default is FALSE

compile_rmd_in_temp

This works only with a forked version of rjtools.

kable_tab

converts to kable table instead of markdown tables

fig_in_r

whether to include figures in R code chunks, default is TRUE Not recommended to use with CRAN or github version of the rjtools package. (default FALSE)

Value

RJweb article document in /web folder

Note

Use pandoc version greater than or equal to 3.1

Do not set example = TRUE param when working with conversions.

example param is set TRUE in example, to conform with CRAN check restrictions.

Examples

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="/")
texor::latex_to_web(your_article_path,log_steps = FALSE, example = TRUE, temp_mode =FALSE)
unlink(your_article_folder, recursive = TRUE)

texor documentation built on Oct. 15, 2024, 5:08 p.m.