- No space after chapter numbering
You must configure the properties of chapter numbering with
Chapter Numbering. The settings you may have customised in Writer are not forwarded to the HTML editor. Consider they are separate applications settings-wise.
Same as 1. above. Configure all your levels, notably the separator before and after parameters.
If indent is made with NBSP, those NBSP are present in the resultant HTML and rendered as expected.
However, if you use ordinary spaces for your indent, those spaces are also present in the HTML (Writer takes no initiative about that and you can’t blame it), but W3C says that any sequence of ordinary spaces is considered as a single space and browsers render it accordingly (eventually stretching ALL spaces in a line to justify adge to edge). This is intended behaviour in browsers.
Anyway, in Writer or browsers, it is always a bad idea to indent paragraph with spaces. It is much better, safer and reliable to use styles (or as a fallback, cursors in the horizontal ruler). This will translate to CSS and give highly predictable results.
Note that there are far less built-in styles in Writer/HTML component than in Writer. But you can always define custom ones for your needs. They will translate to CSS to be rendered in a portable way by browsers.
To summarise: no bug in Writer/HTML but a misconception of yours about differences between HTML edition and document edition (and also a different base configuration in those components).
CAUTION! Save as .odt or save as .html from an .odt is not the same as
HTML Document then save!
In the first case, you edit a sophisticated formatted document which is converted into an HTML one with embedded CSS directives trying to mimic Writer styles. In the second case, you start directly into HTML formatting with simplified styles corresponding to W3C standards. This could explain the differences. I conducted my test in the second context.
However, in both cases, you don’t edit directly HTML markup. You still control Writer through its styles (full or reduced capabilities) and these styles are translated, perhaps not as you would like, by an export filter (may be approximate; remember: Traduttore, traditore).
I had a look at the attached sample file.
It is an .odt file
This may seem obvious and queer from me. However, as I explained,
New Text Document and
HTML Document are different and launch different LO components. By creating an .odt document, you format a common paginated to-be-printed document. With
Save As in .html format, the document will be approximately translated from ODF concepts to HTML concepts.
The first difference: from pages to continuous stream.
A second difference, of utmost importance in your case: HTML has no notion of tab stops; consequently tabs are simply ignored (they could have been translated into a space but the output converter has not chosen this path).
If you had chosen from start
all menus and formatting actions would have been downgraded to HTML capabilities. Have you noticed, the first time you saved as .html, the dialog warned you about the possible loss of formatting effects?
How to deal with the issue?
Ideally, you should restart from scratch. But, considering you already spent a lot of time on the real document, there are several workarounds.
The fix is a bit “twisted”. Since tabs are ignored by the output filter, set Number followed by
Position tab. In
Numbering tab, for all used levels, set Sparator After to a space.
Indents and vertical spacing
This must be managed exclusively through paragraph styles. This means that your level dependent left indent requires one style per level. You can’t use Text Body everywhere (e.g. your 'See attachment" paragraphs at level two are aligned with heading 2 title but end up flushed at left margin in HTML because tabs heave been removed).
I don’t fully understand what you’ve done to Heading 2. In principle, you don’t change indents in the paragraph style but in
Position tab otherwise you may meet inconsistency under quite frequent circumstances (internal conflict with list numbering handling during formatting of the chapter number).
Also, you seem to have activated bullet/numbered list on Heading 2 while it is managed by
Chapter Numbering. This is another case for internal conflict.
If you address these points, you should not be very far from your goal.
Don’t hesitate to request further help (either through question edit or comment under my answer.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer) or comment the relevant answer.
2020-09-19 edit only fixed a formatting error