From 60f6c3a3d2c59b3475787a951da27a1c0238b40d Mon Sep 17 00:00:00 2001 From: Yujie Wen Date: Tue, 3 Mar 2020 17:01:36 +0800 Subject: [PATCH] Fixed #409. docs for enabling line numbers for highlight.js --- Readme.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Readme.org b/Readme.org index c75fddf..e047b05 100644 --- a/Readme.org +++ b/Readme.org @@ -619,6 +619,19 @@ can have one optional ~%s~ to be replaced by ~reveal-root~. The "%r" in the given CSS file name will be replaced by Reveal.js' URL. + Reveal.js supports to enable line numbers and highlighting on + given line numbers. Please use ~:code_attribs~ to pass [[https://github.com/hakimel/reveal.js#line-numbers--highlights][the proper + attributes]] to the source code block . Below is an example. +#+BEGIN_SRC org +,#+ATTR_REVEAL: :code_attribs data-line-numbers='1|3' +,#+BEGIN_SRC c++ +int main() +{ + cout << "Hello" << endl; +} +,#+END_SRC +#+END_SRC + ** Editable Source Code It is now possible to embed code blocks in a codemirror instance in order to edit code during a presentation. At present, this capacity is turned on or off at time export using these defcustoms: - ~org-reveal-klipsify-src~