[oXygen-user] Differences in CSS counters between Author and Web Author
Jirka Kosek
jirka at kosek.cz
Thu Oct 4 04:35:04 CDT 2018
Hi,
I'm creating customized CSS stylesheet for DocBook based vocabulary. In
Author I need to prepend Figure X.Y label before each figure title.
Where X is chapter number and Y is number of figure inside chapter.
I'm doing this by providing additional styleheet in framework that is
extending DocBook framework:
figure > title:before {
content: "Figure " counter(chapter_count) "." counter(figure) " ";
}
figure {
counter-increment: figure;
}
chapter > title:before {
counter-reset: figure sect1_count;
}
This works as expected in desktop Author. However in Web Author figure
number is being reset for each section, so for example for document like
<chapter>
...
<section>
...
<figure> <!-- 1.1 -->
...
</section>
<section>
...
<figure> <!-- 1.2 -->
...
</section>
</chapter>
Web Author labels both figures as 1.1.
I have briefly looked into HTML/CSS code of Web Author and it seems that
you are somehow preprocessing Author CSS stylesheet for browser and this
particular case is not handled properly.
I suppose there is no easy workaround for this, but perhaps next version
of Web Author could fix this ;-)
Many thanks and have a nice day,
Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: jirka at kosek.cz http://xmlguru.cz
------------------------------------------------------------------
Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
Bringing you XML Prague conference http://xmlprague.cz
------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20181004/eac4fe46/attachment.sig>
More information about the oXygen-user
mailing list