This is the mail archive of the docbook@lists.oasis-open.org 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


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?

And why is a table generated at all?



--
Joachim Ziegler                       Stuhlsatzenhausweg 85
Max-Planck-Institut für Informatik    66123 Saarbrücken
Email: ziegler@mpi-sb.mpg.de          Germany


To unsubscribe from this list, send a post to docbook-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.



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