From: Ingo Schwarze <schwarze@usta.de>
To: "Anthony J. Bentley" <anthony@cathet.us>
Cc: discuss@mdocml.bsd.lv
Subject: Re: Bl -tag output broken with -Tpdf
Date: Tue, 14 Oct 2014 00:03:28 +0200 [thread overview]
Message-ID: <20141013220328.GS31838@iris.usta.de> (raw)
In-Reply-To: <24317.1412895363@cathet.us>
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
prev parent reply other threads:[~2014-10-13 22:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 22:56 Anthony J. Bentley
2014-10-13 22:03 ` Ingo Schwarze [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=20141013220328.GS31838@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).