libreoffice-writer

How to add automatically expanding horizontal space in libreoffice (similar to say flex justify-content space-around)


I'm trying to achieve this effect:

|First phrase...............................................Second phrase|

Where the | markers above denote the page margins, and ....... represents a 'horizontal space' (which may or may not use space as the character, a 'dot' as above, or any other character), which effectively expands to take as much space as possible between the two pieces of text.

This is pretty common, e.g., when designing a table of contents manually*, or when trying to achieve the kind of "chapter X...........page Y" effect in headers.

I know there's a specific and easy way to introduce this kind of 'expanding horizontal space', because I've done it in the past. But I just can't find it anymore. I just vaguely remember that the relevant menu allowed you to specify what character you wanted to use in this 'expanding space'. Also, it may or may not have involved the use of tabs.

Any ideas?

* Yes I know about the "Table of Contents" menu option, no I'm not trying to design a table of contents, it was just an example :)


Solution

  • I remembered.

    Create a tab stop on the horizontal ruler above the page, right click to convert from a 'left' stop to a 'right' stop, and drag that stop all the way to the right margin.

    Then, next time you press 'tab', the tab will automatically push any content to the right of your cursor, all the way to the right margin.

    If you optionally also specify a fill character in the 'Tabs' tab of the 'Paragraph' formatting menu, the tab space will be filled with that character.