# WRITER: Relationship between page margins and other typographic elements

I am preparing a complex template for writer, whose layout must correspond to a predefined graphic project, which gives me the height of the body of text, the height of the header, the distance between header and body of text, the height of the footer and the distance between footer and body of text.

I need to know: does the page size as set in [format -> page -> page -> margins -> top / bottom] also include the space assigned to header and footer? If I increase the height of the header [format -> page -> header -> spacing / height] is this increase added or subtracted to the values ​​set in the "margins" tab? And if I increase the height of the header spacing [format -> page -> header -> spacing / height] is this increase subtracted from the height of the header or from the height of the body of text?

In other (and simpler) words: given ct = height of the body of text, h = height of the header, dh = distance between header and body of text, f = height of the footer, df = distance between body of text and footer, which values ​​must I insert in the window [format -> page]?

edit retag close merge delete

Sort by » oldest newest most voted

In Writer, contrary to Word, page margins define an absolutely-no-print area. No element (apart from manually positioned frames) will ever be laid out in the margins.

The remaining area in the page is shared by the header, the text body, the footer and spacings between there elements.

h + dh + ct + df +f = page_height - top_margin - bottom_margin

Use this formula to compute the value for the top and bottom margins. Also, in your page styles, make sure boxes AutoFit height and Use dynamic spacing are unchecked (Header and Footer tabs) so that your paragraph styles and spacing height settings will dictate the dimensions without adjustment by Writer.

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

more

1

Wonderful answer, but I does not have enough points to upvote. Thanks.

( 2019-11-28 20:01:36 +0100 )edit

Legend:

1. Left margin
2. Right margin
3. Top margin
4. Page border line width

Items 1-3 are set at Page Style dialog's Page tab. Items 4-8 are defined on tab Borders. Items 9-12 are from Header tab. Items 14-19 are on Border tab of the dialog available by clicking on More... button on Header tab of Page Style dialog. Item 13* is not defined explicitly; see its discussion below.

Items 4 and 14 are measured in points (pt = 1/72 in); units of other items follow user preferences (OptionsLibreOffice WriterGeneral).

Most of the elements are quite straightforward and obvious from the schema and their naming; possibly the not-so-obvious fact needs mentioning that border widths are added to the spacings; and that 12 = 14 + 18 + 13* + 19 + 14 + 15. However, there are two options on the Header tab, that affect items 11, 12, 13*, and need additional explanation, namely:

• [ ] Use dynamic spacing
• [ ] AutoFit height

When both of these checkboxes are unchecked, the values of items 11 (Header spacing) and 12 (Header height) are used strictly as set. Any content of header's text area (13*) that doesn't fit will be cut off.

When AutoFit height is checked, 12 is considered minimal height of the header: if text contents doesn't fit into 13* that results from the set elements' sizes, it will expand the height downwards as needed, shifting 11 downwards (height of 11 is unchanged) and decreasing main page text body height.

When both AutoFit height and Use dynamic spacing are checked, then the height of 12 is also minimum, and grows when 13* needs; but when growing, initially it borrows space from 11 (header spacing), thus the total height of 11 + 12 doesn't change, and main page text body's top doesn't move. Only when header spacing is depleted, further growth of 13* (and 12) will start borrow space from main page text body height.

Checking Use dynamic spacing alone doesn't make sense, and behaves as if 12 is set to 11+12, and 11 is set to 0.

more

Only one word: waouh! I'd give +5 if I could, but I'm limited to +1

( 2019-11-28 20:53:10 +0100 )edit

I thought it's worth to share what I learned from trying to improve our interoperability with Word in this area, where our layout is very different from Word's (to the extent that some layouts possible in LO are totally impossible in Word, and vice versa) ... Glad you find it useful!

( 2019-11-28 21:27:53 +0100 )edit