Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1137 lines
49 KiB

4 years ago
  1. # Local IspellDict: en
  2. #+Title: Introduction to org-re-reveal
  3. #+Author: Yujie Wen and others
  4. #+KEYWORDS: org mode, reveal.js, presentation, HTML, slide show, org-re-reveal, emacs-reveal, OER
  5. #+DESCRIPTION: Readme for org-re-reveal to generate HTML/reveal.js presentations from Org mode source files.
  6. # SPDX-License-Identifier: GPL-3.0-or-later
  7. # Authors: Yujie Wen <yjwen.ty@gmail.com> and contributors to
  8. # org-reveal and org-re-reveal, see there:
  9. # https://github.com/yjwen/org-reveal/commits/master
  10. # https://gitlab.com/oer/org-re-reveal/commits/master
  11. # Copyright (C) 2013-2018 Yujie Wen and contributors to org-reveal, see:
  12. # https://github.com/yjwen/org-reveal/commits/master
  13. # Copyright (C) 2017-2019 Jens Lechtenbörger
  14. # Copyright (C) 2019 Ayush Goyal <perfectayush@gmail.com>
  15. #+OPTIONS: reveal_center:t reveal_progress:t reveal_history:nil reveal_control:t
  16. #+OPTIONS: reveal_rolling_links:t reveal_keyboard:t reveal_overview:t num:nil
  17. #+OPTIONS: reveal_width:1400 reveal_height:1000
  18. #+OPTIONS: toc:1
  19. #+OPTIONS: reveal_klipsify_src:t
  20. #+REVEAL_MIN_SCALE: 1.0
  21. #+REVEAL_MAX_SCALE: 1.0
  22. #+REVEAL_PLUGINS: (notes search zoom)
  23. #+REVEAL_MARGIN: 0.1
  24. #+REVEAL_TRANS: cube
  25. #+REVEAL_THEME: black
  26. #+REVEAL_HLEVEL: 2
  27. #+REVEAL_HEAD_PREAMBLE: <meta name="description" content="Org-re-reveal Introduction.">
  28. #+REVEAL_POSTAMBLE: <p> Based upon work by yjwen. </p>
  29. #+REVEAL_EXTRA_CSS: ./local.css
  30. * Note
  31. The project /org-re-reveal/ is a
  32. [[https://github.com/lechten/org-reveal][fork of org-reveal]].
  33. It provides an export back-end for HTML presentations with
  34. [[https://revealjs.com/][reveal.js]] from
  35. [[https://orgmode.org/][Org mode]] source files.
  36. For a /reveal.js/ presentation for
  37. [[https://gitlab.com/oer/org-re-reveal/blob/master/Readme.org][this Readme (which is written in the lightweight markup language Org mode)]],
  38. see there: [[https://oer.gitlab.io/org-re-reveal/]]
  39. ** Emacs-reveal
  40. If you are interested in /org-re-reveal/, I suggest that you take
  41. a look at [[https://gitlab.com/oer/emacs-reveal][emacs-reveal]], which
  42. embeds /org-re-reveal/, /reveal.js/, and useful
  43. plugins as submodules, combined with suitable Emacs configuration.
  44. A [[https://gitlab.com/oer/emacs-reveal-howto][Howto for the generation of reveal.js presentations (slides with audio) with emacs-reveal]]
  45. exists as well.
  46. I use /emacs-reveal/ to generate Open Educational Resources (OER), and
  47. macros coming with /emacs-reveal/ simplify license attribution for
  48. embedded figures considerably:
  49. [[https://oer.gitlab.io/OS/][OER presentations for a course on operating systems]]
  50. ** Relationships between packages
  51. | Package | Description |
  52. |-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------|
  53. | [[https://github.com/yjwen/org-reveal][org-reveal]] | Origin of org-re-reveal |
  54. | [[https://gitlab.com/oer/org-re-reveal][org-re-reveal]] | Fork of org-reveal, initially to add audio fragments, now with [[https://gitlab.com/oer/org-re-reveal/blob/master/CHANGELOG.org][various changes]] |
  55. | [[https://gitlab.com/oer/org-re-reveal-ref][org-re-reveal-ref]] | Addon to org-re-reveal for bibliography slide based on [[https://github.com/jkitchin/org-ref][org-ref]] |
  56. | [[https://gitlab.com/oer/oer-reveal][oer-reveal]] | Export backend derived from org-re-reveal; functionality for installation of reveal.js and plugins; simplification of licensing for OER |
  57. | [[https://gitlab.com/oer/emacs-reveal/][emacs-reveal]] | Bundling of org-re-reveal, org-re-reveal-ref, and oer-reveal |
  58. Originally, /emacs-reveal/ was created to enhance /org-reveal/, and it
  59. contained the code of what is now maintained separately as
  60. /org-re-reveal-ref/ and /oer-reveal/. Those packages were separated
  61. to make as much of /emacs-reveal/ available on MELPA as possible.
  62. Whether anyone wants to use those package in isolation is up to them.
  63. ** Changelog
  64. See file [[https://gitlab.com/oer/org-re-reveal/tree/master/CHANGELOG.org][CHANGELOG]]
  65. for changes of org-re-reveal compared to org-reveal and onward
  66. ** Side note: Customization of variables
  67. - GNU Emacs can be customized in various ways, and /org-re-reveal/
  68. is no exception in that regard.
  69. - This Readme frequently suggests “to customize” some variables.
  70. - You may want to read the
  71. [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Customization.html][manual entry on customization]].
  72. - As shortcut
  73. - Type ~C-h v~ (which means press the ~Ctrl~ key and ~h~
  74. simultaneously, then ~v~). You are asked for a variable name.
  75. Enter it, e.g., ~org-re-reveal-script-files~. You wind up in a
  76. help buffer, showing the current value and a “customize” link.
  77. Enter/press the link, leading to a customization buffer, where
  78. you can change the value and “Apply” (or “Apply and
  79. Save”) it.
  80. * Reveal.js and org-re-reveal
  81. - [[https://revealjs.com/][Reveal.js]] is a tool for creating
  82. good-looking HTML presentations, authored by
  83. [[https://hakim.se/][Hakim El Hattab]].
  84. - Org-re-reveal exports your [[https://orgmode.org/][Org mode]]
  85. documents to reveal.js presentations.
  86. With org-re-reveal, you can create beautiful presentations with 3D
  87. effects from simple but powerful Org contents.
  88. * Requirements and Installation
  89. - Reveal.js
  90. - GNU Emacs, version 24.4 or later
  91. - Org mode
  92. - Org-re-reveal
  93. - Htmlize or highlight.js
  94. - For source code highlighting, which is explained below
  95. - Depending on your version of Org mode, htmlize.el may be
  96. necessary even if you want to use highlight.js
  97. ** Install reveal.js
  98. *Note:* This is only necessary if you do not use [[https://gitlab.com/oer/emacs-reveal][emacs-reveal]],
  99. which installs and configures reveal.js with several of it plugins.
  100. Download reveal.js packages from [[https://github.com/hakimel/reveal.js/][here]].
  101. Extract reveal.js folders from the downloaded zip file.
  102. If you do not wish to download reveal.js yourself and would rather get a copy from a CDN,
  103. see the section [[https://gitlab.com/oer/org-re-reveal#set-the-location-of-revealjs][Set the location of reveal.js]]
  104. ** Install org-re-reveal from MELPA
  105. Package org-re-reveal is available on MELPA. Use of MELPA requires
  106. some setup code in your ~.emacs~ file.
  107. See [[https://melpa.org/#/getting-started][here how to get started with MELPA]].
  108. This package defines the Org export back-end ~re-reveal~. As usual
  109. for export back-ends, you can either customize
  110. ~org-export-backends~ to include ~re-reveal~ or add the following
  111. to your ~.emacs~ file.
  112. #+BEGIN_SRC lisp
  113. (require 'org-re-reveal)
  114. #+END_SRC
  115. ** Install org-re-reveal from GitLab
  116. You can download org-re-reveal as archive from GitLab
  117. ([[https://gitlab.com/oer/org-re-reveal/-/archive/master/org-re-reveal-master.zip][zip archive]]
  118. and several ~tar~ variants; note the download icon on the
  119. [[https://gitlab.com/oer/org-re-reveal][project page]]).
  120. Alternatively, you can clone the
  121. [[https://gitlab.com/oer/org-re-reveal][repository of org-re-reveal]]:
  122. #+BEGIN_SRC sh
  123. git clone https://gitlab.com/oer/org-re-reveal.git
  124. #+END_SRC
  125. Add the directory of =org-re-reveal.el= to your Emacs's ~load-path~, and add the
  126. following statement to your =.emacs= file.
  127. #+BEGIN_SRC lisp
  128. (require 'org-re-reveal)
  129. #+END_SRC
  130. *Note*: It is suggested to use a recent version of Org mode with
  131. org-re-reveal. [[https://orgmode.org/][Installation of Org mode.]]
  132. * Configuration
  133. ** Options and Plug-ins
  134. All options, keywords, and customizable variables of org-re-reveal are
  135. shown in the following table, with hints on the next slide.
  136. | Option | Keyword | Variable |
  137. |-----------------------------------+----------------------------------------------+------------------------------------------|
  138. | ~reveal_center~ | ~nil~ | ~org-re-reveal-center~ |
  139. | ~reveal_control~ | ~nil~ | ~org-re-reveal-control~ |
  140. | ~reveal_defaulttiming~ | ~nil~ | ~org-re-reveal-defaulttiming~ |
  141. | ~reveal_fragmentinurl~ | ~nil~ | ~org-re-reveal-fragmentinurl~ |
  142. | ~reveal_generate_ids~ | ~nil~ | ~org-re-reveal-generate-custom-ids~ |
  143. | ~reveal_hashonebasedindex~ | ~nil~ | ~org-re-reveal-hashonebasedindex~ |
  144. | ~reveal_height~ | ~nil~ | ~org-re-reveal-height~ |
  145. | ~reveal_history~ | ~nil~ | ~org-re-reveal-history~ |
  146. | ~reveal_inter_presentation_links~ | ~nil~ | ~org-re-reveal-inter-presentation-links~ |
  147. | ~reveal_keyboard~ | ~nil~ | ~org-re-reveal-keyboard~ |
  148. | ~reveal_klipsify_src~ | ~nil~ | ~org-re-reveal-klipsify-src~ |
  149. | ~reveal_mousewheel~ | ~nil~ | ~org-re-reveal-mousewheel~ |
  150. | ~reveal_overview~ | ~nil~ | ~org-re-reveal-overview~ |
  151. | ~reveal_pdfseparatefragments~ | ~nil~ | ~org-re-reveal-pdfseparatefragments~ |
  152. | ~reveal_progress~ | ~nil~ | ~org-re-reveal-progress~ |
  153. | ~reveal_rolling_links~ | ~nil~ | ~org-re-reveal-rolling-links~ |
  154. | ~reveal_single_file~ | ~nil~ | ~org-re-reveal-single-file~ |
  155. | ~reveal_global_footer~ | ~nil~ | ~org-re-reveal-global-footer~ |
  156. | ~reveal_global_header~ | ~nil~ | ~org-re-reveal-global-header~ |
  157. | ~reveal_slide_number~ | ~nil~ | ~org-re-reveal-slide-number~ |
  158. | ~reveal_toc_footer~ | ~nil~ | ~org-re-reveal-toc-footer~ |
  159. | ~reveal_subtree_with_title_slide~ | ~nil~ | ~org-re-reveal-subtree-with-title-slide~ |
  160. | ~reveal_width~ | ~nil~ | ~org-re-reveal-width~ |
  161. | ~nil~ | ~REVEAL_ACADEMIC_TITLE~ | ~nil~ |
  162. | ~nil~ | ~REVEAL_CODEMIRROR_CONFIG~ | ~org-re-reveal-klipse-codemirror~ |
  163. | ~nil~ | ~REVEAL_DEFAULT_FRAG_STYLE~ | ~org-re-reveal-default-frag-style~ |
  164. | ~nil~ | ~REVEAL_DEFAULT_SLIDE_BACKGROUND~ | ~nil~ |
  165. | ~nil~ | ~REVEAL_DEFAULT_SLIDE_BACKGROUND_SIZE~ | ~nil~ |
  166. | ~nil~ | ~REVEAL_DEFAULT_SLIDE_BACKGROUND_POSITION~ | ~nil~ |
  167. | ~nil~ | ~REVEAL_DEFAULT_SLIDE_BACKGROUND_REPEAT~ | ~nil~ |
  168. | ~nil~ | ~REVEAL_DEFAULT_SLIDE_BACKGROUND_TRANSITION~ | ~nil~ |
  169. | ~nil~ | ~REVEAL_EXTERNAL_PLUGINS~ | ~org-re-reveal-external-plugins~ |
  170. | ~nil~ | ~REVEAL_EXTRA_ATTR~ | ~org-re-reveal-extra-attr~ |
  171. | ~nil~ | ~REVEAL_EXTRA_CSS~ | ~org-re-reveal-extra-css~ |
  172. | ~nil~ | ~REVEAL_EXTRA_JS~ | ~org-re-reveal-extra-js~ |
  173. | ~nil~ | ~REVEAL_EXTRA_OPTIONS~ | ~org-re-reveal-extra-options~ |
  174. | ~nil~ | ~REVEAL_EXTRA_SCRIPTS~ | ~org-re-reveal-extra-scripts~ |
  175. | ~nil~ | ~REVEAL_HEAD_PREAMBLE~ | ~org-re-reveal-head-preamble~ |
  176. | ~nil~ | ~REVEAL_INIT_SCRIPT~ | ~org-re-reveal-init-script~ |
  177. | ~nil~ | ~REVEAL_HIGHLIGHT_CSS~ | ~org-re-reveal-highlight-css~ |
  178. | ~nil~ | ~REVEAL_HIGHLIGHT_URL~ | ~org-re-reveal-highlight-url~ |
  179. | ~nil~ | ~REVEAL_HLEVEL~ | ~nil~ |
  180. | ~nil~ | ~REVEAL_KLIPSE_CSS_URL~ | ~org-re-reveal-klipse-css~ |
  181. | ~nil~ | ~REVEAL_KLIPSE_EXTRA_CONFIG~ | ~org-re-reveal-klipse-extra-config~ |
  182. | ~nil~ | ~REVEAL_KLIPSE_JS_URL~ | ~org-re-reveal-klipse-js~ |
  183. | ~nil~ | ~REVEAL_KLIPSE_SETUP~ | ~org-re-reveal-klipse-setup~ |
  184. | ~nil~ | ~REVEAL_MARGIN~ | ~org-re-reveal-margin~ |
  185. | ~nil~ | ~REVEAL_MATHJAX_URL~ | ~org-re-reveal-mathjax-url~ |
  186. | ~nil~ | ~REVEAL_MAX_SCALE~ | ~org-re-reveal-max-scale~ |
  187. | ~nil~ | ~REVEAL_MIN_SCALE~ | ~org-re-reveal-min-scale~ |
  188. | ~nil~ | ~REVEAL_MISCINFO~ | ~nil~ |
  189. | ~nil~ | ~REVEAL_MULTIPLEX_ID~ | ~org-re-reveal-multiplex-id~ |
  190. | ~nil~ | ~REVEAL_MULTIPLEX_SECRET~ | ~org-re-reveal-multiplex-secret~ |
  191. | ~nil~ | ~REVEAL_MULTIPLEX_SOCKETIO_URL~ | ~org-re-reveal-multiplex-socketio-url~ |
  192. | ~nil~ | ~REVEAL_MULTIPLEX_URL~ | ~org-re-reveal-multiplex-url~ |
  193. | ~nil~ | ~REVEAL_PLUGINS~ | ~org-re-reveal-plugins~ |
  194. | ~nil~ | ~REVEAL_POSTAMBLE~ | ~org-re-reveal-postamble~ |
  195. | ~nil~ | ~REVEAL_PREAMBLE~ | ~org-re-reveal-preamble~ |
  196. | ~nil~ | ~REVEAL_ROOT~ | ~org-re-reveal-root~ |
  197. | ~nil~ | ~REVEAL_SCRIPT_FILES~ | ~org-re-reveal-script-files~ |
  198. | ~nil~ | ~REVEAL_SLIDE_HEADER~ | ~org-re-reveal-slide-header~ |
  199. | ~nil~ | ~REVEAL_SLIDE_FOOTER~ | ~org-re-reveal-slide-footer~ |
  200. | ~nil~ | ~REVEAL_SPEED~ | ~org-re-reveal-transition-speed~ |
  201. | ~nil~ | ~REVEAL_TALK_QR_CODE~ | ~nil~ |
  202. | ~nil~ | ~REVEAL_TALK_URL~ | ~nil~ |
  203. | ~nil~ | ~REVEAL_THEME~ | ~org-re-reveal-theme~ |
  204. | ~nil~ | ~REVEAL_TITLE_SLIDE~ | ~org-re-reveal-title-slide~ |
  205. | ~nil~ | ~REVEAL_TITLE_SLIDE_BACKGROUND~ | ~nil~ |
  206. | ~nil~ | ~REVEAL_TITLE_SLIDE_STATE~ | ~nil~ |
  207. | ~nil~ | ~REVEAL_TITLE_SLIDE_TIMING~ | ~nil~ |
  208. | ~nil~ | ~REVEAL_TITLE_SLIDE_BACKGROUND_SIZE~ | ~nil~ |
  209. | ~nil~ | ~REVEAL_TITLE_SLIDE_BACKGROUND_POSITION~ | ~nil~ |
  210. | ~nil~ | ~REVEAL_TITLE_SLIDE_BACKGROUND_REPEAT~ | ~nil~ |
  211. | ~nil~ | ~REVEAL_TITLE_SLIDE_BACKGROUND_TRANSITION~ | ~nil~ |
  212. | ~nil~ | ~REVEAL_TOC_SLIDE_STATE~ | ~nil~ |
  213. | ~nil~ | ~REVEAL_TOC_SLIDE_CLASS~ | ~nil~ |
  214. | ~nil~ | ~REVEAL_TOC_SLIDE_TITLE~ | ~org-re-reveal-toc-slide-title~ |
  215. | ~nil~ | ~REVEAL_TRANS~ | ~org-re-reveal-transition~ |
  216. #+REVEAL: split
  217. For documentation of variables, see their doc strings. E.g.,
  218. either invoke ~C-h v~ followed by the name of the variable or
  219. browse the customization group ~org-export-re-reveal~: enter
  220. ~M-x customize-group~, then ~org-export-re-reveal~.
  221. For examples, please refer to the heading part of this document
  222. and to [[https://gitlab.com/oer/org-re-reveal/tree/master/test-cases][test-cases in the GitLab repository]].
  223. Options and keywords that do not have a variable documenting their
  224. effects are explained in this document. Search in reveal.js
  225. presentations is invoked with ~C-S-f~ (which means “Control” and
  226. “Shift” and “f”; curiously, “f” is shown as “F” on keyboards, which
  227. actually is “Shift f”).
  228. Note that =#+REVEAL_EXTRA_OPTIONS: your_comma_separated_options=
  229. and =org-re-reveal-extra-options= allow to specify all
  230. [[https://github.com/hakimel/reveal.js/#configuration][configuration options of reveal.js]].
  231. ** Set the location of reveal.js
  232. org-re-reveal must know where reveal.js is on your computer before
  233. exporting Org contents. You do not have to worry about any of this with
  234. [[https://gitlab.com/oer/emacs-reveal][emacs-reveal]].
  235. The location of reveal.js is the path to
  236. the top directory of the reveal.js packages, the directory which contains
  237. file ~README.md~, but *not* the one that contains the file reveal.js.
  238. The default location is =./reveal.js=, relative to the Org file.
  239. Customize =org-re-reveal-root= to change the location
  240. globally, or use keyword =REVEAL_ROOT= in an individual Org file.
  241. For example, add the following statement to your .emacs file:
  242. #+BEGIN_SRC lisp
  243. (setq org-re-reveal-root "file:///d:/reveal.js")
  244. #+END_SRC
  245. #+REVEAL: split
  246. *IMPORTANT*: If you use absolute paths to reveal.js as illustrated
  247. above, they should be in URL form,
  248. ~file:///path_to_reveal.js~.
  249. #+BEGIN_SRC org
  250. ,#+REVEAL_ROOT: file:///d:/reveal.js
  251. #+END_SRC
  252. You can also set =REVEAL_ROOT= to a URL to use reveal.js from
  253. the web instead of downloading a local copy. The reveal.js
  254. documentation does not recommend this, though.
  255. #+BEGIN_SRC org
  256. ,#+REVEAL_ROOT: https://revealjs.com/
  257. #+END_SRC
  258. *** URL form for file location
  259. For example if you cloned this repository to your home directory,
  260. this file in Mac OS X might be referred to as
  261. ~file:///Users/username/org-re-reveal/Readme.org~. This file in
  262. GNU/Linux could be ~file:///home/username/org-re-reveal/Readme.org~,
  263. in Windows
  264. ~file:///c:/Users/username/org-re-reveal/Readme.org~. For more
  265. details on this standard please refer to
  266. [[https://en.wikipedia.org/wiki/File_URI_scheme]].
  267. ** First Try
  268. The library org-re-reveal needs to be loaded first. That can happen
  269. either by adding ~(require 'org-re-reveal)~ to your ~.emacs~ file or
  270. manually: Type "M-x load-library", then "org-re-reveal".
  271. Now you can export this manual, ~Readme.org~, into a reveal.js
  272. presentation by typing "C-c C-e v v". That key binding can be
  273. changed by customizing ~org-re-reveal-keys~.
  274. Open the generated "Readme.html" in your browser and enjoy the
  275. cool slides. (Of course, the location of reveal.js must be
  276. configured properly, as explained earlier.)
  277. ** Error about head.min.js
  278. Older versions of reveal.js included an initialization file
  279. ~head.min.js~, which does not exist with newer versions. By
  280. default, ~org-re-reveal~ tries to load all files of
  281. ~org-re-reveal-script-files~. If you see an error (in the
  282. browser’s console) that ~lib/js/head.min.js~ does not exist,
  283. customize ~org-re-reveal-script-files~ to remove it.
  284. ** The HLevel
  285. org-re-reveal maps each heading and its contents to one reveal.js
  286. slide. Since reveal.js arranges slides into a 2-dimensional matrix,
  287. org-re-reveal use a *HLevel* value to decide whether to map headings to horizontal
  288. or vertical slides.
  289. * Headings of level less than or equal to *HLevel* are mapped to horizontal
  290. slides.
  291. * Headings with a deeper level are mapped to vertical slides.
  292. HLevel's default value is 1, means only level 1 headings are arranged
  293. horizontally. Deeper headings are mapped to vertical slides below their
  294. parent level 1 heading.
  295. *** HLevel's Effects on Slides Layout
  296. Assume we have a simple Org file as below:
  297. #+BEGIN_SRC org
  298. ,* H1
  299. ,* H2
  300. ,** H2.1
  301. ,*** H2.1.1
  302. ,* H3
  303. #+END_SRC
  304. If HLevel is 1, the default value, headings H2.1 and H2.1.1 will
  305. be mapped to vertical slides below the slides of heading H2.
  306. [[./images/hlevel.png]]
  307. #+REVEAL: split
  308. If HLevel is changed to 2, slides of heading H2.1 will be changed
  309. to the main horizontal queue, and slides of heading H2.1.1 will be
  310. a vertical slide below it.
  311. [[./images/hlevel2.png]]
  312. *** Configure HLevel's Value
  313. * Change variable =org-re-reveal-hlevel='s value to set HLevel globally.
  314. For example, add the following statement to your =.emacs= file.
  315. #+BEGIN_SRC lisp
  316. (setq org-re-reveal-hlevel 2)
  317. #+END_SRC
  318. * Set HLevel within individual Org file with option =REVEAL_HLEVEL=:
  319. #+BEGIN_SRC org
  320. ,#+REVEAL_HLEVEL: 2
  321. #+END_SRC
  322. ** Subheadings
  323. If you want one slide to have its usual heading followed by a
  324. subheading, you can add a ~NOSLIDE~ property (and make sure that
  325. the subheading does not appear in the table of contents):
  326. #+BEGIN_SRC org
  327. ,* A normal slide
  328. ,** A subheading
  329. :PROPERTIES:
  330. :UNNUMBERED: notoc
  331. :NOSLIDE: t
  332. :END:
  333. #+END_SRC
  334. ** Force Split
  335. If one heading has too many things to fit into one slide, you can
  336. split the contents into multiple vertical slides manually, by inserting
  337. #+BEGIN_SRC org
  338. ,#+REVEAL: split
  339. #+END_SRC
  340. #+REVEAL: split data-background="#555555"
  341. Now a new slide begins after the ~#+REVEAL~ keyword.
  342. By default, any background attributes of a slide should remain in
  343. effect for the split parts. In addition, you can
  344. add HTML attributes after ~#+REVEAL: split~, e.g., this slide
  345. uses ~#+REVEAL: split data-background="#555555"~ to set a
  346. background color.
  347. ** Select Theme and Transition
  348. Themes and transition styles are set globally throughout the whole
  349. file by setting options =REVEAL_THEME=, =REVEAL_TRANS=, and =REVEAL_SPEED=.
  350. For an example, please check the heading part of this document.
  351. Note that some themes access remote servers to download fonts.
  352. Your privacy policy should explain this.
  353. Available themes can be found in "css/theme/" in the reveal.js
  354. directory and customized via ~org-re-reveal-theme~.
  355. Available transitions can be found in the
  356. [[https://github.com/hakimel/reveal.js/blob/master/README.md][README of reveal.js]]
  357. and customized via ~org-re-reveal-transition~.
  358. ** Set The Title Slide
  359. By default, org-re-reveal generates a title slide displaying the
  360. title, the author, the Email, the date and the time-stamp of the
  361. Org document, controlled by Org's [[https://orgmode.org/org.html#Export-settings][export settings]].
  362. To avoid a title slide, set variable
  363. ~org-re-reveal-title-slide~ to ~nil~ or add the following header line:
  364. ~#+REVEAL_TITLE_SLIDE:~
  365. *** Customize the Title Slide
  366. To customize the title slide, set ~org-re-reveal-title-slide~
  367. to a string with HTML code. Escape sequences are documented for
  368. variable ~org-re-reveal-title-slide~; they can be used to retrieve
  369. document information. See
  370. [[https://gitlab.com/oer/org-re-reveal/blob/master/test-cases/test-title-slide.org][test-title-slide.org]]
  371. for an example including ~REVEAL_ACADEMIC_TITLE~,
  372. ~REVEAL_TALK_URL~, ~REVEAL_TALK_QR_CODE~
  373. Alternatively, you can also write the title slide's HTML code
  374. (with escape sequences) into a separate file and
  375. set ~org-re-reveal-title-slide~ to the name of that file.
  376. ** Set Slide Background
  377. Slide background can be set to a color, an image, or a repeating image
  378. array by setting heading properties.
  379. Keywords ~REVEAL_DEFAULT_SLIDE_BACKGROUND~, ~REVEAL_DEFAULT_SLIDE_BACKGROUND_POSITION~,
  380. ~REVEAL_DEFAULT_SLIDE_BACKGROUND_REPEAT~, ~REVEAL_DEFAULT_SLIDE_BACKGROUND_SIZE~, and
  381. ~REVEAL_DEFAULT_SLIDE_BACKGROUND_TRANSITION~ can be used to specify
  382. default values for options explained subsequently for individual
  383. slides. Additional keywords ~REVEAL_TITLE_SLIDE_BACKGROUND~,
  384. ~REVEAL_TITLE_SLIDE_BACKGROUND_POSITION~,
  385. ~REVEAL_TITLE_SLIDE_BACKGROUND_REPEAT~,
  386. ~REVEAL_TITLE_SLIDE_BACKGROUND_SIZE~,
  387. ~REVEAL_TITLE_SLIDE_BACKGROUND_TRANSITION~ set those options for
  388. the title slide.
  389. *** Colored Background
  390. :PROPERTIES:
  391. :reveal_background: linear-gradient(to left, #910830, #521623)
  392. :END:
  393. Set property =reveal_background= to either an RGB color value, or any
  394. supported CSS color format.
  395. #+BEGIN_SRC org
  396. ,*** Colored Background
  397. :PROPERTIES:
  398. :reveal_background: linear-gradient(to left, #910830, #521623)
  399. :END:
  400. #+END_SRC
  401. *** Single Image Background - Instructions
  402. Set property =reveal_background= to an URL of background image.
  403. Set property =reveal_background_trans= to =slide= to make background image
  404. sliding rather than fading.
  405. #+BEGIN_SRC org
  406. ,*** Single Image Background - Result
  407. :PROPERTIES:
  408. :reveal_background: ./images/adult-education-3258944_640.jpg
  409. :reveal_background_trans: slide
  410. :END:
  411. #+END_SRC
  412. *** Single Image Background - Result
  413. :PROPERTIES:
  414. :reveal_background: ./images/adult-education-3258944_640.jpg
  415. :reveal_background_trans: slide
  416. :END:
  417. *** Repeating Image Background - Instructions
  418. Resize background image by setting property
  419. =reveal_background_size= to a number.
  420. Set property =reveal_background_repeat= to =repeat= to repeat
  421. image on the background.
  422. #+BEGIN_SRC org
  423. ,*** Repeating Image Background - Result
  424. :PROPERTIES:
  425. :reveal_background: ./images/adult-education-3258944_640.jpg
  426. :reveal_background_size: 200px
  427. :reveal_background_repeat: repeat
  428. :END:
  429. #+END_SRC
  430. *** Repeating Image Background - Result
  431. :PROPERTIES:
  432. :reveal_background: ./images/adult-education-3258944_640.jpg
  433. :reveal_background_size: 200px
  434. :reveal_background_repeat: repeat
  435. :END:
  436. *** Title Slide Background Image
  437. To set the title slide's background image, please specify the
  438. following options:
  439. * =REVEAL_TITLE_SLIDE_BACKGROUND=: A URL to the background image.
  440. * =REVEAL_TITLE_SLIDE_BACKGROUND_SIZE=: HTML size specification, e.g. ~200px~.
  441. * =REVEAL_TITLE_SLIDE_BACKGROUND_REPEAT=: set to ~repeat~ to repeat the image.
  442. ** Slide Size
  443. Reveal.js scales slides to best fit the display resolution, but you can
  444. also specify the desired size by settings the option tags =width= and =height=.
  445. The scaling behavior can also be constrained by setting following
  446. options:
  447. * =#+REVEAL_MARGIN:= :: a float number, the factor of empty area
  448. surrounding slide contents.
  449. * =#+REVEAL_MIN_SCALE:= :: a float number, the minimum scaling down
  450. ratio.
  451. * =#+REVEAL_MAX_SCALE:= :: a float number, the maximum scaling up
  452. ratio.
  453. ** Slide Numbering
  454. By default, the slide number is showed at the lower-right corner of each slide.
  455. To disable slide numbering, please add ~reveal_slide_number:nil~ to the
  456. ~#+OPTIONS:~ line.
  457. From reveal.js 3.1.0, slide numbering can have several custom
  458. formats. To choose one format, please set ~reveal_slide_number~ to
  459. its proper string. For example, ~reveal_slide_number:h/v~.
  460. Supported format strings can be found in the [[https://github.com/hakimel/reveal.js/#slide-number][reveal.js manual]].
  461. ** Slide Header/Footer
  462. Specify slide header/footer by =#+REVEAL_SLIDE_HEADER:= and
  463. =#+REVEAL_SLIDE_FOOTER:=. The option content will be put into
  464. divisions of class =slide-header= and =slide-footer=, so you can
  465. control their appearance in custom CSS file (see [[Extra Stylesheets]]).
  466. By default header/footer content will only display on content
  467. slides. To show them also on the title and toc slide you can add
  468. ~reveal_global_header:t~ and ~reveal_global_footer:t~ to
  469. ~#+OPTIONS:~ line. To show the footer on the toc slide but not on
  470. the title slide, use option ~reveal_toc_footer:t~.
  471. ** Fragmented Contents
  472. Make contents fragmented (show up one-by-one) by setting option
  473. =ATTR_REVEAL= with property ":frag frag-style", as illustrated
  474. below.
  475. #+ATTR_REVEAL: :frag roll-in
  476. Paragraphs can be fragmented.
  477. #+ATTR_REVEAL: :frag roll-in
  478. - Lists can
  479. - be fragmented.
  480. #+ATTR_REVEAL: :frag roll-in
  481. Pictures, tables and many other HTML elements can be fragmented.
  482. *** Fragment Styles
  483. Available fragment styles are:
  484. #+ATTR_REVEAL: :frag t
  485. * grow
  486. * shrink
  487. * roll-in
  488. * fade-out
  489. * highlight-red
  490. * highlight-green
  491. * highlight-blue
  492. * appear
  493. Setting ~:frag t~ will use reveal.js default fragment style, which
  494. can be overridden by local option ~#+REVEAL_DEFAULT_FRAG_STYLE~ or
  495. global variable ~org-re-reveal-default-frag-style~.
  496. *** Fragment Index
  497. Fragment sequence can be changed by assigning adding ~:frag_idx~
  498. property to each fragmented element.
  499. #+ATTR_REVEAL: :frag t :frag_idx 3
  500. And, this paragraph shows at last.
  501. #+ATTR_REVEAL: :frag t :frag_idx 2
  502. This paragraph shows secondly.
  503. #+ATTR_REVEAL: :frag t :frag_idx 1
  504. This paragraph shows at first.
  505. *** List Fragments
  506. ~#+ATTR_REVEAL: :frag frag-style~ above a list defines fragment
  507. style for the list as a whole.
  508. #+ATTR_REVEAL: :frag grow
  509. 1. All items grow.
  510. 2. As a whole.
  511. To define fragment styles for every list item, please enumerate
  512. each item's style in a lisp list.
  513. ~none~ in the style list will disable fragment for the
  514. corresponding list item.
  515. Custom fragment sequence should also be enumerated for each list
  516. item.
  517. #+REVEAL: split
  518. An example:
  519. #+BEGIN_SRC org
  520. ,#+ATTR_REVEAL: :frag (grow shrink roll-in fade-out none) :frag_idx (4 3 2 1 -)
  521. * I will grow.
  522. * I will shrink.
  523. * I rolled in.
  524. * I will fade out.
  525. * I don't fragment.
  526. #+END_SRC
  527. #+ATTR_REVEAL: :frag (grow shrink roll-in fade-out none) :frag_idx (4 3 2 1 -)
  528. * I will grow.
  529. * I will shrink.
  530. * I rolled in.
  531. * I will fade out.
  532. * I don't fragment.
  533. #+REVEAL: split
  534. When there is ~:frag_idx~ specified, insufficient fragment style
  535. list will be extended by its last element. So a ~:frag (appear)~
  536. assigns each item of a list the ~appear~ fragment style.
  537. #+BEGIN_SRC org
  538. ,#+ATTR_REVEAL: :frag (appear)
  539. * I appear.
  540. * I appear.
  541. * I appear.
  542. #+END_SRC
  543. #+ATTR_REVEAL: :frag (appear)
  544. * I appear.
  545. * I appear.
  546. * I appear.
  547. *** List Fragments with Audio
  548. You can also use org-re-reveal in combination with the
  549. audio-slideshow plugin of
  550. [[https://github.com/rajgoel/reveal.js-plugins][reveal.js-plugins]].
  551. For example, when the audio-slideshow plugin is configured
  552. properly, the following plays ~1.ogg~ when the first list item
  553. appears, ~2.ogg~ for the second list item, and no audio for the
  554. third. (You need to add suitable audio files to the current
  555. directory first.)
  556. #+BEGIN_SRC org
  557. ,#+ATTR_REVEAL: :frag (appear) :audio (1.ogg 2.ogg none)
  558. * I appear with audio 1.ogg.
  559. * I appear with audio 2.ogg.
  560. * I appear without audio.
  561. #+END_SRC
  562. #+ATTR_REVEAL: :frag (appear) :audio (1.ogg 2.ogg none)
  563. * I appear with audio 1.ogg.
  564. * I appear with audio 2.ogg.
  565. * I appear without audio.
  566. ** Data State and Classes for Headlines and Slides, including generated ones
  567. :PROPERTIES:
  568. :reveal_data_state: alert
  569. :END:
  570. Set property =reveal_data_state= to a headline to change this
  571. slide's display style. (In the past, ~reveal.min.css~ defined
  572. classes ~alert~, ~blackout~, ~soothe~, which were activated by the
  573. data state.) In any case, property =reveal_data_state= adds a
  574. ~data-state~ attribute to the slide's ~section~ element, which is
  575. called “Slide State” by reveal.js; this might also be useful with
  576. reveal.js plugins.
  577. #+REVEAL: split
  578. To add a ~data-state~ attribute to a generated title slide or
  579. table of contents slide, you can use the following options:
  580. * =REVEAL_TITLE_SLIDE_STATE=
  581. * =REVEAL_TOC_SLIDE_STATE=
  582. To add a ~class~ attribute to a ~section~ element, use
  583. an [[*Extra Slide Attribute][Extra Slide Attribute]]
  584. (e.g., property ~:reveal_extra_attr: class="my-class"~).
  585. To add a ~class~ attribute to the ~section~ element of a generated
  586. table of contents slide, you can use the option
  587. =REVEAL_TOC_SLIDE_CLASS=.
  588. To add a ~class~ attribute to a slide's ~h~-element, add property
  589. =html_headline_class= to the headline.
  590. ** Third-Party Plugins
  591. Reveal.js is also extensible through third-party plugins, which can
  592. be loaded with org-re-reveal. Several plugins are included and
  593. configured with [[https://gitlab.com/oer/emacs-reveal][emacs-reveal]].
  594. The paths to javascript loading code
  595. need to be customized in the variable
  596. ~org-re-reveal-external-plugins~. This variable can be an
  597. associative list or a filename. If it is an associative list the first
  598. element of each Assoc cell is a symbol -- the name of the plugin --
  599. and the second is a string that will be expanded by the ~format~
  600. function when the plugin is loaded. So, this second element should
  601. have the form:
  602. ~" {src: \"%srelative/path/toplugin/from/reveal/root.js\"}"~
  603. If you need the async or callback parameters, include those too.
  604. #+REVEAL: split
  605. If ~org-re-reveal-external-plugins~ is a filename, that file must
  606. contain strings of the above format, one per line (without names of
  607. plugins, just the ~src~ information embedded in braces); this can
  608. also be configured within your Org presentation with a line like
  609. this:
  610. =#+REVEAL_EXTERNAL_PLUGINS: external_plugins.js=
  611. In any case, org-re-reveal will add the plugins to the dependencies
  612. parameter when Reveal is initialized.
  613. ** Highlight Source Code
  614. There are three options to highlight source code (or not), see doc
  615. string of customizable variable ~org-re-reveal-no-htmlize-src~.
  616. 1. Use your Emacs theme with ~htmlize.el~
  617. 2. Use highlight.js
  618. 3. Disable htmlize with above variable, enable on selected source
  619. code blocks
  620. To use your Emacs theme, please make sure ~htmlize.el~ is
  621. installed. Then no more setup is necessary.
  622. If indentation is wrong, maybe set variable =org-html-indent=
  623. to =nil= and/or =org-src-preserve-indentation= to =t=. Then export again.
  624. *** Using highlight.js
  625. You can also use [[https://highlightjs.org][highlight.js]], by adding ~highlight~ to the reveal.js
  626. plugin list.
  627. #+BEGIN_SRC org
  628. ,#+REVEAL_PLUGINS: (highlight)
  629. #+END_SRC
  630. The default highlighting theme is ~zenburn.css~ brought with
  631. reveal.js. To use other themes, please specify the CSS file name by
  632. ~#+REVEAL_HIGHLIGHT_CSS~ or the variable ~org-re-reveal-highlight-css~.
  633. The "%r" in the given CSS file name will be replaced by reveal.js'
  634. URL.
  635. #+MACRO: klipse-languages (eval (message "%s" (mapconcat #'identity org-re-reveal-klipse-languages ", ")))
  636. ** Editable and Executable Source Code
  637. Thanks to [[https://github.com/viebel/klipse][klipse]], it is
  638. possible to embed code blocks in CodeMirror instance in order to
  639. edit and execute code during a presentation. Note that klipse
  640. support has been rewritten in org-re-reveal 1.1.11. Previously,
  641. code was displayed in iframes, which does not allow to share state
  642. between different pieces of code; in particular, SQL did not work
  643. (see [[https://gitlab.com/oer/org-re-reveal/issues/23][this issue]]).
  644. Now, without iframes, some CSS settings of klipse and reveal.js are
  645. in conflict. In particular, scaling needs to be disabled with
  646. klipse. See settings of this Readme and examples in the Tips
  647. section under [[Executable Source Blocks]] as well as that
  648. [[https://gitlab.com/oer/org-re-reveal/blob/master/test-cases/test-klipsify.org][test file]]
  649. to get started.
  650. At present code editing is supported in: {{{klipse-languages}}}
  651. ** MathJax
  652. :PROPERTIES:
  653. :CUSTOM_ID: my-heading
  654. :END:
  655. ${n! \over k!(n-k)!} = {n \choose k}$
  656. LaTeX equations are rendered in native HTML5 contents.
  657. *IMPORTANT*: Displaying equations requires an internet connection
  658. to load JavaScript or a local MathJax installation.
  659. For the latter, set option =REVEAL_MATHJAX_URL= to
  660. the URL pointing to the local MathJax location.
  661. If you use MathJax from a remote location, your privacy policy
  662. should explain this.
  663. ** Preamble and Postamble
  664. You can define preamble and postamble contents which will not be
  665. shown as slides, but will be exported into the body part of the
  666. generated HTML file, at just before and after the slide contents.
  667. Change preamble and postamble contents globally by setting variable
  668. =org-re-reveal-preamble= and =org-re-reveal-postamble=.
  669. Change preamble and postamble contents locally by setting options
  670. =REVEAL_PREAMBLE= and =REVEAL_POSTAMBLE=, as illustrated at the
  671. heading part of this document.
  672. To add custom contents into HTML =<head>= parts, set contents to
  673. variable =org-re-reveal-head-preamble= or option
  674. =REVEAL_HEAD_PREAMBLE=.
  675. *** Generating Pre/Postamble by Emacs-Lisp Functions
  676. If the contents of pre/postamble is the name of an evaluated
  677. Emacs-Lisp function, which must accept an argument of Org mode
  678. info and return a string, the returned string will be taken
  679. as pre/postamble contents.
  680. So you can embed the Emacs-Lisp function as an Org Babel source
  681. block and mark it to be evaluated when exporting the document.
  682. ** Raw HTML in Slides
  683. Besides the Org contents, you can embed raw HTML contents
  684. into slides by placing a =#+REVEAL_HTML= keyword.
  685. A talk by Linus Torvalds on Git (the source code to embed that
  686. video makes use of attribute ~data-src~ for lazy loading of the
  687. video):
  688. #+REVEAL_HTML: <video controls width="400" height="300" data-src="https://archive.org/download/LinusTorvaldsOnGittechTalk/LinusTorvaldsOnGittechTalk.ogv"></video>
  689. ** Speaker Notes
  690. Reveal.js supports speaker notes, which are displayed in a separate
  691. browser window. Pressing 's' on slide's windows opens a popup
  692. window (or indicates if you need to enable this browser feature)
  693. displaying the current slide with its speaker notes, a timer, and a preview
  694. of upcoming contents. To configure timing, see
  695. ~org-re-reveal-defaulttiming~.
  696. The following example shows how to define speaker notes for a slide
  697. with an estimated talk time of 120s.
  698. #+BEGIN_SRC org
  699. ,* Heading 1
  700. :PROPERTIES:
  701. :reveal_extra_attr: data-timing="120"
  702. :END:
  703. Some contents.
  704. ,#+BEGIN_NOTES
  705. Enter speaker notes here.
  706. - With bullet points
  707. - If necessary
  708. ,#+END_NOTES
  709. #+END_SRC
  710. #+REVEAL: split
  711. Speaker note functionality requires that ~notes~ is configured as
  712. plugin (which is true by default with ~org-re-reveal-plugins~) and
  713. that popup windows are permitted.
  714. Due to a bug in reveal.js, sometimes the speaker notes window does
  715. not initialize properly. As workaround, close the speaker notes
  716. windows and press ’s’ again; notes should be working then.
  717. If this does not work, you may need to put the presentation HTML
  718. file into the reveal.js root directory and reopen it in the browser.
  719. *** Easy-Template for Speaker Notes
  720. Org-re-reveal registers 'n' as key for the speaker notes template:
  721. You can press '<' followed by 'n' and then press TAB, which
  722. inserts ~#+begin_notes~ and ~#+end_notes~. For this to work with
  723. Org version 9.2 or newer, you need to place ~(require 'org-tempo)~
  724. into your ~.emacs~ or add ~org-tempo~ to ~org-modules~. (Besides,
  725. function ~org-insert-structure-template~ allows to insert different
  726. kinds of block structures.)
  727. Customize ~org-re-reveal-note-key-char~ to change the default key
  728. 'n'. Set to nil to avoid auto-completion for speaker notes.
  729. ** Multiplexing
  730. Reveal.js supports multiplexing, which allows allows your audience to view
  731. the slides of the presentation you are controlling on their own phone, tablet
  732. or laptop. As the master presentation navigates the slides, all client
  733. presentations will update in real time.
  734. Please see
  735. [[https://gitlab.com/oer/org-re-reveal/blob/master/test-cases/test-multiplex.org][this sample presentation for instructions]].
  736. Briefly, you need to configure ~multiplex~ as plugin, with
  737. URL, ID and Secret of a socket.io server. Then, generate master
  738. (with Secret) and client presentations and publish the client
  739. presentation for your audience.
  740. ** Extra Stylesheets
  741. Set =REVEAL_EXTRA_CSS= to a stylesheet file path in order to load extra custom
  742. styles after loading a theme.
  743. #+BEGIN_SRC org
  744. ,#+REVEAL_EXTRA_CSS: url-to-custom-stylesheet.css
  745. #+END_SRC
  746. ** Select Built-In Scripts
  747. Set option =REVEAL_PLUGINS= or variable =org-re-reveal-plugins= to a
  748. lisp list to activate additional reveal.js functionality.
  749. Variable =org-re-reveal-plugins= allows to select among available plugins.
  750. The following example selects /markdown/, /highlight/, and /search/.
  751. #+BEGIN_SRC org
  752. ,#+REVEAL_PLUGINS: (markdown highlight search)
  753. #+END_SRC
  754. ** Extra JavaScript Libraries
  755. Set =REVEAL_EXTRA_SCRIPTS= to a list of extra JavaScript
  756. libraries of script elements.
  757. #+BEGIN_SRC org
  758. ,#+REVEAL_EXTRA_SCRIPTS: ("filename.js" "<script>Your code here\n</script>")
  759. #+END_SRC
  760. ** Extra Slide Attribute
  761. Set =REVEAL_EXTRA_ATTR= to add any additional attributes to all slides if
  762. required.
  763. #+BEGIN_SRC org
  764. ,#+REVEAL_EXTRA_ATTR: data-autoslide=20000
  765. #+END_SRC
  766. This global default value can also be overridden per heading by setting
  767. =reveal_extra_attr= property on the headings.
  768. #+BEGIN_SRC org
  769. ,*** Heading with overriden autoslide
  770. :PROPERTIES:
  771. :reveal_extra_attr: data-autoslide=10000
  772. :END:
  773. #+END_SRC
  774. ** Export into Single File
  775. By setting option =reveal_single_file= to ~t~, images and basic
  776. reveal.js scripts will be embedded into the exported HTML file, to make
  777. a portable HTML. Please note that remote images will /not/ be included in the
  778. single file, so presentations with remote images will still require an Internet
  779. connection.
  780. Attention: This needs locally available reveal.js files!
  781. #+BEGIN_SRC org
  782. ,#+OPTIONS: reveal_single_file:t
  783. #+END_SRC
  784. #+REVEAL: split
  785. *Limitations* of single file export
  786. * Some functions provided by reveal.js libraries will be
  787. *disabled*, including PDF export, Markdown support, zooming,
  788. speaker notes, and remote control.
  789. * Code highlighting by highlight.js is also disabled, but *code
  790. highlighting by Emacs is not affected.*
  791. * Plugins are *not* enabled.
  792. * CSS needs to be *self-contained*. Neither ~@import~ rules nor
  793. other forms of URLs work (images need to be embedded as
  794. data URIs).
  795. * If you use ~org-re-reveal-title-slide~ with custom HTML code and
  796. images, you need to embed images in the form of data URIs
  797. yourself.
  798. ** Export Current Subtree
  799. Use menu entry "C-c C-e v s" to export only current subtree,
  800. without the title slide and the table of content, for a quick preview
  801. of your current edition.
  802. Customize ~org-re-reveal-subtree-with-title-slide~ to also export a
  803. title slide.
  804. * Tips
  805. ** En-/Disable Heading Numbers
  806. Use Org export option =num=, e.g., =num:t= or =num:nil=:
  807. #+BEGIN_SRC org
  808. ,#+OPTIONS: num:nil
  809. #+END_SRC
  810. With heading numbers (i.e., without ~num:nil~), depending on
  811. ~org-re-reveal-generate-custom-ids~, (more) stable slide IDs can be
  812. generated (instead of hash values that change with content
  813. changes). See doc string (~C-h v~) of variable
  814. ~org-re-reveal-generate-custom-ids~ for more details.
  815. ** Disable Table of Contents
  816. Add =toc:nil= to =#+OPTIONS= to disable the table of contents:
  817. #+BEGIN_SRC org
  818. ,#+OPTIONS: toc:nil
  819. #+END_SRC
  820. This is actually an option recognized by =org-export=.
  821. ** Table of Contents at Specified Position
  822. When using option =toc:nil=, you can also insert a slide with the table
  823. of contents at a position of your choice with keyword =REVEAL_TOC=
  824. (where the number after =headlines= defines the depth of headlines
  825. to include) in a section of its own (see this
  826. [[https://gitlab.com/oer/org-re-reveal/blob/master/test-cases/test-slide-numbers-reveal-toc.org][test file]]):
  827. #+BEGIN_SRC org
  828. ,** Table of Contents
  829. :PROPERTIES:
  830. :UNNUMBERED: notoc
  831. :END:
  832. ,#+REVEAL_TOC: headlines 1
  833. #+END_SRC
  834. *WARNING:* Previous versions of org-re-reveal used keyword =TOC= (which
  835. generates the table of contents in a section with default headline)
  836. instead of =REVEAL_TOC=. Keyword =TOC= may or may not work for you.
  837. Its use is discouraged as it may break some presentations.
  838. ** Internal Links
  839. Reveal.js only supports jumps to entire slides, but not to specific
  840. elements on slides. Thus, we can only link to headlines in an Org
  841. document.
  842. You can create links pointing to a headline's text, or its
  843. custom-id, as in the examples below:
  844. * [[Tips]].
  845. * [[#my-heading][Heading]] with a =CUSTOM_ID= property.
  846. #+REVEAL: split
  847. If you add =reveal_inter_presentation_links:t= to =#+OPTIONS=, such
  848. links also work between presentations on the same server, e.g.,
  849. =[[file:somefile.org::#anchor][link text]]=.
  850. Reveal.js [[https://github.com/hakimel/reveal.js#internal-links][advertises]]
  851. to use broken internal links, which are used in org-re-reveal by
  852. default. (Those links work with reveal.js, but are not understood
  853. by search engines.) If you change ~org-re-reveal--href-fragment-prefix~
  854. from its default to the value of ~org-re-reveal--slide-id-prefix~,
  855. valid links are generated:
  856. #+BEGIN_SRC lisp
  857. (setq org-re-reveal--href-fragment-prefix org-re-reveal--slide-id-prefix)
  858. #+END_SRC
  859. Whether this change is a good idea might be discussed under this
  860. [[https://github.com/hakimel/reveal.js/issues/2276][reveal.js issue]].
  861. ** Custom JS
  862. To pass custom JS code to ~Reveal.initialize~, state the code by
  863. ~#+REVEAL_INIT_SCRIPT~ (multiple statements are concatenated) or by
  864. custom variable ~org-re-reveal-init-script~.
  865. ** Executable Source Blocks
  866. To allow live execution of code in some languages, enable the
  867. klipse plugin
  868. with variable ~org-re-reveal-klipsify-src~ (or with option ~reveal_klipsify_src:t~)
  869. Src blocks with the languages contained in
  870. ~org-re-reveal-klipse-setup~ will be executed with output shown in
  871. a console-like environment. See
  872. [[https://github.com/viebel/klipse#klipse][the README of klipse]]
  873. for more details.
  874. Additional examples (e.g., Python and SQL) can be found in a
  875. [[https://gitlab.com/oer/org-re-reveal/blob/master/test-cases/test-klipsify.org][test file]].
  876. *** HTML Src Block
  877. #+BEGIN_SRC html
  878. <h1 class="whatever">hello, what's your name</h1>
  879. #+END_SRC
  880. *** Javascript Src Block
  881. #+BEGIN_SRC js
  882. console.log("success");
  883. var x='string using single quote';
  884. x
  885. #+END_SRC
  886. *** Perl Src Block (not klipsified)
  887. #+BEGIN_SRC perl
  888. I don't know perl!
  889. #+END_SRC
  890. * Thanks
  891. Courtesy to:
  892. #+ATTR_REVEAL: :frag roll-in
  893. The powerful Org mode,
  894. #+ATTR_REVEAL: :frag roll-in
  895. the impressive reveal.js
  896. #+ATTR_REVEAL: :frag roll-in
  897. and the precise MathJax