discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: discuss@mdocml.bsd.lv
Subject: Re: tbl example - what should be fixed?
Date: Wed, 18 May 2011 11:36:47 +0200	[thread overview]
Message-ID: <4DD3932F.5020902@bsd.lv> (raw)
In-Reply-To: <20110518063023.GE1321@procyon.xvoid.org>

On 18/05/2011 08:30, Yuri Pankov wrote:
> On Tue, May 17, 2011 at 03:13:13PM +0200, Kristaps Dzonsons wrote:
>>> We have a lot of manpages having the similar looking tables:
>>> .TS
>>> tab(\a) box;
>>> cw(2.75i) |cw(2.75i)
>>> lw(2.75i) |lw(2.75i)
>>> .
>>> TYPE\aVALUE
>>> _
>>> Type1\aValue1
>>> _
>>> Type2\aValue2
>>> .TE
>>>
>>> Output of -Tlint:
>>> tbl.example:2:5: ERROR: skipping bad character: ignoring byte
>>> tbl.example:2:6: ERROR: bad table syntax
>>> tbl.example:3:12: ERROR: bad table layout
>>> tbl.example:4:12: ERROR: bad table layout
>>> tbl.example:6:15: ERROR: skipping bad character: ignoring byte
>>> tbl.example:6:4: ERROR: bad table layout
>>> tbl.example:8:4: ERROR: skipping bad character: ignoring byte
>>> tbl.example:8:2: ERROR: bad table layout
>>> tbl.example:10:20: ERROR: skipping bad character: ignoring byte
>>> tbl.example:10:1: ERROR: bad table layout
>>> tbl.example:1:1: ERROR: no table data cells specified
>>>
>>>
>>> My questions is, is there anything that could/should be fixed/improved
>>> in tbl parser, or all of the errors are 100% correct and should be fixed
>>> in the manpages?
>>
>> Yuri,
>>
>>   From mdoc.7:
>>
>> LANGUAGE SYNTAX
>>        mdoc documents may contain only graphable 7-bit ASCII
>>        characters, the space character, and, in certain circumstances,
>>        the tab character.
>>
>> The tbl.7 manuals says the same.  But you have non-ASCII characters in
>> the input.  groff is probably letting you get away with this by simply
>> reading through the binary to the ')', but mandoc throws away the binary
>> characters before parsing.
>>
>> Second, you did raise a bug!  I was looking for modifiers for the
>> vertical bar, i.e., a|b ->  error.  I just committed a fix for this.
>>
>> The stand-alone period is another problem.  groff *should* ignore it by
>> its own definition of a no-op macro.  But as it occurs in a tbl context,
>> it's different?  Blje...  For now, just put the period on the same line
>> as the last macro.
>
> Thanks, Kristaps. I was just making sure what I should fix locally (a
> simple sed script took care of it..)

Yuri, great!  The multibyte char is something that can be solved in 
different ways, but I've added an entry to the TODO regarding the 
standalone period, which should be implemented if you're seeing it in 
the wild.

Thanks,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

      reply	other threads:[~2011-05-18  9:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16 11:18 Yuri Pankov
2011-05-17 13:13 ` Kristaps Dzonsons
2011-05-18  6:30   ` Yuri Pankov
2011-05-18  9:36     ` Kristaps Dzonsons [this message]

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=4DD3932F.5020902@bsd.lv \
    --to=kristaps@bsd.lv \
    --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).