emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ox-extra ignore-headlines mismatching/unexpected behavior


From: Alexandre Jesus
Subject: ox-extra ignore-headlines mismatching/unexpected behavior
Date: Sat, 13 Jun 2020 22:13:20 +0100

Hi all,

I am getting some unexpected and/or mismatching (between pdf and html
exports) behavior with ox-extra ignore-headlines. The weird behaviors I
am getting are:

1. When there is an empty line between the ignored headline and the text
   that comes before I would expect there to be a paragraph break in the
   exported file between the text that comes before and after the
   headline. This works as expected for first-level headlines for both pdf
   and html export. However, it does not work for second-level headlines
   when exporting to pdf (but it works as expected for html).

2. When there is an empty line after the ignored headline we do not get
   a paragraph break when exporting to pdf (not even in first-level
   headlines), but there is a break when exporting to html.

3. When there is no empty line around the ignored headline I would
   expect no paragraph break. For pdf export this is true, but for html
   export we get a paragraph break.

I am sending in attachment an example org file and the resulting
pdf/html where we can see these issues.

I've looked into the org-export-ignore-headlines and
org-extra--merge-sections functions to try and understand where the
problem might be. Unfortunately, given that I am somewhat new to elisp
and I am not familiar with the org parse tree I haven't had much luck.
But, if someone can point me to some resources explaining the inner
workings of org I might be able to explore it a bit further if no one
else has the time.

I am using:
- GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) of
  2020-05-19
- Org mode version 9.3.7 (9.3.7-2-g706970-elpaplus @
  /home/adbjesus/.emacs.d/elpa/org-plus-contrib-20200608/)

Thanks,
Alexandre

Attachment: example.org
Description: Lotus Organizer

Attachment: example.pdf
Description: Adobe PDF document

ox-extra ignore headlines mismatching behaviors

1 First level headlines

When using first level headlines we get the following behavior.

If there is a empty line before the header the text within the ignored header (such as this) is inserted in a new paragraph.

Some more text to show that it is working as expected.

If there is a empty after the header (but not before) then the behavior is different.

As we can see here (no line break in pdf, but a line break in html).

If there is no empty line before or after the ignored header then no paragraph break is introduced when exporting to pdf, but a break still inserted when exporting to html.

As we can see happening here. Note that for html there is usually no break if there is no empty line (as is the case here).

2 Second level headlines

When using second level headlines this behavior is similar but there is one difference.

If there is a empty line before the ignored header (which is this the case) no paragraph break exists when exporting to pdf.

Another example.

3 Output without ignored headlines

The following shows the output for the same text with the ignored headlines removed but with the same empty lines. I believe this would be the expected output of ignoring the headlines.

3.1 First level headlines

When using first level headlines we get the following behavior.

If there is a empty line before the header the text within the ignored header (such as this) is inserted in a new paragraph.

Some more text to show that it is working as expected.

If there is a empty after the header (but not before) then the behavior is different.

As we can see here (no line break in pdf, but a line break in html).

If there is no empty line before or after the ignored header then no paragraph break is introduced when exporting to pdf, but a break still inserted when exporting to html. As we can see happening here. Note that for html there is usually no break if there is no empty line (as is the case here).

3.2 Second level headlines

When using second level headlines this behavior is similar but there is one difference.

If there is a empty line before the ignored header (which is this the case) no paragraph break exists when exporting to pdf.

Another example.

Created: 2020-06-13 Sat 19:45

Validate


reply via email to

[Prev in Thread] Current Thread [Next in Thread]