在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:yjwen/org-reveal开源软件地址:https://github.com/yjwen/org-reveal开源编程语言:Emacs Lisp 92.3%开源软件介绍:Introduction to Org-RevealTable of ContentsTitle links are for viewing within org-mode buffer only. Github viewers please use the =(gh)= links.
Reveal.js and Org-Reveal
Requirements and Installation
Install Reveal.jsDownload Reveal.js packages from here. Extract Reveal.js folders from the downloaded zip file. If you do not wish to download reveal.js yourself and would rather get a copy from a CDN, see the section Set the location of Reveal.js Install org-reveal from MELPAThe easiest way to install org-reveal is to install package ox-reveal from MELPA. Please refer to http://melpa.org/#/getting-started for using MELPA. Note: It is suggested to use the Org ELPA archive in pair with the ox-reveal packages. Emacs builtin Org-mode package may be out of date for MELPA’s ox-reveal. Install org-reveal from GitHubYou can also install the latest developing version of org-reveal directly from GitHub. Please download the latest Org-reveal package from the Org-reveal GitHub page. Or clone the GitHub repository: git clone https://github.com/yjwen/org-reveal.git Copy (require 'ox-reveal) Note: It is suggested to use the Org-mode git repository in pair with the GitHub org-reveal. Please get the Org-mode git repository by: $ git clone https://code.orgmode.org/bzg/org-mode Follow the online instruction for building and installing Org-mode. ConfigurationSet the location of Reveal.jsOrg-reveal must know where Reveal.js is on your computer before exporting Org contents. The location of Reveal.js is the path to the top directory of the Reveal.js packages, the directory which contains file README.md, but not the one that contains the file reveal.js. The default location is Changing (setq org-reveal-root "file:///d:/reveal.js") IMPORTANT: the absolute path to Reveal.js should be in URL form,
“file:///path_to_reveal.js”, as illustrated above. By setting
option #+REVEAL_ROOT: file:///d:/reveal.js
Set your #+REVEAL_ROOT: https://cdn.jsdelivr.net/npm/reveal.js
Url form for file locationFor example if you cloned this repository to your home directory, this file in Mac OS X would be referred to as “file:///Users/username/org-reveal/readme.org”. This file in Ubuntu would be “file:///home/username/org-reveal/readme.org” and in Windows this file would be “file:///c:/Users/username/org-reveal/readme.org”. For more detail on this standard please refer to http://en.wikipedia.org/wiki/File_URI_scheme First TryTo load Org-reveal, type “M-x load-library”, then type “ox-reveal”. Now you can export this manual into Reveal.js presentation by typing “C-c C-e R R”. Open the generated “Readme.html” in your browser and enjoy the cool slides. The HLevelOrg-reveal maps each heading and its contents to one Reveal.js slide. Since Reveal.js arranges slides into a 2-dimensional matrix, Org-reveal use a HLevel value to decide whether to map headings to horizontal or vertical slides.
HLevel’s default value is 1, means only level 1 headings are arranged horizontally. Deeper headings are mapped to vertical slides below their parent level 1 heading. HLevel’s Effects on Slides LayoutAssume we have a simple Org file as below: * H1
* H2
** H2.1
*** H2.1.1
* H3
If HLevel is 1, the default value, headings H2.1 and H2.1.1 will be mapped to vertical slides below the slides of heading H2. If HLevel is changed to 2, slides of heading H2.1 will be changed to the main horizontal queue, and slides of heading H2.1.1 will be a vertical slide below it. Configure HLevel’s Value
(setq org-reveal-hlevel 2)
#+REVEAL_HLEVEL: 2
Force SplitIf one heading has too many things to fit into one slide, you can split the contents into multiple vertical slides manually, by inserting #+REVEAL: split
Now a new slide begins after To repeat the heading title on the split slide, please insert
Select ThemeTheme is set globally throughout the whole file by setting option
Slide transition style is set by initialization option For an example, please check the heading part of this document. Available themes can be found in “css/theme/” in the reveal.js directory. Available transitions are: default|cube|page|concave|zoom|linear|fade|none. Set The Title SlideBy default, Org-reveal generates a title slide displaying the title, the author, the Email, the date and the time-stamp of the Org document, controlled by Org’s export settings. To avoid a title slide, please set variable
To restore the default title slide, please set variable
Customize the Title SlideThere are 3 ways to customize the title slide.
The following escaping characters can be used to retrieve document information:
Title Slide StateUsing this option allows to thoroughly change the style of the title slide:
Set Slide BackgroundSlide background can be set to a color, an image, a repeating image array or an iframe by setting heading properties. Single Colored BackgroundSet property *** Single Colored Background
:PROPERTIES:
:reveal_background: #123456
:END:
Single Image BackgroundSet property *** Single Image Background
:PROPERTIES:
:reveal_background: ./images/whale.jpg
:reveal_background_trans: slide
:END:
Repeating Image BackgroundResize background image by setting property
Set property *** Repeating Image Background
:PROPERTIES:
:reveal_background: ./images/whale.jpg
:reveal_background_size: 200px
:reveal_background_repeat: repeat
:reveal_background_opacity: 0.2
:END:
Iframe backgroundWhen :PROPERTIES:
:reveal_background_iframe: https://hakim.se
:reveal_background: rgb(0,0,0)
:reveal_background_opacity: 0.8
:END:
Title Slide Background ImageTo set the title slide’s background image, please specify the following options:
Table of Contents Slide Background ImageTo set the (automatically generated) table of contents slide’s background image, please specify the following options:
Background for all slidesYou can also configure the background for all slides in the presentation with:
Refer to the Set slide background section for instructions on how to use each parameter. Slide SizeReveal.js scales slides to best fit the display resolution, but you can
also specify the desired size by settings the option tags The scaling behavior can also be constrained by setting following options:
Slide NumberingTo enable slide numbers, please add the following Reveal.js initial option. #+REVEAL_INIT_OPTIONS: slideNumber:true
Other possible choice for slide numbers are:
Slide Header/FooterSpecify Slide header/footer globally by Fragmented ContentsMake contents fragmented (show up one-by-one) by setting option
Paragraphs can be fragmented.
Pictures, tables and many other HTML elements can be fragmented. Fragment StylesAvailable fragment styles are:
Setting Fragment IndexFragment sequence can be changed by assigning adding And, this paragraph shows at last. This paragraph shows secondly. This paragraph shows at first. List Fragments
To define fragment styles for every list item, please enumerate each item’s style in a lisp list.
Custom fragment sequence should also be enumerated for each list item. An example: #+ATTR_REVEAL: :frag (grow shrink roll-in fade-out none) :frag_idx (4 3 2 1 -)
* I will grow.
* I will shrink.
* I rolled in.
* I will fade out.
* I don't fragment.
When there is #+ATTR_REVEAL: :frag (appear)
* I appear.
* I appear.
* I appear.
Initialization optionsUse Third-Party PluginsReveal.js is also extensible through third-party plugins. Org-reveal
provides a customizable variable (setq org-reveal-external-plugins '((RevealMenu . "path/to/reveal.js-menu/menu.js")) Plugins can be specified in buffer by one or more
#+REVEAL_EXTERNAL_PLUGINS: (plugin1 . "ex/plugin1.js") (plugin2 . "ex/plugin2.js")
#+REVEAL_EXTERNAL_PLUGINS: (plugin3 "ex/plugin3-1.js" "ex/plugin3-2.js")
At most one Highlight Source CodeThere are two ways to highlight source code.
To Use your Emacs theme, please make sure Below is an example of highlighted lisp code from org-reveal. (defun org-reveal--read-file (file)
"Return the content of file"
(with-temp-buffer
(insert-file-contents-literally file)
(buffer-string))) If you saw odd indentation, please set variable Using highlight.jsYou can also use highlight.js, by adding #+REVEAL_PLUGINS: (highlight)
The default highlighting theme is 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 #+ATTR_REVEAL: :code_attribs data-line-numbers='1|3'
#+BEGIN_SRC c++
int main()
{
cout << "Hello" << endl;
}
#+END_SRC
Auto-AnimateTo enable auto-animate, please add * Heading 1
:PROPERTIES:
:REVEAL_EXTRA_ATTR: data-auto-animate
:END:
#+ATTR_REVEAL: :data_id foo
#+begin_src js
let index = 1
#+end_src
* Heading 2
:PROPERTIES:
:REVEAL_EXTRA_ATTR: data-auto-animate
:END:
#+ATTR_REVEAL: :data_id foo
#+begin_src js
let index = 1
let value = 2
#+end_src
Editable Source CodeIt 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:
This feature is turned off by default and needs to be switched on with MathJaxLateX equation are rendered in native HTML5 contents. IMPORTANT: Displaying equations requires internet connection to
mathjax.org or local MathJax installation. For local MathJax
installation, set option Note: Option Preamble and PostambleYou can define preamble and postamble contents which will not be shown as slides, but will be exported into the body part of the generated HTML file, at just before and after the slide contents. Change preamble and postamble contents globally by setting variable
Change preamble and postamble contents locally by setting options
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论