3

I'm using org-reveal to make a presentation.

I want to have elements in tabular form appear sequentially but in column-major order.

I know you can put :frag property-markers for gradual appearance. But I don't know how to do that inside tables.

Maybe tables are not the way to do this???

My basic question is how to make things appear (reveal!) in reveal in the general case:

  • arbitrary order
  • 2-d grid

2 Answers 2

2

You can use the following code as a starting point:

| @@html: <div class="fragment" data-fragment-index="0"> A  </div>@@ | @@html: <div class="fragment" data-fragment-index="3"> B  </div>@@ |
|--------------------------------------------------------------------+---|
| @@html: <div class="fragment" data-fragment-index="1"> C  </div>@@ | @@html: <div class="fragment" data-fragment-index="2"> D  </div>@@ |

Please notice the data-fragment-index property that give the order of appearance (first 0, then 1...). Also, the fragment class has several variants that you can find in the doc: https://github.com/hakimel/reveal.js/#fragments

2
  • Tnx — works! But is rather verbose. My answer below tries to improve it some... (Of course the verbosity can only be improved by a feature-add to org-reveal I guess)
    – Rusi
    Feb 23, 2020 at 13:56
  • 1
    I also changed div to span
    – Rusi
    Feb 23, 2020 at 16:56
2

For those who find this, heres a slightly less verbose approach to @Lgen 's answer using a macro a (for appear). Though I must confess to hardly knowing the ins and outs of macros in org

#+MACRO:  a @@html: <span class="fragment" data-fragment-index="$2">$1</span>@@
* Column Major
| {{{a(Hello,0)}}} | {{{a(yes,1)}}}   |
| {{{a(there,0)}}} | {{{a(no,1)}}}    |
1
  • Both span and macro are nice improvements to the initial version !
    – Lgen
    Feb 23, 2020 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.