How do you put the Heading number on the right side?

I can’t find a way to put a large chapter number on the right side of the heading. Here’s a an example from the LaTeX Classic Thesis package:
image description

This is what I am looking for. It should be fairly simple…

Can this be done in Writer without using a hack?

I think, it is not possible in a non-hacky way.

Hack suggestions:

  1. Set a right-align tab stop on the right edge in the paragraph style.
  2. Start your heading with space and tab, so that the heading moves to the right side. The space is needed later on.
  3. Define a character style with a large font size and name it e.g. BigNumber.
  4. Enable chapter numbering in Tools > Outline Numbering and set the character style to your BigNumber there.
  5. Set the writing direction to Right-to-Left in the paragraph style.

You can change the writing direction in the paragraph style later, it might be confusing while writing your text. In any case do it in the paragraph style, not as direct formatting, to get the change for all headings.

If you do not need a table of content and your numbering do not have levels, then you can consider not to use outline numbering or list numbering at all. But instead define a number range (Insert > Fields > Others > Variables). Set a right align tab stop. Write you heading, insert a tab, and then insert the number range field.

It’s a pity there is no clean way to do it! I use an automatic table of contents. Won’t it be messed up by the hack?

No problem, the TOC will show the heading numbers on the left side as usual, because LO knows, that they are heading numbers. The different writing direction is only set for the heading itself. The entries in the TOC use their own paragraph styles . In contrast, the hack with a number range will not work for TOC, because the fields are treated as belonging to the heading text.