Learn R Programming

spork (version 0.1.1)

as_preview.latex: Preview Spork as Latex

Description

Preview spork after conversion to latex. Creates and displays a temporary png file, after conversion from pdf using ghostconvert.

Usage

# S3 method for latex
as_preview(
  x,
  wide = 70,
  long = 20,
  stem = "latex_preview",
  dir = tempdir(),
  gs_cmd = getOption("gs_cmd", "mgs"),
  prolog = "\\begin{center}",
  epilog = "\\end{center}",
  ...
)

Arguments

x

spork; see as_spork

wide

nominal page width

long

nominal page length

dir

a working directory; see as.pdf

gs_cmd

ghostscript command; see ghostconvert

prolog

passed to as.document

epilog

passed to as.document

...

passed arguments

Value

invisible filepath

See Also

Other preview: as.png.plotmath(), as.png.spork(), as_preview.plotmath(), as_previews.spork(), as_previews(), as_preview(), ggplot.plotmath(), ggplot.spork()

Examples

Run this code
# NOT RUN {
library(magrittr)
'one joule (Omega) ~ 1 kg*m^2./s^2' %>%
as_spork %>%
as_latex %>%
as_preview
# }

Run the code above in your browser using DataLab