LearnToDiscover / sandpaper

L2D's fork of {sandpaper}
https://learntodiscover.github.io/sandpaper/
Other
0 stars 1 forks source link

Fix pdf (not showing plots images) #20

Closed sabaferdous12 closed 1 year ago

sabaferdous12 commented 1 year ago

At the moment, any plot originating from python code are not being displayed in the pdf. This is due to md file contains html tag for image while Pandoc only reads image tag.

e.g:

<    img src="fig/01-data_frames_1-rendered-unnamed-chunk-35-3.png" width="672" style="display: block; margin: auto;" />

but workable line is:

!  [] (fig/01-data_frames_1-rendered-unnamed-chunk-34-1.png)

We need to fix this in sandpaper

milanmlft commented 1 year ago

As a side note: the problem is not only for Python-generated figures, but for any code-generated figures. A minimal example can be found here: milanmlft/tmp-lesson-figs at 3ad21412053828ea64698e3b04145b71b674ad29

The generated pdf: introduction.md.pdf

milanmlft commented 1 year ago

chrome_print function - RDocumentation might be useful

This would require installing Chromium on the GHA runners, for which browser-actions/setup-chrome: Set up your GitHub Actions workflow with a specific version of chromium might be used