Example style and count
Posted: Thu Mar 01, 2018 4:31 pm
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:
I also want to add Example (examplecount) and tried to do like this:
But it doesn't affect the output at all.
I would really appreciate any help!
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;
}
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) ".";
}
}
I would really appreciate any help!