discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: "Anthony J. Bentley" <anthony@cathet.us>
Cc: discuss@mdocml.bsd.lv
Subject: Re: tbl(7) text blocks
Date: Fri, 28 Mar 2014 22:30:59 +0100	[thread overview]
Message-ID: <20140328213059.GB10236@iris.usta.de> (raw)
In-Reply-To: <20314.1395991264@cathet.us>

Hi Anthony,

Anthony J. Bentley wrote on Fri, Mar 28, 2014 at 01:21:04AM -0600:

> Groff's tbl(1) manual has a section named "Text blocks." Quoting from it:
> 
>   A text block can be used to enter data as a single entry which would be
>   too long as a simple string between tabs.  It is started with `T{' and
>   closed with `T}'.  The former must end a line, and the latter must
>   start a line, probably followed by other data columns (separated with
>   tabs or the character given with the tab global option).

That's supported by mandoc as well, quoting tbl(7):

    If the last cell of a line is T{, all subsequent lines are included
    as part of the cell until T} is specified as its own data cell.
    It may then be followed by a tab (or as designated by tab) or an
    end-of-line to terminate the row.

> This feature is used by reStructuredText. For example, the following
> selection from mpv(1)'s documentation:
> 
>     =============   ================================================
>     left-click      play previous file in playlist
>     shift+L-click   show playlist
>     =============   ================================================
> 
> generates the following tbl(7) source:
> 
> .TS
> center;
> |l|l|.

Hum.  What mandoc doesn't seem to support is leading vertical lines
(ignored, see tbl_term.c, term_tbl(), 
 if (NULL != hp->prev) tbl_vrule(tp, hp); )
and trailing vertical lines
(errors out, see tbl_layout.c, cell() handles '|' at the beginning,
 but not at the end).

> _
> T{
> left\-click
> T}	T{
> play previous file in playlist
> T}
> _
> T{
> shift+L\-click
> T}	T{
> show playlist
> T}
> _
> .TE

The following slight modification works with mandoc:

.TH bentley140328mod 1
.SH NAME
bentley140328 \- bug report
.SH DESCRIPTION
normal text
.TS
box center;
l | l.
T{
left\-click
T}	T{
play previous file in playlist
T}
_
T{
shift+L\-click
T}	T{
show playlist
T}
.TE
normal text

Probably, the two missing features should be implemented in mandoc.

Thanks for the report,
  Ingo
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2014-03-28 21:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28  7:21 Anthony J. Bentley
2014-03-28 21:30 ` Ingo Schwarze [this message]
2014-03-28 23:37   ` Ingo Schwarze
2014-03-29  0:02     ` Anthony J. Bentley
2014-03-28 21:50 ` Guy Harris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140328213059.GB10236@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=anthony@cathet.us \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).