Learn R Programming

RndTexExams (version 1.2)

rte.analize.tex.file: Analize a LaTeX file and convert it into a list

Description

This function will take as input a LaTeX file and break its components into a single R List.

Usage

rte.analize.tex.file(f.in, latex.dir.out = "latexOut",
  pdf.dir.out = "PdfOut")

Arguments

f.in
The latex file with the exam
latex.dir.out
The name of the folder where the files from the latex compilation should go (will create if not found)
pdf.dir.out
The name of the folder where the pdf from the latex compilation should go (will create if not found)

Value

  • A list that represents the tex file with preamble, questions, answers and more. This list is later used by function rte.build.rdn.text [object Object],[object Object],[object Object],[object Object],[object Object]

Examples

Run this code
latex.dir.out <- 'latexOut' # Name of folder where latex files are going
                            #(will create if it does not exists)

pdf.dir.out <- 'PdfOut'     # Name of folder where resulting pdf files are going

# Get latex example from package
f.in <- system.file("extdata", "MyRandomTest.tex", package = "RndTexExams")

# Break latex file into a R list
list.out <- rte.analize.tex.file(f.in,
                                latex.dir.out = latex.dir.out,
                                pdf.dir.out = pdf.dir.out)

print(list.out)

Run the code above in your browser using DataLab