groff
[Top][All Lists]
Advanced

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

Re: [Groff] tbl: contolling table width


From: Werner LEMBERG
Subject: Re: [Groff] tbl: contolling table width
Date: Wed, 07 Jul 2010 21:34:34 +0200 (CEST)

> I'll try to follow up Werner's hint later. Meanwhile, looking for
> something "clever", I seem to have found that the escape "\R'...'"
> (\R'NAME VAL' sets register named NAME to value VAL) does not work
> in a table:

You've missed the following feature of tbl:

   A data item consisting only of `\Rx' (`x' any character) is
   replaced by repetitions of character `x' as wide as the column (not
   joining its neighbours).

If you use the \E escape character to hide `\R', you get the right
result, e.g.

  .TS
  tab(#);
  |l2 | l2 | l2 | l |.
  _
  Row 1, Col 1#Row 1, Col 2#Row 1, Col 3#\ER'POS1 \n[nl]'Row 1, Col 4
  Row 2, Col 1#Row 2, Col 2#Row 2, Col 3#\ER'POS2 \n[nl]'Row 2, Col 4
  .TE
  .tm POS1 == \n[POS1]
  .tm POS2 == \n[POS2]

=> POS1 == 0
   POS2 == 14000


     Werner



reply via email to

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