yihui / xaringan

Presentation Ninja 幻灯忍者 · 写轮眼
https://slides.yihui.org/xaringan/
Other
1.49k stars 281 forks source link

It seems not enough for me to carry only the .html presentation #40

Closed renguangyu closed 7 years ago

renguangyu commented 7 years ago

I have a good experience with xaringan. For presentation, I use it all day along and it is stable for Chinese character, while some packages could have be messed up.

The presentation has many pictures linked to local directory. Carrying the latest .html (with a directory of htmlname_files) in a flash memory disk, I find all the pictures cannot be ilustrated.

It is frustrated for me due to the inconvenience if I have to carry all the material around.

Even though I could make pictures linked to web, it happens there's no network environment.

I ask you for help if there is a solution.

renguangyu commented 7 years ago

I have learned some basics about markdown->html. It has to link with original source of pictures. I only find out one way ---- encoding pictures into base64, except the too long codes.


Today I've met another Q I copy all the materials with .html to make a presentation at another public computer. It seems the browser can't be activated when open the .html, while it runs well in my own pc.

I make several tests. The path that directory exists in must be English. If there is Chinese words among the path name, it can't make a new rmd-------maybe even make error when opening the rmd in this situation, such as Chinese words would be messily coded.

yihui commented 7 years ago

Instead of base64 encoding images, I believe there are two easier ways. You can either print your slides to PDF using Chrome, or drag your slides folder to https://netlify.com and publish there, so other people only need a link to read your slides.

You can certainly use self_contained: true under xaringan::moon_reader, but you should know the caveats: https://github.com/yihui/xaringan/blob/946690f9/man/moon_reader.Rd#L67-L74

renguangyu commented 7 years ago

Thx for your advice. I have tried to print into .pdf, but find the slides becomes relative small (a lot of margin exists).

As a fresher, I can't understand "You can certainly use self_contained: true under xaringan::moon_reader". I will appreciate it very much if you can provide more information.

yihui commented 7 years ago
---
output:
  xaringan::moon_reader:
    self_contained: true
---