[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Align top of text blocks
From: |
Andrea D'Amore |
Subject: |
Align top of text blocks |
Date: |
Wed, 15 Sep 2021 18:49:22 +0200 |
Howdy list,
I have three blocks of text on a line and I would like to align them
on top rather than on the baseline.
To put things in context that is the header of a CV, and this is an ms example:
\# Header
.nf
.mk a
Sometown, Earth
vs@johndoethetrueone.com.invalid
.br
.rt \nau
.ps +16p
.ce 1
John "The Doe" Doe
.ps
.rt \nau
.rj 2
linkedin.com/in/j.doe
github.com/j.doe
.fi
I am building this using groff 1.22.4 and:
groff -ms -Tpdf -dpaper=a4 -P-pa4 sample.ms >sample.pdf
I came up with this solution, pushing down the middle line that had a
bigger point size:
\# Header
.nf
.mk a
Sometown, Earth
vs@johndoethetrueone.com.invalid
.br
.rt \nau
.ps +16p
.ce 1
.sp +10p
John "The Doe" Doe
.ps
.rt \nau
.rj 2
linkedin.com/in/j.doe
github.com/j.doe
.fi
Questions:
1. Is there a "proper" way to achieve this?
2. I had to eyeball the .sp value to 10p while I expected it to be +6p
(the difference between the default 10p and the +16p I used), what's
the actual math there?
As a side question I tried the *dual* solution pulling up the lateral
lines with:
\# Header
.nf
.mk a
.sp -10p
Sometown, Earth
vs@johndoethetrueone.com.invalid
.br
.rt \nau
.ps +16p
.ce 1
John "The Doe" Doe
.ps
.rt \nau
.rj 2
.sp -10p
linkedin.com/in/j.doe
github.com/j.doe
.fi
and I was left wondering why this wors for the right block but not for
the left one. Any hint?
--
Andrea D'Amore
- Align top of text blocks,
Andrea D'Amore <=