I am using prince to convert my markdown notes into pdfs. But the indentations of lists, whether in Chinese or English texts(==> see the attachments), take up so much blank space, which is a huge waste. How can I narrow down the space of indentation ahead of all the lists?
Forum › How do I...?
Space of indentation for lists is too much?
The indentation is effected by a non-zero margin on ol/ul elements in Prince user agent style sheet (style/html.css). You can override the margin in your own style sheet:
Note that browsers (and the current HTML spec) indent lists by setting a non-zero padding, so if you set a non-zero margin, the list will be indented by both the margin and the padding when viewed in a browser. Therefore, you might want to explicitly zero out either the margin or the padding:
We are considering making a change to the Prince user agent style sheet for future versions.
ol, ul {
margin-left: 40px;
}
Note that browsers (and the current HTML spec) indent lists by setting a non-zero padding, so if you set a non-zero margin, the list will be indented by both the margin and the padding when viewed in a browser. Therefore, you might want to explicitly zero out either the margin or the padding:
ol, ul {
margin-left: 0;
padding-left: 40px;
}
We are considering making a change to the Prince user agent style sheet for future versions.