discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* tbl(7) output in -Tlocale
@ 2014-10-14 10:10 Anthony J. Bentley
  2014-10-14 13:56 ` Ingo Schwarze
  2018-11-28  5:11 ` Ingo Schwarze
  0 siblings, 2 replies; 3+ messages in thread
From: Anthony J. Bentley @ 2014-10-14 10:10 UTC (permalink / raw)
  To: discuss

Hi,

In a UTF-8 locale, groff will output tables with box-drawing characters.
This provides a noticeable increase in readability in terminals.

Rather than the ASCII characters +, |, and - for borders, it uses the
Unicode range U+2500 to U+256C or so.

For example, this table:

.TS
l
l.
Header
_
Data 1
Data 2
.TE

uses U+2500 BOX DRAWINGS LIGHT HORIZONTAL for the horizontal line.

This table:

.TS
tab(:) box;
c5 c5 c5.
1:2:3
4:5:6
.TE

uses U+2500 and U+2502 for the sides, and U+250C, U+2510, U+2514, and
U+2518 for the corners.

.TS
tab(:) doublebox;
c5 c5 c5.
1:2:3
4:5:6
.TE

This is an example where Groff's output is not very good: it renders as
'box' does but duplicating the top and bottom lines. Nicer would be to
use U+2550/U+2551 for the sides and U+2554, U+2557, U+255A, and U+255D
for the corners. (Even in ASCII mode it would make more sense to use =
instead of doubling up on -, since they don't make a pretense of doubling
the vertical sides anyway.)

The 'allbox' option uses everything that 'box' does plus U+251C, U+2524,
U+252C, U+2534, and U+253C. Of course, allbox isn't implemented in mandoc
anyway.

-- 
Anthony J. Bentley
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-28  5:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-14 10:10 tbl(7) output in -Tlocale Anthony J. Bentley
2014-10-14 13:56 ` Ingo Schwarze
2018-11-28  5:11 ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).