A simple Julia package to create presentations from markdown using Remark.
To install type the following command in the Julia Pkg REPL
(v1.0) pkg> add Remark
import Remark # Generate a presentation (html+markdown) from the markdown template # and save it in the folder "presentation". markdown_template = joinpath(dirname(dirname(pathof(Remark))), "examples", "markdown") cp(markdown_template, "presentation") slideshowdir = Remark.slideshow("presentation", options = Dict("ratio" => "16:9"), title = "My beautiful slides") # Open presentation in default browser. Remark.open(slideshowdir)
presentation folder will also include a
make.jl file that can be used to automatically rebuild the presentation (it is enough to
Of course, the
make.jl file can be customized to fit your needs, e.g., setting keyword arguments of
Remark.slideshow or activating a
Project.toml file for reproducibility.
It is also possible to use a julia file as a starting point (i.e.,
index.jl), thanks to the Literate package.
As explained in the Literate documentation, add a comment to slides corresponding to markdown. A slide separator is now
# --- for example.
To get started, simple do:
import Remark # Generate a presentation (html+markdown) from the julia template # and save it in the folder "julia_presentation". julia_template = joinpath(dirname(dirname(pathof(Remark))), "examples", "julia") cp(julia_template, "julia_presentation") slideshowdir = Remark.slideshow("julia_presentation", options = Dict("ratio" => "16:9"), title = "My beautiful slides") # Open presentation in default browser. Remark.open(slideshowdir)
External assets, styling, and customization
If you need extra assets, simply add a
assets folder inside
src. It will be copied in the
build folder automatically.
If you want to use a custom stylesheet rather than the default, simply add a
style.css file in your
Your overall folder structure would be:
presentation/ ├── src/ │ └── index.md (or .jl) │ └── style.css │ └── assets/ ├── build/ (generated by the package) │ └── index.html │ └── style.css │ └── assets/
The title of the presentation can be customized via the
Remark.js options can be set using the
Documenter is run on the markdown by default: to keep the markdown as is, use
All features of Documenter are automatically available here, for example use
# hideat the end of a line of code for it to not appear in the slideshow (useful for saving plots, see example).