tex2png: Convert TEX to PNG

Description Usage Arguments See Also Examples

View source: R/png.R

Description

Converts TEX to PNG. tex2png accepts the file names of TEX fragments. It reads those fragments, wraps them like documents and makes PNG files (converted from PDF files).

Usage

1
2
3
4
5
6
7
8
9
tex2png(
  x,
  stem = NULL,
  dir = NULL,
  clean = TRUE,
  onefile = FALSE,
  replace = TRUE,
  ...
)

Arguments

x

vector of file names

stem

the stem of a file name (no extension)

dir

output directory

clean

whether to delete system files after PNG creation

onefile

whether to combine tex snippets into a single file

replace

whether to delete the intermediate PDF files

...

passed to tex2pdf and ghostconvert

See Also

as.png.character

viewtex

Examples

1
2
3
4
5
6
## Not run: 
file <- file.path(tempdir(),'test.tex')
writeLines(as.ltable(head(Theoph)), file)
tex2png(file, gs_cmd = 'mgs')

## End(Not run)

latexpdf documentation built on Aug. 18, 2021, 1:07 a.m.