====== Groff: Vertical Positioning and Two-Column Layout ======
[[computing:computing|Back to Index]]
===== 1. Absolute vertical positioning =====
The conversation focused on precise vertical positioning in **groff**, particularly when laying out content in a two-column page format.
The following options are available for vertical movement:
* ''\v'2i''' — relative vertical movement of two inches.
* ''.sp 2i'' — insert two inches of vertical space.
* ''\v'|3i''' — move to an absolute vertical position three inches from the top of the page.
The last option was exactly what was needed.
===== 2. The page layout =====
The example uses the following page dimensions:
* Physical page width: 6 inches.
* Usable page area: 4.5 inches, after margins and gutter.
* Two-column layout, established with ''.2C''.
The example content consists of six character attributes:
* Brave
* Clever
* Fierce
* Kind
* Quick
* Wary
The first three appear in the first column, and the remaining three in the second.
===== 3. Understanding the two-column layout =====
The important groff directives are:
* ''.2C'' — switches to two-column mode.
* ''.1C'' — switches back to single-column mode.
* ''\v'|3i''' — positions content at the absolute vertical position of three inches from the top of the page.
* ''.ne 7i'' — requests at least seven inches of vertical space before proceeding.
The two occurrences of ''\v'|3i''' allow the content to begin at a controlled vertical position in the respective columns.
The ''.ne 7i'' directive helps control page breaking by ensuring sufficient vertical space is available before proceeding.
===== 4. Closing the two-column section =====
The original excerpt was missing its closing directive. The appropriate addition is:
.1C
This restores single-column formatting for subsequent material.
===== 5. Key takeaway =====
The most useful discovery was:
\v'|3i'
This provides absolute vertical positioning, making it particularly useful for carefully arranged page layouts.
Combined with ''.2C'', ''.ne'', and ''.1C'', it provides the necessary tools for controlling this particular two-column composition.