I am new to groff (ms macros) and currently making a table of content parser that builds automatically a table of content by using a double pass through the groff command. However I would actually need to add a page break at the end of a few parts of the document, including the table of content (my school requires this).

Is there such a macro as a page break? Something that would basically stop printing on the current page and continue on the next one. I've been looking through the man page and several online resources and can not find anything about that.

I have thought of just printing blank text, but then it can't be dynamically generated easily so it needs to be edited manually at the end.

I also am interested in other groff macro types if they include such features as automatic table of content and page breaks.

EDIT: this is for PDF generation for academic and professional (school related) paperwork

  • Well damn I didn't see the .bp macro, works perfectly! Is this a groff macro or an ms macro?
    – Soulthym
    Commented Jul 20, 2019 at 18:15
  • About the TOC yes I have seen it, I was just making a TOC that auto builds but from anywhere in the document. Basically adding indexing markers automatically, generating the TOC where I need it (to avoid offsets) and an extra one at the end of the document. Then grepping those page numbers from the ps output and inserting those in the initial table of content.
    – Soulthym
    Commented Jul 20, 2019 at 18:18
  • Alright so that is why I didn't see it, I was sure it was ms and not groff... Thanks for your help!
    – Soulthym
    Commented Jul 20, 2019 at 18:18

1 Answer 1


The .bp request might be what you need. From man 7 groff:

.bp       Eject current page and begin new page.
.bp ±N    Eject current page; next page number ±N.

It is in the list of pre-defined requests.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .