How do I use Roman numbers for first pages and Arabic numbers for the rest?

I am using libreoffice writer as my text editor for my university and i have one main issue. I want to put page numbering in the first 4 pages with latin numbers (eg i, ii, iii, iv) and in the fifth page start with arabic numbers from 1 (eg 1, 2, 3, 4,…).
Is there an automatic way to number pages like that?

Duplicate of How can I use Roman page numbers for first pages and Arabic page numbers for the rest?

You should use styles and formatting (F11) to define your pages as desired. When you apply a page break, pay attention to use the correct style. See example attached. Note that the title page does not contain a page number here, this is on purpose and is easily being changed.

Page Numbering.odt

See also step-by-step guide here.

@oweng, what do you think if I post an example file for academic writing? I’d modify a template I frequently use and add a few comments in there about how to use it.

@lactea, good idea. Always helpful to have real examples.