distanceworkshops / standrews-2019

Distance workshops in St Andrews, 2019
0 stars 0 forks source link

Participants cannot knit practicals because of figures #4

Open erex opened 5 years ago

erex commented 5 years ago

Unresolved problem

Because practicals 4,5,6,7 and 9 have figures (maps etc), knitting of those .rmd files will fail unless

At present, the required folders are located in Ericincoming/figures

dill commented 5 years ago

If we put the figures online, we could load them from the internet? Not perfect but would allow compilation?

erex commented 5 years ago

not sure what you mean by "load"? Participants could download figures, but would need to get files situated in the right directory location. If you mean access the files "on the fly" during knitting, don't know how that works.

dill commented 5 years ago

I mean the latter. The markdown ![]() format will allow for any valid URL to be specified. So putting

![this is the distance logo](http://distancesampling.org/images/logo-big.gif)

yields:

this is the distance logo

erex commented 5 years ago

that's good, could make things easier. So, when you get the figure files seated in their final location, then those pracs will get re-knitted again again?

erex commented 5 years ago

Hmmm, that trick to access figures from remote server works when knitting a document to html, but not when knitting to pdf. Perhaps that's sufficient; not sure we will want folks to construct PDF files from markdown, because, to my recollection, that would require an installation of Latex, which we haven't mentioned and which holds many perils.

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test-figures.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test-figures.tex --template "C:\Users\erexs\Documents\R\win-library\3.6\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --pdf-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" --variable "compact-title:yes" 
output file: test-figures.knit.md

! Package pdftex.def Error: File `https://workshops.distancesampling.org/standr
ews-2019/intro/practicals/figures/Prac_4_Figure_1.png' not found: using draft s
etting.

Error: Failed to compile test-figures.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See test-figures.log for more info.
Execution halted
erex commented 5 years ago

I'm ready to knock off for today.

If you concur that knitting to HTML will be the most participants can expect; then the .rmd files for Prac 4,5,6,7, 9 will need to have their path to figures altered. Do you want me to do that on Saturday?

dill commented 5 years ago

Agree on generating HTML in RStudio for participants. If you can refresh these on Saturday that would be great.

erex commented 5 years ago

will do

erex commented 5 years ago

all 5 rmd files modified and uploaded