Quantcast
Channel: MobileRead Forums - Conversion
Viewing all articles
Browse latest Browse all 3969

Calibre rules out shifting ordered lists to the right

$
0
0
Hello, I have a problem with the ordered lists in the epub to kepub conversion (also epub to epub).
I want to shift the lists a bit to the right, so that the item numbers are aligned with the text-indent of the normal p (by default, the item text is what is aligned with p's text-indent).
I achieve this in epub with:
Code:

p { margin:.2em 0; text-align:justify; text-indent:9%; }
ul, ol {
        display: block;
        margin:1em 0 1em 9%; /* aligns item text with p indent */
        padding-left:1em; /* shift to align the item number */
}

where with padding-left:1em I get the additional offset I need for the item number.

The problem is that although this looks fine in epub, Calibre discards it when converting to both kepub (which I need) and epub (which I do to test).
The result is:
Code:

<ol class="calibre3">
    <li class="calibre4">...

Where:
Code:

.calibre3 {
  display: block;
  list-style-type: decimal;
  margin-bottom: 1em;
  margin-right: 0;
  margin-top: 1em;
}
.calibre4 {
  display: list-item;
  text-align: justify;
}

There is no allusion to the left margin anymore.
So how could I achieve what I want, i.e. shift the lists a certain amount to the right?

Thank you very much in advance. I really appreciate your work.

Viewing all articles
Browse latest Browse all 3969

Trending Articles