mirror of
https://github.com/yjwen/org-reveal.git
synced 2024-06-24 07:26:35 +02:00
Merge pull request #5 from gcv/master
Hi, Constantine, Thanks for your suggestion and codes!
This commit is contained in:
commit
a7269c2007
17
Readme.org
17
Readme.org
|
@ -2,7 +2,7 @@
|
|||
#+Author: Yujie Wen
|
||||
#+Email: yjwen.ty@gmail.com
|
||||
|
||||
#+OPTIONS: reveal_center:t reveal_progress:t reveal_history:nil reveal_control:t reveal_mathjax:t num:nil
|
||||
#+OPTIONS: reveal_center:t reveal_progress:t reveal_history:nil reveal_control:t reveal_mathjax:t reveal_rolling_links:t reveal_keyboard:t reveal_overview:t num:nil
|
||||
#+REVEAL_TRANS: cube
|
||||
#+REVEAL_THEME: moon
|
||||
#+REVEAL_HLEVEL: 2
|
||||
|
@ -160,7 +160,7 @@ $ git clone https://github.com/yjwen/org-reveal.git
|
|||
** Select Theme and Transition
|
||||
|
||||
Themes and transition styles are set globally throughout the whole
|
||||
file by setting options =REVEAL_THEME= and =REVEAL_TRANS=.
|
||||
file by setting options =REVEAL_THEME=, =REVEAL_TRANS=, and =REVEAL_SPEED=.
|
||||
|
||||
For an example, please check the heading part of this document.
|
||||
|
||||
|
@ -168,6 +168,15 @@ $ git clone https://github.com/yjwen/org-reveal.git
|
|||
|
||||
Available transitions are: default|cube|page|concave|zoom|linear|fade|none.
|
||||
|
||||
** Extra Stylesheets
|
||||
|
||||
Set =REVEAL_EXTRA_CSS= to a stylesheet file path in order to load extra custom
|
||||
styles after loading a theme.
|
||||
|
||||
#+BEGIN_SRC org
|
||||
#+REVEAL_EXTRA_CSS: my-custom-stylesheet.css
|
||||
#+END_SRC
|
||||
|
||||
** Fragmented Contents
|
||||
|
||||
Make contents fragmented (show up one-by-one) by setting option =ATTR_REVEAL= with
|
||||
|
@ -221,10 +230,10 @@ $ git clone https://github.com/yjwen/org-reveal.git
|
|||
|
||||
- =#+OPTIONS= tags:\\
|
||||
=reveal_control=, =reveal_progress=, =reveal_history=,
|
||||
=reveal_center=
|
||||
=reveal_center=, =reveal_rolling_links=, =reveal_keyboard=, =reveal_overview=
|
||||
- Custom variables:\\
|
||||
=org-reveal-control=, =org-reveal-progress=,
|
||||
=org-reveal-history=, =org-reveal-center=
|
||||
=org-reveal-history=, =org-reveal-center=, =org-reveal-rolling-links=, =org-reveal-keyaboard, =org-reveal-overview=
|
||||
|
||||
For an example, please refer to the heading part of this document.
|
||||
|
||||
|
|
51
ox-reveal.el
51
ox-reveal.el
|
@ -43,9 +43,14 @@
|
|||
(:reveal-progress nil "reveal_progress" org-reveal-progress t)
|
||||
(:reveal-history nil "reveal_history" org-reveal-history t)
|
||||
(:reveal-center nil "reveal_center" org-reveal-center t)
|
||||
(:reveal-rolling-links nil "reveal_rolling_links" org-reveal-rolling-links t)
|
||||
(:reveal-keyboard nil "reveal_keyboard" org-reveal-keyboard t)
|
||||
(:reveal-overview nil "reveal_overview" org-reveal-overview t)
|
||||
(:reveal-root "REVEAL_ROOT" nil org-reveal-root t)
|
||||
(:reveal-trans "REVEAL_TRANS" nil org-reveal-transition t)
|
||||
(:reveal-speed "REVEAL_SPEED" nil org-reveal-transition-speed t)
|
||||
(:reveal-theme "REVEAL_THEME" nil org-reveal-theme t)
|
||||
(:reveal-extra-css "REVEAL_EXTRA_CSS" nil nil nil)
|
||||
(:reveal-hlevel "REVEAL_HLEVEL" nil nil t)
|
||||
(:reveal-mathjax nil "reveal_mathjax" org-reveal-mathjax t)
|
||||
(:reveal-mathjax-url "REVEAL_MATHJAX_URL" nil org-reveal-mathjax-url t)
|
||||
|
@ -99,6 +104,12 @@ can be include."
|
|||
:group 'org-export-reveal
|
||||
:type 'string)
|
||||
|
||||
(defcustom org-reveal-transition-speed
|
||||
"default"
|
||||
"Reveal transistion speed."
|
||||
:group 'org-export-reveal
|
||||
:type 'string)
|
||||
|
||||
(defcustom org-reveal-theme
|
||||
"default"
|
||||
"Reveal theme."
|
||||
|
@ -125,6 +136,21 @@ can be include."
|
|||
:group 'org-export-reveal
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom org-reveal-rolling-links t
|
||||
"Reveal use rolling links."
|
||||
:group 'org-export-reveal
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom org-reveal-keyboard t
|
||||
"Reveal use keyboard navigation."
|
||||
:group 'org-export-reveal
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom org-reveal-overview t
|
||||
"Reveal show overview."
|
||||
:group 'org-export-reveal
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom org-reveal-mathjax nil
|
||||
"Enable MathJax script."
|
||||
:group 'org-export-reveal
|
||||
|
@ -246,7 +272,7 @@ to form a legal path name."
|
|||
(cdr pathes))
|
||||
dir-name))
|
||||
|
||||
|
||||
|
||||
(defun org-reveal-stylesheets (info)
|
||||
"Return the HTML contents for declaring reveal stylesheets
|
||||
using custom variable `org-reveal-root'."
|
||||
|
@ -255,10 +281,15 @@ using custom variable `org-reveal-root'."
|
|||
(min-css-file-name (org-reveal--append-path css-dir-name "reveal.min.css"))
|
||||
(theme-file (format "%s.css" (plist-get info :reveal-theme)))
|
||||
(theme-path (org-reveal--append-path css-dir-name "theme"))
|
||||
(theme-full (org-reveal--append-path theme-path theme-file)))
|
||||
(theme-full (org-reveal--append-path theme-path theme-file))
|
||||
(extra-css (plist-get info :reveal-extra-css))
|
||||
(extra-css-link-tag (if extra-css
|
||||
(format "<link rel=\"stylesheet\" href=\"./%s\">" extra-css)
|
||||
"")))
|
||||
(format "<link rel=\"stylesheet\" href=\"%s\">
|
||||
<link rel=\"stylesheet\" href=\"%s\" id=\"theme\">\n"
|
||||
min-css-file-name theme-full)))
|
||||
<link rel=\"stylesheet\" href=\"%s\" id=\"theme\">
|
||||
%s\n"
|
||||
min-css-file-name theme-full extra-css-link-tag)))
|
||||
|
||||
(defun org-reveal-mathjax-scripts (info)
|
||||
"Return the HTML contents for declaring MathJax scripts"
|
||||
|
@ -289,14 +320,22 @@ custom variable `org-reveal-root'."
|
|||
progress: %s,
|
||||
history: %s,
|
||||
center: %s,
|
||||
rollingLinks: %s,
|
||||
keyboard: %s,
|
||||
overview: %s,
|
||||
|
||||
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
|
||||
transition: Reveal.getQueryHash().transition || '%s', // default/cube/page/concave/zoom/linear/fade/none\n"
|
||||
transition: Reveal.getQueryHash().transition || '%s', // default/cube/page/concave/zoom/linear/fade/none
|
||||
transitionSpeed: '%s',\n"
|
||||
(if (plist-get info :reveal-control) "true" "false")
|
||||
(if (plist-get info :reveal-progress) "true" "false")
|
||||
(if (plist-get info :reveal-history) "true" "false")
|
||||
(if (plist-get info :reveal-center) "true" "false")
|
||||
(plist-get info :reveal-trans))
|
||||
(if (plist-get info :reveal-rolling-links) "true" "false")
|
||||
(if (plist-get info :reveal-keyboard) "true" "false")
|
||||
(if (plist-get info :reveal-overview) "true" "false")
|
||||
(plist-get info :reveal-trans)
|
||||
(plist-get info :reveal-speed))
|
||||
(format "
|
||||
// Optional libraries used to extend on reveal.js
|
||||
dependencies: [
|
||||
|
|
Loading…
Reference in New Issue
Block a user