as_preview.latex: Preview Spork as Latex

View source: R/preview.R

as_preview.latexR Documentation

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 class 'latex'
as_preview(
  x,
  wide = 70,
  long = 20,
  stem = "latex_preview",
  dir = tempdir(),
  gs_cmd = getOption("gs_cmd", "mgs"),
  preamble = "\\usePackage{amsmath}\\n",
  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


# library(magrittr)
# 'one joule (Omega) ~ 1 kg*m^2./s^2' %>%
# as_spork %>%
# as_latex %>%
#as_preview


spork documentation built on Sept. 16, 2023, 9:06 a.m.