org-reveal icon indicating copy to clipboard operation
org-reveal copied to clipboard

Left-alignment broken by comment/note

Open liar666 opened this issue 3 years ago • 2 comments

When I create presentation slides, I like to put comments (# or #+BEGIN_COMMENT) / notes (#+BEGIN_NOTES) where I'm supposed to read them, i.e. right below what they are about. Sometimes this means putting comments/notes in the middle of a slide.

Unfortunately, doing so breaks alignment with org-reveal (I'm using "org-reveal-center:f" thus all items should be aligned left).

Here is a minimal example to demonstrate the problem:

#+STARTUP: showall indent latexpreview inlineimage
#  --- Use C-c C-c to reload this ---
#+TODO: TODO(t) INPROGRESS(i) LATER(l) CANCELLED(c) DELEGATED(d) | DONE(o)

#+TITLE: My Presentation Title
#+AUTHOR: Me
#+EMAIL: [email protected]

#+OPTIONS: toc:nil org-reveal-center:f

* Slide1 = alignment OK
+ item 1
+ item 2
#+BEGIN_NOTES
These are notes for both item 1 and 2
#+END_NOTES

* Slide1 = alignment BROKEN
+ item 1
#+BEGIN_NOTES
These are note for item 1 only
//// Bug is here. Using #+BEGIN_COMMENT or # result in same problem ///
#+END_NOTES

+ item 2
#+BEGIN_NOTES
These are note for item 2 only
#+END_NOTES
  • In slide 1, items are one on top of the other and aligned left, which is what is expected
  • In slide 2, they are on the side of one another. In more complex examples, I end up with one on top of the other but not aligned to the left.

I've had a look at the generated html file and it seems that when putting something between items, this closes the previous itemize and creates a new one. I can understand why it is good for org-mode to behave like that, but what I don't understand is why it breaks the alignment in JS/reveal. (NOTE: I'm very newbie in org / JS / reveal)...

Adding @@html:@@ or @@html:<br/>@@ right before + item2 seems to make the alignment work again, but with a large space between item1 & item2 (larger than in slide1 even without br)

Is this actually a bug (in org-reveal/rejeal.js)? Is there a "cleaner" workaround?

liar666 avatar Feb 24 '22 14:02 liar666

After verification on a more complex case, alignment remains broken with #+BEGIN_COMMENT, even with @@html:...@@ workarounds

liar666 avatar Feb 24 '22 16:02 liar666

Could you please paste the headings of that example? I didn't reproduce the alignment issue with only the body contents.

BTW. org-reveal-center:f is obsolete and it was used for specifying slide vertical position. Please update to the latest org-reveal and use #+REVEAL_INIT_OPTIONS. Check https://revealjs.com/config/ for available options.

------------------ 原始邮件 ------------------ 发件人: "yjwen/org-reveal" @.>; 发送时间: 2022年2月24日(星期四) 晚上10:54 @.>; @.***>; 主题: [yjwen/org-reveal] Left-alignment broken by comment/note (Issue #476)

When I create presentation slides, I like to put comments (# or #+BEGIN_COMMENT) / notes (#+BEGIN_NOTES) where I'm supposed to read them, i.e. right below what they are about. Sometimes this means putting comments/notes in the middle of a slide.

Unfortunately, doing so breaks alignment with org-reveal (I'm using "org-reveal-center:f" thus all items should be aligned left).

Here is a minimal example to demonstrate the problem:

  • Example Slide :PROPERTIES: :reveal_background: images/name-of-image :reveal_background_size: width-of-image :reveal_background_trans: slide :END: ** plip ** plop ** plup #+BEGIN_NOTES Your note #+END_NOTES #+BEGIN_COMMENT + Doc for org-reveal + https://github.com/yjwen/org-reveal + https://github.com/hexmode/ox-reveal #+END_COMMENT
    In slide 1, items are one on top of the other and aligned left, which is what is expected

In slide 2, they are on the side of one another. In more complex examples, I end up with one on top of the other but not aligned to the left.

I've had a look at the generated html file and it seems that when putting something between items, this closes the previous itemize and creates a new one. I can understand why it is good for org-mode to behave like that, but what I don't understand is why it breaks the alignment in JS/reveal. (NOTE: I'm very newbie in org / JS / reveal)...

Adding @@html:@@ or @@html:<br/>@@ right before + item2 seems to make the alignment work again, but with a large space between item1 & item2 (larger than in slide1 even without br)

Is this actually a bug (in org-reveal/rejeal.js)? Is there a "cleaner" workaround?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.Message ID: @.***>

yjwen avatar Mar 06 '22 13:03 yjwen