Page 1 of 1

Example style and count

Posted: Thu Mar 01, 2018 4:31 pm
by anna_craneo
Hi,

I use PDF Chemistry and CSS styling to format my PDFs.
I would like to change my border look for example element, but it doesn't work if I use common CSS border style.
Code looks like this:

Code: Select all


*[class~="topic/example"] {
/*See -colors.css*/
display: block;
margin:10px 0;
padding:0.2em;
border: 1px;
border-color: #4B4646;
border-radius: 0 10px;
background-color: #DCF0F7;
}
I also want to add Example (examplecount) and tried to do like this:

Code: Select all

/* Reset the counters */
*[class ~= "map/map"] {
counter-reset: page 1 part 0 chapter 0 figcount 0 tablecount 0 examplecount 0;
}
....
@media print {
/*
Put a number before the figure title.
The counter is reset in p-page-titles-and-numbers.css
*/

*[class~="topic/example"] {
counter-increment: examplecount;
}
*[class~="topic/example"] > *[class~="topic/title"]:before {
content: "Example " counter(examplecount) ".";
}
}
But it doesn't affect the output at all.

I would really appreciate any help!

Re: Example style and count

Posted: Fri Mar 02, 2018 11:52 am
by Costin
Hello,

In order to help us investigate and find a solution, could you please send us some sample files (a minimal DITA Map containing the topic(s) you need to style in the PDF output) and the CSS you are using?
You should zip the files and send the archive to support@oxygenxml.com

Regards,
Costin