ubc-geomatics-textbook/geomatics-textbook

Static images to replace remaining .gif images

Closed this issue · 3 comments

The following gif's will throw a LaTeX error preventing a build to pdf_book.

  • 03-lightning-density.gif
  • 07-2d-alpha-hull.gif
  • 07-platonic-polyhedrons.gif
  • 09-mount-assiniboine-hillshade-animation.gif
  • 09-nelson-river-hillshade-animation.gif
  • 09-sink-fill.gif
  • 09-vancouver-building-height-extruded.gif
  • 12-aerial-bad.gif
  • 12-aerial-good.gif
  • 12-focus_example_humaneye.gif
  • 12-mountain-legacy-project.gif
  • 12-phenological-camera-sequence.gif
  • 12-push-broom.gif
  • 12-sunsynchronous-geosynchronous-orbits.gif
  • 12-whisk-broom.gif
  • 14-Beaufort-Sea-Ice.gif

Add .png images of each to images directory, preserving filename. For each one, a new chunk for will be needed to either knit to LaTeX or html. For example:

{r 3-lightning-density, echo=FALSE, out.width = '75%', fig.cap=fig_cap}
if (knitr:::is_latex_output()) { fig_cap <- paste0("Global lighting strike density per month. Animated figure... Skeeter, CC-BY-SA-4.0.")
  knitr::include_graphics("images/03-lightning-density.png")
} else { fig_cap <- paste0("Global lighting strike density per month. Skeeter, CC-BY-SA-4.0.")
  knitr::include_graphics("images/03-lightning-density.gif")
}

Knitr web output cannot have escaped hrefs or the links will not render correctly

Knitr latex output will not render without escaped hrefs, but escaped hrefs do not actually create links in PDF. So we need to an alternative way insert links...

currently inserting urls without hyperlinking as:

{r 9-sink-fill, fig.cap = fig_cap, out.width= "75%", echo = FALSE}
    if (knitr:::is_latex_output()) { fig_cap <- paste0("Animated process of filling sinks in a DEM. Pickell, CC-BY-SA-4.0. Animated figure can be viewed in the web browser version of the textbook: https://ubc-geomatics-textbook.github.io/geomatics-textbook/raster-analysis-and-terrain-modelling.html")
  knitr::include_graphics("images/09-sink-fill.png")
} else { fig_cap <- paste0("Animated process of filling sinks in a DEM. Pickell, CC-BY-SA-4.0.")
  knitr::include_graphics("images/09-sink-fill.gif")
}

Each affected Markdown file has been fixed.