Example style and count

Questions about XML that are not covered by the other forums should go here.
anna_craneo
Posts: 23

Example style and count

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:

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!
Costin
Posts: 402

Re: Example style and count

Fri Mar 02, 2018 11:52 am

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
Costin Sandoi
oXygen XML Editor and Author Support

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests