discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Bl -tag output broken with -Tpdf
@ 2014-10-09 22:56 Anthony J. Bentley
  2014-10-13 22:03 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony J. Bentley @ 2014-10-09 22:56 UTC (permalink / raw)
  To: discuss

In PDF output, item bodies in some tag lists have no text and contain
too much vertical space. For example, see the ENVIRONMENT section in
OpenBSD's ls(1).

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

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

* Re: Bl -tag output broken with -Tpdf
  2014-10-09 22:56 Bl -tag output broken with -Tpdf Anthony J. Bentley
@ 2014-10-13 22:03 ` Ingo Schwarze
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Schwarze @ 2014-10-13 22:03 UTC (permalink / raw)
  To: Anthony J. Bentley; +Cc: discuss

Hi Anthony,

Anthony J. Bentley wrote on Thu, Oct 09, 2014 at 04:56:03PM -0600:

> In PDF output, item bodies in some tag lists have no text
> and contain too much vertical space.

Actually, that was *horizontal* space wrapping over many lines.

> For example, see the ENVIRONMENT section in OpenBSD's ls(1).

I just committed the patch below to fix this.

Thanks for the report,
  Ingo


Log Message:
-----------
Properly scale string length measurements for PostScript and PDF output;
this doesn't change anything for ASCII and UTF-8.
Problem reported by bentley@.

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.282
retrieving revision 1.283
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.282 -r1.283
--- mdoc_term.c
+++ mdoc_term.c
@@ -541,8 +541,10 @@ a2width(const struct termp *p, const cha
 	struct roffsu	 su;
 
 	assert(v);
-	if ( ! a2roffsu(v, &su, SCALE_MAX))
+	if ( ! a2roffsu(v, &su, SCALE_MAX)) {
 		SCALE_HS_INIT(&su, term_strlen(p, v));
+		su.scale /= term_strlen(p, "0");
+	}
 
 	return(term_hspan(p, &su));
 }
@@ -560,8 +562,10 @@ a2offs(const struct termp *p, const char
 		return(term_len(p, p->defindent + 1));
 	else if (0 == strcmp(v, "indent-two"))
 		return(term_len(p, (p->defindent + 1) * 2));
-	else if ( ! a2roffsu(v, &su, SCALE_MAX))
+	else if ( ! a2roffsu(v, &su, SCALE_MAX)) {
 		SCALE_HS_INIT(&su, term_strlen(p, v));
+		su.scale /= term_strlen(p, "0");
+	}
 
 	return(term_hspan(p, &su));
 }
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

end of thread, other threads:[~2014-10-13 22:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-09 22:56 Bl -tag output broken with -Tpdf Anthony J. Bentley
2014-10-13 22:03 ` 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).