This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] term in <variablelist> is rendered incorrectly in PDF
- From: Bob Stayton <bobs at sco dot com>
- To: Jeff Beal <jeff dot beal at ansys dot com>
- Cc: "'Robert P. J. Day'" <rpjday at mindspring dot com>,docbook apps list <docbook-apps at lists dot oasis-open dot org>
- Date: Fri, 5 Sep 2003 08:21:26 -0700
- Subject: Re: [docbook-apps] term in <variablelist> is rendered incorrectly in PDF
- References: <E08C8F26F6901D42B1201763D125853801A5CF71@ntdevexc.win.ansys.com>
On Fri, Sep 05, 2003 at 09:16:01AM -0400, Jeff Beal wrote:
> FO listitems consist of a "label" part and a "body" part. These correspond
> directly to the <term/> and the <listitem/> in a DocBook <variablelist/>.
> FO processors determine the width of the "label" part from the
> provisional-distance-between-starts (PDBS) and provisional-label-separation
> (PLS) attributes on the <fo:list-block/> object.
>
> The PDBS specifies the distance from the start-edge (left for English) of
> the label to the start-edge of the body. The PLS specifies the distance
> between the end-edge of the label and the start-edge of the body. Thus, the
> width for the label part becomes PDBS - PLS.
>
> The DocBook stylesheets calculate the PDBS by determining the number of
> characters in the longest term in the stylesheets and specifying that many
> 'em' units. That is, if the longest term in your variablelist has 9
> characters, the PDBS will be '9em'. However, the PLS is hard-coded to
> 0.25in, so you only have 9em - .25in space for the term's content. Also,
> there is another hard-coded value for the maximum PDBS (12em), so if you
> have a 15-character term, the PDBS will be 12em.
>
> I found that the best way to deal with this was to experiment. Copy the
> template that matches variablelist in the 'vl.as.list' mode from lists.xsl
> into your customization layer and change the maxlength parameter that is
> passed to the 'longest.term' template and the PLS value until you get
> something that looks more like what you want.
>
> There is also the termlength attribute and a processing instruction (<?dbfo
> term-width="13em"?>) you can use to hard-code the term width into each of
> your variablelists. This may be the better approach if you only have one or
> two problematic variablelists:
Hi Jeff,
Actually, this all changed in version 1.62.0 of the
stylesheets. I made the maxlength into a new parameter
'variablelist.max.termlength'. And I changed the way the
term character count is converted to a length. Using em
was too wide, because a typical character is half an em.
So I changed the calculation to em * 0.50, but this turns
out to be just a little too narrow when using a monospace
font. The em being used is the body font, and it doesn't
know that the actual term is using an inline monospace font
property. So it calculates the width as too small and is
forced into hyphenating the result.
So I changed it in CVS to em * 0.60 and now it seems to
work much better with monospace font inlines.
As you say, you can always adjust a given variablelist
with the attribute or PI.
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org.