OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] Marking up exercices


On Wed, Oct 15, 2003 at 05:14:47PM +0200, Joachim Ziegler wrote:
> Bob Stayton wrote:
> >>- The exercises should be numbered throughout the whole document by the 
> >>stylesheets. (If that's not possible, then if an exercise within an 
> >>exercise section is the only one, it should not get number "1", because 
> >>that's obvious.)
> > 
> > 
> > You can number consecutively with a stylesheet customization
> > such as this:
> > 
> > <xsl:template match="question" mode="label.markup">
> >   <xsl:number level="any" count="qandaentry" format="1"/>
> > </xsl:template>
> > 
> > By setting level="any", it will consecutively count all
> > qandaentry elements in the entire document.
> 
> OK, that works.
> 
> But the number always appaear as "1.", "2." and it seems that it is in a 
> leftmost cell of a row of a table.
> 
> What I want is the word "Exercise" printed before the number:
> 
> <xsl:template match="question" mode="label.markup">
> <xsl:text>Exercise </xsl:text>
>    <xsl:number level="any" count="qandaentry" format="1"/>
> </xsl:template>
> 
> This gives me something like this in the browser
> 
> +-----------------------------------
> |Exercise | ...Text of the exercise...
> | 1.      |
> |         |
> +---------+-----------------------------
> 
> 
> It should look a simple as
> 
> Exercise 1: ... Text of the exercise...
> 
> How do I do that?

You might try replacing your space with a nonbreaking space:

<xsl:text>Exercise&#160;</xsl:text>
 
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.

-- 

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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]