mirror of https://github.com/yjwen/org-reveal.git
Auto extend insufficient fragment style list.
This commit is contained in:
parent
151cdeaeaf
commit
c4b66bafff
18
Readme.org
18
Readme.org
|
@ -318,6 +318,7 @@ $ git clone https://github.com/yjwen/org-reveal.git
|
|||
* highlight-red
|
||||
* highlight-green
|
||||
* highlight-blue
|
||||
* appear
|
||||
|
||||
Setting ~:frag t~ will use Reveal.js default fragment style, which
|
||||
can be overriden by local option ~#+REVEAL_DEFAULT_FRAG_STYLE~ or
|
||||
|
@ -345,7 +346,7 @@ $ git clone https://github.com/yjwen/org-reveal.git
|
|||
2. As a whole.
|
||||
|
||||
To define fragment styles for every list item, please enumerate
|
||||
each item's style within parenthesis.
|
||||
each item's style in a lisp list.
|
||||
|
||||
~none~ in the style list will disable fragment for the
|
||||
corresponding list item.
|
||||
|
@ -371,7 +372,20 @@ $ git clone https://github.com/yjwen/org-reveal.git
|
|||
* I rolled in.
|
||||
* I will fade out.
|
||||
* I don't fragment.
|
||||
|
||||
#+REVEAL: split
|
||||
When there is ~:frag_idx~ specified, insufficient fragment style
|
||||
list will be extended by its last element. So a ~:frag (appear)~
|
||||
assigns each item of a list the ~appear~ fragment style.
|
||||
#+BEGIN_SRC org
|
||||
,#+ATTR_REVEAL: :frag (appear)
|
||||
* I appear.
|
||||
* I appear.
|
||||
* I appear.
|
||||
#+END_SRC
|
||||
#+ATTR_REVEAL: :frag (appear)
|
||||
* I appear.
|
||||
* I appear.
|
||||
* I appear.
|
||||
|
||||
|
||||
** Data State
|
||||
|
|
22
ox-reveal.el
22
ox-reveal.el
|
@ -823,20 +823,20 @@ transformed fragment attribute to ELEM's attr_html plist."
|
|||
(cond ((and (string= (org-element-type elem) 'plain-list)
|
||||
(char-equal (string-to-char frag) ?\())
|
||||
(let* ((frag-list (car (read-from-string frag)))
|
||||
(frag-list-mapped (if default-style
|
||||
(mapcar (lambda (s)
|
||||
"Replace t with default-style"
|
||||
(if (string= s t) default-style
|
||||
s))
|
||||
frag-list)
|
||||
frag-list))
|
||||
(frag-list (if default-style
|
||||
(mapcar (lambda (s)
|
||||
"Replace t with default-style"
|
||||
(if (string= s t) default-style
|
||||
s))
|
||||
frag-list)
|
||||
frag-list))
|
||||
(items (org-element-contents elem)))
|
||||
(message "default-style: %s" default-style)
|
||||
(message "frag-list-mapped: %s" frag-list-mapped)
|
||||
(if frag-index
|
||||
(mapcar* 'org-reveal--update-attr-html
|
||||
items frag-list-mapped (car (read-from-string frag-index)))
|
||||
(mapcar* 'org-reveal--update-attr-html items frag-list-mapped))))
|
||||
items frag-list (car (read-from-string frag-index)))
|
||||
;; Make frag-list tail circular
|
||||
(nconc frag-list (last frag-list))
|
||||
(mapcar* 'org-reveal--update-attr-html items frag-list))))
|
||||
(t (org-reveal--update-attr-html elem frag frag-index))))
|
||||
elem))
|
||||
|
||||
|
|
Loading…
Reference in New Issue