Page numbering in header, left and right

How do I insert page numbers for a document in the header, right on right pages, and left on left pages? (spent 2 hours looking for answers so far).

Case 1: one page style

  • menu Format | Page Style | Header | Header | ☒ Header on :: □ Same content on left and right pages

Then you create two (empty) pages and insert page number in the header (menu Insert | :ballot_box_with_check: Page number) on the left or on the right.
If page number = 1 it’s a right page, if page number = 2 it’s a left page. Check that you have activated the status bar (menu view | Status Bar)

Case 2: two page styles (Left Page; Right Page)

  • Create two empty pages (first page as a right page, the left page will automatically follow) and set the page number as described above.

online information

https://help.libreoffice.org/latest/lo/text/shared/01/03060000.html
https://help.libreoffice.org/latest/lo/text/swriter/guide/header_pagestyles.html
https://help.libreoffice.org/latest/lo/text/swriter/guide/header_footer.html
https://help.libreoffice.org/latest/lo/text/swriter/guide/pagenumbers.html
https://help.libreoffice.org/latest/lo/text/swriter/guide/header_pagestyles.html
https://help.libreoffice.org/latest/lo/text/swriter/guide/header_with_line.html