knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  out.width = '30%'
)
library(linguisticsdown)

Passing URL to path

png_url <- 'https://commonmark.org/images/markdown-mark.png'
gif_url <- 'https://media.giphy.com/media/k3dcUPvxuNpK/giphy.gif'

PNG

include_graphics2(png_url)

GIF without alt_path

include_graphics2(gif_url)

GIF with alt_path

include_graphics2(gif_url, png_url)

Passing Local Figures to path

JPG

include_graphics2('Darwin.jpg')

Local GIF without alt_path

include_graphics2('local.gif')

Local GIF with alt_path

include_graphics2('local.gif', 'local_gif_static.png')

r if (knitr::is_latex_output()) paste0('<!--')

PDF Output of this Vignette

r if (knitr::is_latex_output()) paste0('-->')

r if (knitr::is_html_output()) paste0('<!--')

HTML Output of this Vignette

See the corresponding HTML output of this vignette at http://bit.ly/include_graphics2.

r if (knitr::is_html_output()) paste0('-->')



liao961120/linguisticsdown documentation built on May 6, 2019, 8:08 p.m.