This is the mail archive of the mailing list for the DocBook project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook] Marking up exercices

On Thu, Oct 16, 2003 at 09:19:57AM +0200, Joachim Ziegler wrote:
> Bob Stayton wrote:
> > You might try replacing your space with a nonbreaking space:
> > 
> > <xsl:text>Exercise&#160;</xsl:text>
> >  
> This works well for the HTML output, but in PDF output, the space 
> vanishes, so you have something like "Exercise1".

The space doesn't disappear when I use it for FO output
with FOP.  But the left area needs to be widened.
There is a similar processing instruction for fo output:

<?dbfo label-width="2.5cm" ?>

(FOP doesn't like percentages, although they should work).
You would have to put this in each qandaset.

> > An alternative is a processing instruction in
> > the qandaset to widen the left column:
> > 
> > <?dbhtml label-width="15%" ?>
> > 
> >>And why is a table generated at all?
> > 
> > 
> > I'm not sure, but I suspect to permit the alignment of the
> > question and answer labels and paragraphs.  A table permits
> > more control over the formatting than a <dl> list provides.
> Would it be hard to customize my stylesheet so that it does not create a 
> table, but merely somthing like "Exercise 1: bla bla bla..."?
> A table is not appropriate for the printed version here.
> Where do I have to start from?

For FO output, the stylesheet uses a fo:list-block instead
of a table.  The fo:list-block is started by the
<qandaset> element, and each of <question> and <answer> generate
a fo:list-item element.  I think you would have to customize
the templates for all three elements (in fo/qandaset.xsl)
to not use fo:list-block. 


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887

To unsubscribe from this list, send a post to, or visit

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]