I'm preparing a talk in org-reveal. I'm using a construct like this on several slides:
- Bulletpoint A #+begin_src Example code for A #+end_src - Bulletpoint B #+begin_src Example code for B #+end_src I would like to fragment this such that first, only Bulletpoint A (with its code example) is visible and, after a click, Bulletpoint B with its code shows up.
I have tried various things:
- If I put a
#+ATTR_REVEAL: :frag ton the line before- Bulletpoint A, then the list itself will be fragmented, but the code examples are both visible right from the start. - From this answer on fragmenting a table I've learned about
@@html: <div class="fragment"… @@. However, I can't get this to work with source blocks. If I put the@@html: … @@before the#+begin_src, thenorg-revealwraps the custom HTML in a<p>…</p>, which of course means that the source block is not wrapped inside the fragmentingdivanymore. If I put the@@html: … @@inside the source block, it is output verbatim. I guess I would need to place the opening<div>right before the<pre>tag, but I don't see how to accomplish this inorg-reveal.
So, two things would help me a lot:
- Is there any way of assigning a fragment index to a source block? I don't need fragmenting inside the source blocks.
- Is there a more comfortable way than manually writing the
@@html: … @@(or macros with the same content) at every bullet point and every source block?
BofBulletpoint. Then put the cursor on the dash of the first item and sayM-: (org-element-at-point). It should say(plain-list (:type unordered :begin 1 :end 139 ...)- the values ofbeginandendare going to be different in your case, but make sure that they encompass the whole list. UseC-x =to check. Now try withorg-revealagain.