LibreOffice writer loses indentation among other things.

I’m beginning to get frustrated now.
I’m trying to produce a good looking mobi file. An ebook of a book I wrote.

When i started it, I admit, I ignore convention and went for block paragraphs rather than indented, and tried for days to produce a table of contents. (not just one at the start of the document but one that showed up on the e-reader as a menu. A device table of contents also known as a logical one.

That was my first hurdle where LibreOffice failed me. save as doc or docx, upload to kindle direct publishing and the device TOC always came up with just “Cover”. Then someone suggested Sigil to fix that issue. It worked. I had a working device TOC, but then…

Well…

Fiction should use indentation to signify new paragraphs rather then a couple of line breaks and no matter what I try, I can’t get it to work.

This is what it should look like…

And this is what I get after saving as HTML. (A necessary step. It needs to be loaded into Sigil to generate the TOC and then saved as .epub before uploading to kindle direct publishing.)

Help! I need to preserve indentation and I need a TOC. Also, indentation is lost when saving as docx too. I’ve not tried saving as doc yet, but both of those are pointless anyway because uploading those results in no working logical TOC. I need to take specific steps and LibreOffice, for the first time, isn’t helping.

I’ve written loads of books on it but this is the first time I’ve tried creating a mobi.

Oh… Ubuntu 16.04LTS and LibreOffice 5.1.6.2.

As requested, I used paragraph styles, not tabs

UPDATE: Well, updating to 18.10 fixed one problem but created another. Indentation now works but the program to generate the TOCs no longer does. Sigil epubs now get rejected by KDP.

I feel like I’m banging my head against a series of brick walls. Every time I break through one, there’s another right behind.

Calibre’s little help either. It seriously messes up the formatting.

Hello @spike1, How do you do the indentation? With the Tab key? Or with a paragraph style? Both styles shown in your screen captures don’t have indent values by default, and when saving as .doc(x) initial tabs are lost.


Add Answer is reserved for solutions. Please, click edit below your question to add more information.

I used the paragraph style indent which I think is the recommended method, isn’t it?

Is there another one that works?

Paragraph style is better than tabs. Have you considered upgrade to LibreOffice 6.4 (or 7.04)? You can make a search at https://bugs.documentfoundation.org/ to see if there is a bug report about this issue.

I’ve avoided upgrading to the latest LTS.
Little wary of things breaking and the latest isn’t available in my current repos, I don’t think.

Does the new version preserve indents when saving as word and HTML?

I am working with LibreOffice 6.4.7.2 (x86) on Windows 7.

See answer to another question: /question/164806/.

And this is what I get after saving as HTML.

Why do you save as HTML? What’s the purpose?

@gabix HTML, txt and epub were the only formats you can use for Sigil.

If Sigil (whatever it is) accepts HTML but does not accept ODF, then you have chosen a wrong tool. LibreOffice is not a real HTML editor, meaning that its HTML editing features are quite limited only to produce very simple web pages. You have to use a dedicated editor, learn HTML and CSS.

On the other hand, HTML is not (and was never intended to be) a format for office work or publishing, meaning that such important (for the above areas) things as page or paragraph formats are very weakly defined and can in any case be overridden by user’s browser settings.

Thus, at least two goals of yours seem (to me) to contradict each other. Either you keep strict paragraph style properties, which means that you have to stick to ODF, or you export to HTML and forget about good typography.

@gabix`On the other hand, HTML is not (and was never intended to be) a format for office work or publishing, meaning that such important (for the above areas) things as page or paragraph formats are very weakly defined and can, in any case, be overridden by user’s browser settings.

Don’t I know it. But I’m not the one responsible for designing ebook formats. Blame Amazon among others for that and they ARE based on HTML.

TeX would’ve been a much more sensible approach.

Thus, at least two goals of yours seem (to me) to contradict each other. Either you keep strict paragraph style properties, which means that you have to stick to ODF, or you export to HTML and forget about good typography.

As I said, not my doing. It’s just the way it is. I think I’ve found a workaround using Calibre, to do half the job, converting to epub and then the KDP to convert to .mobi.

Still not perfect, a strange artefact in chapter headings I’ve no idea how to get rid of, but it’s the best I’ve managed

Try exporting to FictionBook2 using OOoFBTools, then converting to HTML or what you need using Calibre. Maybe, just maybe, the result will be a bit better.

Can you not just directly export the .ODT as an EPUB? Then you can use styles and all the LibO style functions like indentation on the paragraphs and LibO could maintain the TOC automatically.

Thank you, @petermau.
The older version didn’t export to epub so I didn’t think to check again but that worked like a charm!
sigh
All that frustration… Still left me with a desktop after upgrade that I’ll take some time getting used to, much preferred the default on 14.04. It was much smoother and sleeker than this one, but at least now I’ve found the best method to get my ebook made.

The tab issue is so much more difficult than it needs to be. I was looking at some old threads and the commenter had the attitude of “If I don’t use it, you shouldn’t need to use it either.” Here’s what I found: for a new doc (or one in process), put cursor at very top left of page (before any printing). Hit the F11 key. Default Paragraph Style should be the first selection. Click on it to highlight it. Then, RIGHT CLICK and select Modify. Set tab, hit Apply and OK. This should adjust your tabs throughout your document. (If you do this through the Format/Paragraph selection at the top of page ribbon, it will only work on that one paragraph.)

Unfortunately, we must apparently do this for every single document as it does not appear there is a way to change the default (a feature Word offers). I also don’t like that there’s no menu option for changing margins. The Styles feature, apparently a favorite for some, is nothing more than a further frustration I don’t need. Although I created a new style, there appears to be no way to access it. While LibreOffice has been mostly fine in the past, I’m probably going back to Word. It makes more sense to me and I don’t have to go online to research how to do things I don’t do often enough to keep the details in ready memory.

For your ebook, once you get it uploaded, go through it carefully while in the preview mode. I had to upload mine numerous times because I was learning as I went and kept having to make changes. Good luck to you!

Do not answer a question unless it is a real answer. Yours is not because it does not address the initial problem. Besides, the approach is totally wrong. The Default style should not be normally used for the main text (Text Body is intended for this purpose, for example), it is just a base for other styles.

Unfortunately, we must apparently do this for every single document

… because you haven’t learned about styles and templates. Learn. Generally, learn things before giving advise or answers, just in order not to advise nonsense.

My previous comment has been hidden due to their number attached to the original question. I am glad to confirm that Libreoffice now supports directly the creation of EPUB. This allows the original indentation to be retained. Well done whoever wrote the code.