sds_image: Render an image in either html or latex as appropriate.

View source: R/sds_image.R

sds_imageR Documentation

Render an image in either html or latex as appropriate.

Description

Insert an image as either html or latex

Usage

sds_image(
  img,
  width = NULL,
  height = NULL,
  lwidth = width,
  lheight = height,
  format = ifelse(knitr::is_latex_output(), "latex", "html")
)

Arguments

img

quoted relative path name of image

width

number giving width as percent

height

number giving height as percent

lwidth

number for latex width, if you want a different width for latex and for html

lheight

number for latex height, like lwidth

format

either "html" or "latex". Default uses knitr::is_latex_output()

Examples

sds_image("images/bogus", format = "latex", width = 50)


dtkaplan/SDSdata documentation built on June 28, 2022, 8:09 a.m.