Can anyone help me with numbering figures?
I'm using XXE for DocBook5 XML, and I have various converters doing to a
great job converting to PDF, but I can't get XXE to display figure numbering
the same as they're coming out in PDF.
For example, with
<part>
<chapter>
<section>
<figure></figure>
</section>
<section>
<section>
<figure></figure>
</section>
</section>
</chapter>
<chapter>
<section>
<figure></figure>
</section>
</chapter>
</part>
<part>
<chapter>
<section>
<figure></figure>
</section>
</chapter>
</part>
The resulting PDFs are:
Part I
Chapter 1
Section 1.1
Figure 1.1
Section 1.2
Section 1.2.1
Figure 1.2
Chapter 2
Section 2.1
Figure 2.1
Part II
Chapter 3
Section 3.1
Figure 3.1
(I have the chapters continuing across parts, etc, but I can't get figures
to work. (and figures don't need to be more than two deep: 1.1, 1.2, 2.1
2.2, 2.3, 3.1 etc -- just x.y, not w.x.y.z....)
But in XXE editor I can't get the figure number to the right of the decimal
to count properly. In the below docbook5.imp file, the only "figure" that
works is a simple sequential numbering: 1, 2, 3, 4, ... I can't figure out
how get it to number the figures <chaper#>.<figure-count-in-this-chapter>.
None of the commented ones work.
I'd really appreciate some help if anyone's done this. Thanks.
chapter > title:first-child:before {
content: collapser() " Chapter " label(xpath, "1 +
count(../preceding::db5:chapter)") ": " ;
}
section > title:first-child:before {
content: collapser() " " label(xpath, "1 +
count(../preceding::db5:chapter)") "." simple-counter(n-) " ";
}
...
figure > title:first-child:before {
content: collapser() " Figure " label(xpath, "1 +
count(../preceding::db5:figure)") ": " ;
}
/***
figure > title:first-child:before {
content: collapser() " Figure " label(xpath, "1 +
count(../preceding::db5:chapter)") "." counter(figure) ": " ;
}
***/
/***
figure > title:first-child:before {
content: collapser() " Figure " label(xpath, "1 +
count(../preceding::db5:chapter)") "." label(xpath, "1 +
count(../preceding::db5:figure)")": " ;
}
***/
/***
figure > title:first-child:before {
content: collapser() " Figure " label(xpath, "1 +
count(../preceding::db5:chapter)") "." counter(figure) " ";
}
***/
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support