groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Align top of text blocks


From: Tadziu Hoffmann
Subject: Re: Align top of text blocks
Date: Fri, 17 Sep 2021 19:39:06 +0200
User-agent: Mutt/1.11.4 (2019-03-13)

> I noticed you removed the overlapping email domain, that was
> an extreme example, but how do I go in order to define a
> column width, i.e. when roff has to wrap the text?

In this case you could use tbl (convenient) or do manually
what tbl would do internally (gives you more freedom to fiddle
around), i.e., fill 3 diversions with text and then replay
those diversions side-by-side onto the page.

If the amount of text is limited and you don't have to worry
about text filling up the column and causing a page break,
you can also write the text directly to the page using suitable
combinations of line length and indent:

  .\"
  .\" ----------------------------------------------------------------
  .nr LL 21c-5c
  .ll \n(LLu
  .po 2.5c
  .\" ----------------------------------------------------------------
  .nr w1 3.5c
  .nr w3 3.5c
  .nr w2 \n(LL-\n(w1-\n(w3
  .\" ----------------------------------------------------------------
  .ps 10
  .vs 12
  .sp 2.5c
  .ll \n(LLu
  .mk
  \m[red]\v'-1v'\D'l 0 1c'\h'\n(w1u'\D'l 0 -1c'\h'\n(w2u'\D'l 0 
1c'\h'\n(w3u'\D'l 0 -1c'\D'l -\n(.lu 0'\m[]
  .br
  .rt
  .in 0
  .ll \n(w1u
  .ad l
  Sometown, Earth
  .br
  vs@johndoethetrueone.com
  .br
  .rt
  .in \n(w1u+\n(w2u
  .ll \n(LLu
  .ad r
  linkedin.com/in/j.doe
  .br
  github.com/j.doe
  .br
  .rt
  .in \n(w1u
  .ll \n(w1u+\n(w2u
  .ps 28
  .vs 24
  .ad c
  John \[Fo]The Doe\[Fc] Doe
  .br
  .ps 10
  .vs 12
  .sp 3
  .in 0
  .ll \n(LLu
  .ad b
  .fi
  Text

Note that if you want to allow groff to break lines then you
cannot use .nf, .ce, and .rj, but instead have to use .ad l,
.ad c, and .ad r, and break lines manually if necessary
with .br.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]