org-mode-ox-odt
org-mode-ox-odt copied to clipboard
Improper seperation between objects
I find there is unnecessary gap between section and table on page 2 for the snippet in the zip file. On lower part of page 2, there is enough space for the following table, but it's rendered empty.
The empty space can be removed by insert a linebreak after the two column section.
Here the objects are a two column section and a table, there might be other similar cases, I have seen extra large blank areas before.
The file named "good.odt" is a resaved version of the above exported file, it is much smaller and doesn't have the described problem, libreoffice adds a soft-page-break in the last table:
<table:table table:name="Table1" table:style-name="Table1">
<table:table-column table:style-name="Table1.A" table:number-columns-repeated="2"/>
<text:soft-page-break/>
If soft-page-break does no harm to the format, maybe it should be inserted in the beginning of tables, figures and multi-column section by default, just to help the document layout in libreoffice.
I have redefined the outline style, so different part of text_cn.xml can be folded, which makes eding xml style files easier.
Looks like outshine-mode
doesn't support nxml-mode
. May be file a enhancement request with outshine-mode
.
The advantage with hs-minor-mode
is that you don't have to "change" the buffer at all. I am yet to figure out a way for how to make hs-minor-mode
show the XML like org cycling does.
You can also use origami
. The advantage is that it has org
like folding / unfolding. The disadvantage is that it is slow and buggy. And I often see complaints that the author of this package doesn't respond to bugs or feature requests.
That said, there is nothing is better than that which is already working well for oneself.
Btw, I would appreciate if you could keep the discussion / issue focused on a single topic. For example, instead of sharing your tip about folinding XML styles in a bug about LibreOffice rendering / pagination, you could have opened a new discussion thread or an issue. When I file a bug report with LibreOffice, I am going to link to this issue and the LibreOffice team (if at all wants to look at notes in this bug), they will get confused about unrelated discussions and will feel discouraged.
I have redefined the outline style, so different part of text_cn.xml can be folded, which makes eding xml style files easier.
Thanks for the tip. You can run M-: (org-odt-prettify-xml-buffer)
when in the cn
file.
I use `hs-minor-mode' ... In your case, you are using manually inserted comment lines.
I have looked at this in detail. Programmer in me says that it is a layout bug in LibreOffice ... and most importantly this example will actually help them fix it.
I will file a bug report with LibreOffice. For them to look at it, I need to add a detailed report. It will take some time for me to actually fill out the details.
There is plenty of options in the discussion page ... For example, you could have used Show and tell or Ideas to share your tip about folding xml nodes with us.
I have put the good looking and bad looking files in the attached zip file, the content.xml are different. Uploading issue.zip…
Did you forget something?
This is what I see in the original example.zip . There is no good and bad looking files in there.
M Mode Size Date&time Filename
- ---------- ----- -------------------- ----------------
-rwxr-xr-x 10527 2-Dec-2021 15:43:48 org-mode-unicorn.png
-rw-r--r-- 999 2-Dec-2021 15:43:36 sinppet.org
-rw-r--r-- 25611 2-Dec-2021 15:43:08 OrgOdtContentTemplate.xml
-rw-r--r-- 97519 2-Dec-2021 15:43:08 text_cn.xml
- ---------- ----- -------------------- ----------------
One more thing, include the full set of export options in the top of the org
file withC-c C-e # d
and C-c C-e # o
. Remember to remove any private info, and comment out the stuff you don't want like title
etc. Also see if you can reproduce the issue with text_cn.xml
file. I know you have been using that file for quite sometime, at least for last 4 years or so. So, I will not be able to see if any changes in there is adding to the problem.
One more thing, include the full set of export options in the top of the
org
file withC-c C-e # d
andC-c C-e # o
. Remember to remove any private info, and comment out the stuff you don't want liketitle
etc. Also see if you can reproduce the issue withtext_cn.xml
file. I know you have been using that file for quite sometime, at least for last 4 years or so. So, I will not be able to see if any changes in there is adding to the problem.
Replying to myself ... I created the unit test files for reporting to LibreOffice edit. (Note: This is the kind of bug report I want :-))
emacs-org-mode-ox-odt-issue#144.zip
Introduction of an additional paragraph throws the pagination off.
emacs-org-mode-ox-odt-issue#144.zip
emacs-org-mode-ox-odt-issue#144-v2.zip
This version (v2) has the following changes:
- Additional annotations for the screenshot in v1
- Screenshots with field names. This captures how the presence of a single paragraph--this paragraph has an "empty" contents and is easily identifiable with turning ON the fieldnames--throws the pagination off.
With some changes to README.org, this zip file can be submitted to LibreOffice bugs.
Sorry about the last post. The connection to github is unstable here. I found that libreoffice seems to be able to fix the gap on a file resave. Here is my last post:
After the latest three commits in the odt exporter, if I resave the file to another name with libreoffice, the gap is still there. Before the lastes commits the gap is removed when I resave the file to a different name. I have put the good looking and bad looking files in the attached zip file, the content.xml are different. issue.zip