extract.tex: extract.tex

Description Usage Arguments Value Examples

View source: R/extract.tex.R

Description

Extracts comments of the form \begin{comment}[option]{filename}...\end{comment} from tex files.

Usage

1
extract.tex(contents, pattern = NULL)

Arguments

contents

string: tex file contents

pattern

regular expression for stringr::str_match_all (default: NULL)

Value

a data frame with components option, file and contents.

Examples

1
2
3
file  <- system.file("example.tex", package="extpro")
fcont <- paste0(readLines(file), collapse="\n")
extract.tex(fcont)

sigbertklinke/extpro documentation built on Dec. 31, 2020, 7:26 a.m.