I'm having some trouble getting Prince to render my ordered lists the way I would like to see them. They render fine when I look at the HTML content in a browser, but not when a PDF is produced. I have two basic problems. I'm using Prince 10.
Problem #1 - Nested List Items aren't numbering correctly
I have HTML which looks like this:
I'm trying to get something which looks like this:
Instead, Prince gives me this:
I'm using the following CSS
I've tried a couple other variations but nothing works. The code above, however will display correctly in Chrome.
My other problem has to do with the formatting of the items themselves. In Chrome, the numbers are indented from the rest of the content, and the sub-level OL is indented further. In Prince, the numbers all appear outside of the margin, and the inner OL is displayed at the same level as the outer OL. My guess is there is some style setting that the browser is using by default that I'm not using and the Prince style sheet is doing something different with the positioning.
Any pointers on how to get this to lay out correctly in both HTML and PDF would be greatly appreciated.
Thanks!
Jim
Problem #1 - Nested List Items aren't numbering correctly
I have HTML which looks like this:
<ol type="1">
<li>List Item 1</li>
<ol type="a">
<li>Sub item a</li>
<li>Sub item b</li>
<li>Sub item c</li>
</ol>
<li>List item 2</li>
<li>List item 3</li>
</ol>
I'm trying to get something which looks like this:
1. List Item 1
a. Sub item a
b. Sub item b
c. Sub item c
2. List Item 2
3. List Item 3
Instead, Prince gives me this:
1. List item 1
b. Sub item a
c. Sub item b
d. Sub item c
5. List item 2
6. List item 3
I'm using the following CSS
ol {
list-style-position: inside;
li {
list-style-type: decimal;
font-weight: bold;
}
}
ol ol {
counter-reset: li;
li {
list-style-type: lower-latin;
font-weight: normal;
}
}
I've tried a couple other variations but nothing works. The code above, however will display correctly in Chrome.
My other problem has to do with the formatting of the items themselves. In Chrome, the numbers are indented from the rest of the content, and the sub-level OL is indented further. In Prince, the numbers all appear outside of the margin, and the inner OL is displayed at the same level as the outer OL. My guess is there is some style setting that the browser is using by default that I'm not using and the Prince style sheet is doing something different with the positioning.
Any pointers on how to get this to lay out correctly in both HTML and PDF would be greatly appreciated.
Thanks!
Jim