org-mode导出reveal.js演示文稿时列表动画排版异常求助
#+ATTR_REVEAL in Org-Mode + Reveal.js I've run into this exact quirk before—org-mode's reveal.js export can get finicky when you apply fragment attributes to individual list items instead of the whole list. Here's how to fix that messy line-wrap issue:
1. Double-Check Your Org Syntax Indentation
The most common culprit is incorrect spacing between the #+ATTR_REVEAL block and your list item content. The attribute block needs to be directly attached to the list item, and the item text must be indented under the attribute. Use this structure:
* Topic - #+ATTR_REVEAL: :frag appear Item 1 - #+ATTR_REVEAL: :frag roll-in Item 2 - #+ATTR_REVEAL: :frag grow Item 3
Without that indent on the item text, the export parser can confuse the attribute block as part of the previous item's content, leading to merged list items in the final HTML.
2. Bypass Org's Attribute Parser (If Needed)
If the indent trick doesn't work, you can directly inject reveal.js's fragment classes into your list items using raw HTML. This skips any potential parsing weirdness:
* Topic - <span class="fragment appear">Item 1</span> - <span class="fragment roll-in">Item 2</span> - <span class="fragment grow">Item 3</span>
This guarantees each list item gets its own fragment wrapper, keeping the layout clean and aligned.
Why This Happens
When you apply #+ATTR_REVEAL to individual list items, org-mode's export engine sometimes fails to properly associate the attribute with its list item. Instead, it treats the next list item as part of the previous one's content, resulting in that jumbled "Item 2 and 3 on the same line" mess. Proper indentation signals to the parser that each attribute belongs to its own list entry, generating the correct nested HTML structure reveal.js expects.
内容的提问来源于stack exchange,提问作者muteaudio

