Giter Club home page Giter Club logo

remark.jl's Introduction

Remark

Build Status codecov.io

A simple Julia package to create presentations from markdown using Remark.

Example use

To install type the following command in the Julia Pkg REPL

(v1.0) pkg> add Remark

Check out the Remark docs on how to write the markdown for a Remark slideshow. The most important thing is to use --- to separate slides; an example markdown file can be found here.

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)

The presentation folder will also include a make.jl file that can be used to automatically rebuild the presentation (it is enough to include it). 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 src folder. 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 title keyword. Remark.js options can be set using the options keyword. Documenter is run on the markdown by default: to keep the markdown as is, use documenter=false.

Features

  • The slideshow command creates a slideshow that uses local javascript libraries: the resulting presentation folder can be opened offline.

  • All features of Documenter are automatically available here, for example use # hide at the end of a line of code for it to not appear in the slideshow (useful for saving plots, see example).

remark.jl's People

Contributors

github-actions[bot] avatar fredrikekre avatar gstavrinos avatar juliatagbot avatar oxinabox avatar piever avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.