groff
[Top][All Lists]
Advanced

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

Re: Register for text width to be used with \l'..'?


From: G. Branden Robinson
Subject: Re: Register for text width to be used with \l'..'?
Date: Fri, 8 Nov 2024 09:58:56 -0600

Hi Oliver,

At 2024-11-08T16:26:28+0100, Oliver Corff wrote:
> if I want to draw a line spanning my whole text block using \l'nn', I
> usually do it the quick and dirty way and use a number which produces
> a visual fit, e.g. for an A4 page with default margin settings in ms I
> say \l'46' (which is visibly a tiny bit too short but ok for my
> current purpose).
> 
> Is there a way to feed the text width to \l directly? I studied the
> list of predefined registers but there does not seem to be one.

Something like this?

$ nroff -t -ms ATTIC/hrule-in-text-block.ms|cat -s

This is an ms document.

This      is
a table   ...with  a  text block
          in it.  Let’s  see  if
          we can draw a horizon‐
          tal  rule  inside  the
          text block.
          ______________________
          Did that work?

If so, just use the `.l` register.

groff(7):

Registers
...
   Read‐only registers
     Predefined registers whose identifiers start with a dot are read‐
     only.  Many are Boolean‐valued.  Some are string‐valued, meaning
     that they interpolate text.  A register name (without the dot) is
     often associated with a request of the same name; exceptions are
     noted.
...
     \n[.l]         Line length; see .ll.

$ cat ATTIC/hrule-in-text-block.ms
.LP
This is an
.I ms
document.
.LP
.TS
tab(@);
L L.
This@is
a table@T{
\&.\|.\|.\|with a text block in it.
Let's see if we can draw a horizontal rule
inside the text block.
.br
\l'\n[.l]u'
.br
Did that work?
T}
.TE

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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