* Nested list spacing issue
@ 2014-11-10 17:40 Steffen Nurpmeso
2014-11-10 19:03 ` Steffen Nurpmeso
0 siblings, 1 reply; 4+ messages in thread
From: Steffen Nurpmeso @ 2014-11-10 17:40 UTC (permalink / raw)
To: tech
Hello,
I'm sure it's known but i can't find a TODO entry in cvs(1) HEAD:
suppose this
.Sh TABLE OF CONTENTS
.Bl -inset
.It Sx "DESCRIPTION"
.Bl -tag -offset indent
.It Sx "Creating a table of contents"
...
.El
...
.El
In groff v1.22.3 you will see
TABLE OF CONTENTS
DESCRIPTION
Creating a table of contents
but in mandoc v1.13.1 you get
TABLE OF CONTENTS
DESCRIPTION
Creating a table of contents
which i think lacks an initial vertical space when the .Bl is
opened? A different approach could be found below, but i don't
know if it's always like that (and am too lazy to evaluate).
--steffen
diff --git a/mandoc.1 b/mandoc.1
index 19c90f6..838ea51 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1572,6 +1572,7 @@ macro in
.Fl T Ns Cm ascii
does not assert a prior vertical break, just as it doesn't with
.Sq \&Sh .
+Likewise the first item of a nested list won't assert a vertical break.
.It
The
.Sq \&na
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Nested list spacing issue
2014-11-10 17:40 Nested list spacing issue Steffen Nurpmeso
@ 2014-11-10 19:03 ` Steffen Nurpmeso
2014-11-10 22:06 ` Ingo Schwarze
0 siblings, 1 reply; 4+ messages in thread
From: Steffen Nurpmeso @ 2014-11-10 19:03 UTC (permalink / raw)
To: tech
[-- Attachment #1: Type: text/plain, Size: 669 bytes --]
Ehm, hello,
forget about this, this is an issue with mawk(1) which doesn't
properly (imho) fflush("") before END{}, resulting in partial
output which then irritates mandoc(1) (different to groff(1) which
passed over the "EOF" already in it's sequential processing):
?0[]$ awk -v TOC=Ss -f mdocmx.awk < mdocmx.7|mandoc|v
...
TABLE OF CONTENTS
SYNOPSIS
DESCRIPTION
Creating a table of contents
...
?0[]$ mawk -v TOC=Ss -f mdocmx.awk < mdocmx.7|mandoc|v
...
TABLE OF CONTENTS
DESCRIPTION
Creating a table of contents
...
I've sent a mail to Thomas Dickey regarding this.
Sorry for the noise.
--steffen
[-- Attachment #2: Original message content --]
[-- Type: message/rfc822, Size: 3706 bytes --]
From: Steffen Nurpmeso <sdaoden@yandex.com>
To: tech@mdocml.bsd.lv
Subject: Nested list spacing issue
Date: Mon, 10 Nov 2014 18:40:10 +0100
Message-ID: <20141110174010.Dcr6rYrG%sdaoden@yandex.com>
Hello,
I'm sure it's known but i can't find a TODO entry in cvs(1) HEAD:
suppose this
.Sh TABLE OF CONTENTS
.Bl -inset
.It Sx "DESCRIPTION"
.Bl -tag -offset indent
.It Sx "Creating a table of contents"
...
.El
...
.El
In groff v1.22.3 you will see
TABLE OF CONTENTS
DESCRIPTION
Creating a table of contents
but in mandoc v1.13.1 you get
TABLE OF CONTENTS
DESCRIPTION
Creating a table of contents
which i think lacks an initial vertical space when the .Bl is
opened? A different approach could be found below, but i don't
know if it's always like that (and am too lazy to evaluate).
--steffen
diff --git a/mandoc.1 b/mandoc.1
index 19c90f6..838ea51 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1572,6 +1572,7 @@ macro in
.Fl T Ns Cm ascii
does not assert a prior vertical break, just as it doesn't with
.Sq \&Sh .
+Likewise the first item of a nested list won't assert a vertical break.
.It
The
.Sq \&na
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Nested list spacing issue
2014-11-10 19:03 ` Steffen Nurpmeso
@ 2014-11-10 22:06 ` Ingo Schwarze
2014-11-11 10:49 ` Steffen Nurpmeso
0 siblings, 1 reply; 4+ messages in thread
From: Ingo Schwarze @ 2014-11-10 22:06 UTC (permalink / raw)
To: Steffen Nurpmeso; +Cc: tech
Hi Steffen,
Steffen Nurpmeso wrote on Mon, Nov 10, 2014 at 08:03:18PM +0100:
> forget about this, this is an issue with mawk(1) which doesn't
[...]
> Sorry for the noise.
Well, i didn't look at the mawk(1) issue, but your bug report
with respect to mandoc(1) is valid in any case, and i have fixed it.
> I'm sure it's known
This bug was not known, thanks for reporting.
> but i can't find a TODO entry in cvs(1) HEAD:
> suppose this
>
> .Sh TABLE OF CONTENTS
> .Bl -inset
> .It Sx "DESCRIPTION"
> .Bl -tag -offset indent
> .It Sx "Creating a table of contents"
> ...
> .El
> ...
> .El
>
> In groff v1.22.3 you will see
>
> TABLE OF CONTENTS
> DESCRIPTION
>
> Creating a table of contents
>
> but in mandoc v1.13.1 you get
>
> TABLE OF CONTENTS
> DESCRIPTION
> Creating a table of contents
>
> which i think lacks an initial vertical space when the .Bl is
> opened?
Correct analysis.
> A different approach could be found below, but i don't
> know if it's always like that (and am too lazy to evaluate).
Frankly, the COMPATIBILITY section is a mess.
It lists minor issues that probably aren't worth it
while lacking warnings about more important issues at the same time.
One day, i'll have to clean it up.
Yours,
Ingo
Log Message:
-----------
add required vertical spacing before lists that begin
at the beginning of the first item of an enclosing list
right at the beginning of a new section or subsection;
minibug reported by Steffen Nurpmeso <sdaoden at yandex dot com>
Modified Files:
--------------
mdocml:
mdoc_term.c
Revision Data
-------------
Index: mdoc_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v
retrieving revision 1.288
retrieving revision 1.289
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.288 -r1.289
--- mdoc_term.c
+++ mdoc_term.c
@@ -572,16 +572,18 @@ print_bvspace(struct termp *p,
/* Do not vspace directly after Ss/Sh. */
- for (nn = n; nn; nn = nn->parent) {
- if (MDOC_BLOCK != nn->type)
- continue;
- if (MDOC_Ss == nn->tok)
+ nn = n;
+ while (nn->prev == NULL) {
+ do {
+ nn = nn->parent;
+ if (nn->type == MDOC_ROOT)
+ return;
+ } while (nn->type != MDOC_BLOCK);
+ if (nn->tok == MDOC_Sh || nn->tok == MDOC_Ss)
return;
- if (MDOC_Sh == nn->tok)
- return;
- if (NULL == nn->prev)
- continue;
- break;
+ if (nn->tok == MDOC_It &&
+ nn->parent->parent->norm->Bl.type != LIST_item)
+ break;
}
/* A `-column' does not assert vspace within the list. */
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Nested list spacing issue
2014-11-10 22:06 ` Ingo Schwarze
@ 2014-11-11 10:49 ` Steffen Nurpmeso
0 siblings, 0 replies; 4+ messages in thread
From: Steffen Nurpmeso @ 2014-11-11 10:49 UTC (permalink / raw)
To: tech
Hallo Ingo,
Ingo Schwarze <schwarze@usta.de> wrote:
|Hi Steffen,
|
|Steffen Nurpmeso wrote on Mon, Nov 10, 2014 at 08:03:18PM +0100:
|> forget about this, this is an issue with mawk(1) which doesn't
|[...]
|> Sorry for the noise.
|
|Well, i didn't look at the mawk(1) issue, but your bug report
Well _i_ think that if mawk(1) optimizes 'print >> NAME' by
creating some kind of file object but then if i use 'getline <
NAME' it should look wether it did so for NAME and fflush(3) that
cache automatically, since fflush("") isn't portable awk. But
even if, imho. Let's see what Thomas Dickey says.
|with respect to mandoc(1) is valid in any case, and i have fixed it.
|
|> I'm sure it's known
|
|This bug was not known, thanks for reporting.
Great this nudged for an audit that actually had some outcome.
Nonetheless way too hasty; still: all awks worked equally well in
first place, so i didn't even spend a thought on that a growth of
the manual page that was used for testing correlated with the
mawk(1) I/O buffer size and a missing automatic fflush("") and
finally resulted in a premature EOF of the mdoc(7) documented what
finally was presented to mandoc(1).
Ciao,
--steffen
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-11 10:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-10 17:40 Nested list spacing issue Steffen Nurpmeso
2014-11-10 19:03 ` Steffen Nurpmeso
2014-11-10 22:06 ` Ingo Schwarze
2014-11-11 10:49 ` Steffen Nurpmeso
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).