groff

How to auto-adjust height of rows in a table?


I have very simple groff file:

.ps 14
.TS
tab(;) doublebox allbox expand;
rb rb
l ^
l l.
111;222
333
444;555
.TE

with a table which looks as:

enter image description here

As you see only "222" is in the middle of the row. All other cells are located wrongly - too high up. As I understood it happens because I changed type size (.ps 14) and it seems it does not affect the table (its rows). I never used groff before so I supposed it will auto-extend the height of the rows, but it does not happen. How to fix this problem? What is the right way to change type size outside tables?


Solution

  • You can set the vertical spacing of the lines with .vs. In general, you would set the vertical spacing a bit larger than the font size:

    .ps 32
    .vs 36p
    .TS
    tab(;) doublebox allbox expand;
    rb rb
    l ^
    l l.
    111;222
    333
    444;555
    .TE
    

    gives:

    enter image description here