Rbanism / geospatial-data-carpentry-tud-2022-11

0 stars 0 forks source link

Cannot knit quarto slides #23

Closed cforgaci closed 1 year ago

cforgaci commented 1 year ago

@alwil, when I try to knit my slides, I get this error message:

Quitting from lines 32-87 (session1.qmd) 

Error in rep_len(label, length(meta)) : 
  cannot replicate NULL to a non-zero length
Calls: .main ... in_dir -> inline_exec -> sew -> <Anonymous> -> knit_meta_add
Execution halted

I get the same message if I try to knit yours. It only works if I knit my first two slides without any in-line r code or code chunks.

Any ideas about what might be the problem? There must be something different with my setup.

alwil commented 1 year ago

Hi @cforgaci , it must be coming from r countdown::countdown() row. For some reason it didn't work for me with the combination with Quarto and it gave me the same error ( I tried both GitHub and CRAN versions). Once I remove this line from your .qmd file, I get error about datasets not being loaded, which I suppose makes sense?

I now realized that I haven't pushed the most up-to-date slides from my side ( with countdown removed). I will do it now.

I hope that helps!

alwil commented 1 year ago

Hi @cforgaci, I've dug a bit into the countdown package Github issues. It seems that you need to remove cache from the countdown chunk for it to work. So replacing r countdown::countdown() with :

``` {r}
#| echo: false
#| cache: false
countdown::countdown(minutes = 3)


should work. 
cforgaci commented 1 year ago

Thanks @alwil! That was indeed the problem. Now, I still have two issues with the slides:

  1. the text size for body and lists, as well as the timer button, are too large. I tried to adjust
  2. the code from the solutions does not seem to fit one slide, so I suggest one of the following: remove the code and show it in the script or move it to a separate slide or tab in a scrollable code type box (like with xaringan?). Do you know how to do the latter with quarto slides? If it is too complicated, I am fine with the former option.
cforgaci commented 1 year ago

@alwil, regarding point 1 above, I updated the font size in custom.scss. Please check that it works for your slides as well.

alwil commented 1 year ago

@cforgaci , I will try, although after I knitted the slides with the settings as they are, the appearance was OK ( countdown and code chunks in the right size).

regarding 2), not sure if this will work, but you can try some options from the slide content overflow or code chunk content overflow .

cforgaci commented 1 year ago

regarding 2), not sure if this will work, but you can try some options from the slide content overflow or code chunk content overflow .

Good to know about those options. Thanks! I decided to remove the code chunks from the slides and paste them into the script while participants work on the challenge. That way, they can copy and paste it from the livecode repo afterwards.

All points addressed, closing this issue now. Thanks again, @alwil!