tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Re: .Bl and .Pp
       [not found] <20100517220042.GA21819@britannica.bec.de>
@ 2010-05-18  7:39 ` Kristaps Dzonsons
  2010-05-18 16:28   ` Joerg Sonnenberger
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kristaps Dzonsons @ 2010-05-18  7:39 UTC (permalink / raw)
  To: tech

> looking over the current list I get only parse errors from
> groff_mdoc.man now. One set is about using .Bl -column without .It and
> that I will fix. 

Hm, hold off on this one, as it will be fixed as part of my forthcoming 
fixes for `It' in a `Bl -column' to open directly into the body.  The 
beginning of this is already in place, namely, allowing parent `Bl' 
nodes to cache their type.  Then I'll define `Ta' as a true macro, and 
it just falls into place with that.

 > The second one is about using .Pp inside .Bl. I think
> that should be allowed to add line breaks. What do you think?

You mean before an `It'?  Note that with `-column' allowing multiple 
lines, I have to run a filter for disallowing block children.  Bleh.

> The file also shows another issue.
> 
> .Bl -tag -compact
> .Sm off
> .It ...
> .Sm on
> .El
> 
> triggers the assertion in mdoc_action.c:618 (post_bl_tagwidth).
> 
> I think we have to explicitly scan forward until we find an .It child,
> but what do you think?

Will look into it...
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

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

* Re: .Bl and .Pp
  2010-05-18  7:39 ` .Bl and .Pp Kristaps Dzonsons
@ 2010-05-18 16:28   ` Joerg Sonnenberger
  2010-05-18 20:07   ` Ingo Schwarze
  2010-05-23  0:14   ` Joerg Sonnenberger
  2 siblings, 0 replies; 5+ messages in thread
From: Joerg Sonnenberger @ 2010-05-18 16:28 UTC (permalink / raw)
  To: tech

On Tue, May 18, 2010 at 09:39:27AM +0200, Kristaps Dzonsons wrote:
> >looking over the current list I get only parse errors from
> >groff_mdoc.man now. One set is about using .Bl -column without .It and
> >that I will fix.
> 
> Hm, hold off on this one, as it will be fixed as part of my
> forthcoming fixes for `It' in a `Bl -column' to open directly into
> the body.  The beginning of this is already in place, namely,
> allowing parent `Bl' nodes to cache their type.  Then I'll define
> `Ta' as a true macro, and it just falls into place with that.

OK. The document is still abusive and should be fixed, but it is not
critical otherwise.

> > The second one is about using .Pp inside .Bl. I think
> >that should be allowed to add line breaks. What do you think?
> 
> You mean before an `It'?  Note that with `-column' allowing multiple
> lines, I have to run a filter for disallowing block children.  Bleh.

Yes. For normal list-like Bls, it is just a blank line. With -column, it
affects the last column primarily.

Joerg
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

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

* Re: .Bl and .Pp
  2010-05-18  7:39 ` .Bl and .Pp Kristaps Dzonsons
  2010-05-18 16:28   ` Joerg Sonnenberger
@ 2010-05-18 20:07   ` Ingo Schwarze
  2010-05-23  0:14   ` Joerg Sonnenberger
  2 siblings, 0 replies; 5+ messages in thread
From: Ingo Schwarze @ 2010-05-18 20:07 UTC (permalink / raw)
  To: tech

Hi,

> The file also shows another issue.
>
> .Bl -tag -compact
> .Sm off
> .It ...
> .Sm on
> .El
>
> triggers the assertion in mdoc_action.c:618 (post_bl_tagwidth).

I've also added this to TODO, such that it doesn't get lost.

Yours,
  Ingo
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

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

* Re: .Bl and .Pp
  2010-05-18  7:39 ` .Bl and .Pp Kristaps Dzonsons
  2010-05-18 16:28   ` Joerg Sonnenberger
  2010-05-18 20:07   ` Ingo Schwarze
@ 2010-05-23  0:14   ` Joerg Sonnenberger
  2010-05-24  2:24     ` Ingo Schwarze
  2 siblings, 1 reply; 5+ messages in thread
From: Joerg Sonnenberger @ 2010-05-23  0:14 UTC (permalink / raw)
  To: tech

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

On Tue, May 18, 2010 at 09:39:27AM +0200, Kristaps Dzonsons wrote:
> >The file also shows another issue.
> >
> >.Bl -tag -compact
> >.Sm off
> >.It ...
> >.Sm on
> >.El
> >
> >triggers the assertion in mdoc_action.c:618 (post_bl_tagwidth).
> >
> >I think we have to explicitly scan forward until we find an .It child,
> >but what do you think?
> 
> Will look into it...

Patch attached. Skip over non-It macros for this purpose.

Joerg

[-- Attachment #2: mdoc_action.c.diff --]
[-- Type: text/plain, Size: 709 bytes --]

Index: mdoc_action.c
===================================================================
RCS file: /home/joerg/cvsroot/mdocml/mdoc_action.c,v
retrieving revision 1.60
diff -u -p -r1.60 mdoc_action.c
--- mdoc_action.c	17 May 2010 23:57:06 -0000	1.60
+++ mdoc_action.c	23 May 2010 00:07:11 -0000
@@ -637,11 +637,14 @@ post_bl_tagwidth(POST_ARGS)
 	/* Defaults to ten ens. */
 
 	sz = 10; /* XXX: make this a macro value. */
-	nn = n->body->child;
+
+	for (nn = n->body->child; nn; nn = nn->next) {
+		if (MDOC_It == nn->tok)
+			break;
+	}
 
 	if (nn) {
 		assert(MDOC_BLOCK == nn->type);
-		assert(MDOC_It == nn->tok);
 		nn = nn->head->child;
 		if (MDOC_TEXT != nn->type) {
 			sz = mdoc_macro2len(nn->tok);

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

* Re: .Bl and .Pp
  2010-05-23  0:14   ` Joerg Sonnenberger
@ 2010-05-24  2:24     ` Ingo Schwarze
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Schwarze @ 2010-05-24  2:24 UTC (permalink / raw)
  To: tech

Hi Joerg,

Joerg Sonnenberger wrote on Sun, May 23, 2010 at 02:14:14AM +0200:
> On Tue, May 18, 2010 at 09:39:27AM +0200, Kristaps Dzonsons wrote:
>> Someone wrote:

>>> The file also shows another issue.
>>>
>>> .Bl -tag -compact
>>> .Sm off
>>> .It ...
>>> .Sm on
>>> .El
>>>
>>> triggers the assertion in mdoc_action.c:618 (post_bl_tagwidth).
>>>
>>> I think we have to explicitly scan forward until we find an .It child,
>>> but what do you think?

>> Will look into it...

> Patch attached. Skip over non-It macros for this purpose.

This is
  OK schwarze@

and also tested and committed in the OpenBSD tree.

Yours,
  Ingo


> Index: mdoc_action.c
> ===================================================================
> RCS file: /home/joerg/cvsroot/mdocml/mdoc_action.c,v
> retrieving revision 1.60
> diff -u -p -r1.60 mdoc_action.c
> --- mdoc_action.c	17 May 2010 23:57:06 -0000	1.60
> +++ mdoc_action.c	23 May 2010 00:07:11 -0000
> @@ -637,11 +637,14 @@ post_bl_tagwidth(POST_ARGS)
>  	/* Defaults to ten ens. */
>  
>  	sz = 10; /* XXX: make this a macro value. */
> -	nn = n->body->child;
> +
> +	for (nn = n->body->child; nn; nn = nn->next) {
> +		if (MDOC_It == nn->tok)
> +			break;
> +	}
>  
>  	if (nn) {
>  		assert(MDOC_BLOCK == nn->type);
> -		assert(MDOC_It == nn->tok);
>  		nn = nn->head->child;
>  		if (MDOC_TEXT != nn->type) {
>  			sz = mdoc_macro2len(nn->tok);
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

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

end of thread, other threads:[~2010-05-24  2:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20100517220042.GA21819@britannica.bec.de>
2010-05-18  7:39 ` .Bl and .Pp Kristaps Dzonsons
2010-05-18 16:28   ` Joerg Sonnenberger
2010-05-18 20:07   ` Ingo Schwarze
2010-05-23  0:14   ` Joerg Sonnenberger
2010-05-24  2:24     ` 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).