Author: Thomas Pasch
This is a simple template for setting up slides based on the great asciidoctor-reveal project.
Some feature supported by this template/example:
- mathjax support (from reveal plugin)
- highlight.js support (from reveal plugin)
- embedded markdown support (from reveal plugin)
- footer support
Initial setup:
npm install
For converting a presentation:
node ad-reveal.js <presentation.adoc>
The resulting *.html
file only renders in browser if served by a server. Therefore:
./node_modules/.bin/light-server -s . -p 4000
and direct your browser to http://localhost:4000
presentation.adoc
contains basic use-cases- https://github.com/asciidoctor/asciidoctor-reveal.js/tree/master/examples contains more feature-specific examples
- https://github.com/hakimel/reveal.js/tree/master/examples contains reveal examples (no asciidoc!)
- https://docs.asciidoctor.org/asciidoctor.js/latest/processor/convert-options/ (asciidoctor.js)
- https://docs.asciidoctor.org/reveal.js-converter/latest/converter/revealjs-options/ (asciidoctor-reveal.js)
- https://revealjs.com/config/ (reveal.js)
- https://docs.asciidoctor.org/asciidoctor.js/latest/extend/ (asciidoctor.js)
- https://docs.asciidoctor.org/reveal.js-converter/latest/converter/revealjs-plugins/ (asciidoctor-reveal.js)
- https://revealjs.com/plugins/ (reveal.js)
The reveal PDF method is not working. Use decktape
- but with the generic
method as is:
mkdir screenshots
./node_modules/.bin/decktape generic --screenshots-size 1024x768 --screenshots -s 1024x768 --chrome /usr/bin/google-chrome http://localhost:4000/presentation.html presentation.pdf
Problems related to reveal:
Problems related to asciidoctor:
But I could not get this to work...
You can find the reveal version used by opening
https://github.com/asciidoctor/asciidoctor-reveal.js/blob/v4.1.0/package.json
in your browser. For example, for @asciidoctor/reveal
version 4.1.0, reveal.js
version 3.9.2 is
used. To use reveal.js
version 4, you have to wait for @asciidoctor/reveal
version 5.
If stem is included, there will be the following code included into the Html:
<script type="text/x-mathjax-config">MathJax.Hub.Config({
tex2jax: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
ignoreClass: "nostem|nolatexmath"
},
asciimath2jax: {
delimiters: [["\\$", "\\$"]],
ignoreClass: "nostem|noasciimath"
},
TeX: { equationNumbers: { autoNumber: "none" } }
});</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
- https://github.com/asciidoctor/asciidoctor.js/blob/master/CONTRIBUTING-CODE.adoc
- https://docs.asciidoctor.org/reveal.js-converter/latest/project/hacking/
- https://medium.com/@AidThompsin/how-to-npm-link-to-a-local-version-of-your-dependency-84e82126667a (npm)
- https://www.viget.com/articles/how-to-use-local-unpublished-node-packages-as-project-dependencies/ (yarn)
light-server
is deprecated, use https://github.com/johnpapa/lite-server or https://vitejs.dev/guide/- Automatic build would be great! Perhaps https://github.com/yuanchuan/node-watch or https://github.com/remy/nodemon could help.
- (pdf-print)[https://revealjs.com/pdf-export/] does not work. Find out why (or use https://github.com/astefanutti/decktape).
- Enable additional plugins from https://github.com/asciidoctor/asciidoctor-reveal.js/tree/master/examples/revealjs-plugins
- https://asciidoctor.org/docs/asciidoctor-revealjs/
- https://github.com/asciidoctor/asciidoctor-reveal.js/
- https://docs.asciidoctor.org/reveal.js-converter/latest/
- https://docs.asciidoctor.org/reveal.js-converter/latest/setup/node-js-setup/
- https://revealjs.com/math/ reveal.js math support documentation
- https://github.com/rajgoel/reveal.js-plugins collection of plugins for reveal
- https://github.com/Ardemius/asciidoctor-presentation (old) Some tips and tricks using asciidoctor in conjuction with docker, DZSlides or deck.js.