tex2rmd: tex2rmd

Description Usage Arguments Details Value Author(s) Examples

Description

Converts a raw LaTex file to RMarkdown format, then to Word format. Can optionally convert to any format supported by RMarkdown

Usage

1
tex2rmd(infile)

Arguments

infile

Full path to the input Latex file.

Details

The general workflow to convert a Latex document into Markdown, and eventually Word, is as follows:

  1. Compile the latex document, using pdftex or whatever, so that the .aux and .bbl files are generated.

  2. Run tex3rmd specifying the file containing the raw Latex code as the input. The associated .aux and .bbl files must be in the same directory. This will generate a markdown document of the same root name but with .Rmd extension.

  3. Compile the .Rmd file. In RStudio, open it and hit <ctrl>-<shift>-K.

Value

The markdown code is written to a file named <root>.Rmd, where inFile is <root>.tex. The markdown code in the form of a vector, one line per element, is invisably returned.

Author(s)

Trent McDonald

Examples

1
2
3
\notrun{
tex2rmd("main.tex")
 }

tmcd82070/tex2rmd documentation built on May 27, 2019, 8:46 a.m.