File: compileLaTeX.R

package info (click to toggle)
r-cran-r.rsp 0.45.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,568 kB
  • sloc: javascript: 612; tcl: 304; sh: 18; makefile: 16
file content (27 lines) | stat: -rw-r--r-- 851 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library("R.rsp")
library("R.utils") # Arguments

path <- system.file("rsp_LoremIpsum", package="R.rsp")
pathname <- file.path(path, "LoremIpsum.tex")
print(pathname)

if (Sys.getenv("_R_CHECK_FULL_") != "") {
  outPath <- file.path("LoremIpsum", "tex")
  pathnameR <- compileLaTeX(pathname, outPath=outPath, verbose=-10)
  print(pathnameR)
  pathnameR <- Arguments$getReadablePathname(pathnameR)
}


# Fake LaTeX compilation
if (Sys.getenv("_R_CHECK_FULL_") != "") {
  outPath <- file.path("LoremIpsum", "tex-fake")
  local({
    oenv <- Sys.getenv("R_RSP_COMPILELATEX_FALLBACK")
    on.exit(Sys.setenv("R_RSP_COMPILELATEX_FALLBACK"=oenv))
    Sys.setenv("R_RSP_COMPILELATEX_FALLBACK"="copy-force")
    pathnameR <- compileLaTeX(pathname, outPath=outPath, verbose=-10)
  })
  print(pathnameR)
  pathnameR <- Arguments$getReadablePathname(pathnameR)
}