Skip to main content
Inspiring
May 26, 2024
Question

Epub 3/lists export: indesign does not export the parenthesis after the number

  • May 26, 2024
  • 2 replies
  • 1227 views

Epub 3/lists export: indesign does not export the parentheses after the number "a)" but transforms it into "a." although in the paragraph style of the list, in the numbered lists section I set ^#)^t in the number style. 
What should I change/add in the CSS so that the parentheses remains? Here is mine (created by indesign):

li.nuovi_elenchi_elenco-num-a- {

-epub-text-align-last:left;

color:#000000;

font-family:Arial, sans-serif;

font-size:0.917em;

font-style:normal;

font-variant:normal;

font-weight:normal;

line-height:1.2;

list-style-position:outside;

list-style-type:lower-alpha;

margin-bottom:0;

margin-left:71px;

margin-right:0;

margin-top:0;

orphans:1;

page-break-after:auto;

page-break-before:auto;

text-align:justify;

text-decoration:none;

text-indent:0;

text-transform:none;

widows:1;

 

This topic has been closed for replies.

2 replies

James Gifford—NitroPress
Legend
May 26, 2024

EPUB export loses nearly all list formatting and styling and reduces the list to an HTML structure with no more than the paragraph style applied. It then leaves the list to be structured and formatted the way the browser/reader chooses.

 

There is very little you can do about this; InDesign dosen't even export the ul/ol definition, much less any spacing or global styling applied to a list at that level.

 

Your two choices to are apply CSS list elements in the CSS export file, or to switch to InDesign's "Export as Text" option, which reproduces the source list in fairly faithful fashion, but as text paragraphs needing careful style controls and, almost unavoidably, a bit of export surgery.

 

I just added detailed info on this to the book, most of which can be found here: http://www.nitrosyncretic.com/DPR/dpr_lists.php

 

Happy to answer further questions.

Inspiring
May 26, 2024

Thanks for the quick answer.
I've already tried with "Export as Text" but it creates tabulation problems between the number and the text (I've also tried to manually arrange the css on Sigil but the alignment still results inaccurate, or in the Kindle the parenthesis wrap). However, if I leave the mapping of the lists the alignment is always correct so I opted for this function. I'll try to find a solution by modifying the CSS in sigil (is it the right way to use the ::before pseudo-elements?).

Another question: Bulleted lists with "-" are exported with "•" instead. It's normal? Do you know how I could solve in CSS?
I thank you.

Inspiring
May 30, 2024

Pretty much everything I know is in the web essay; that's a fresh update based on two weeks of bare-metal work with list export. There are often no good solutions, as you simply cannot get InDesign's elaborate list control and styling across the export divide. It's very much converting from one document structure (ID's very complex XML layout, with styles applied left and right) to the very basic HTML structure, with only one paragraph style applied to each list item.

 

That the export preserves the standard list numbering options (including lowercase roman) is a bit surprising to me. 🙂

 

Your only two choices are to use the text export method and override it at the CSS and EPUB-surgery levels, or to manually format these list elements as static paragraphs. I can post some additional detail from the book pages on managing the text format (I left most of that out of the web version.)

 

But at a very fundamental level, there is no simple fix or process. It's one of the apple-vs-orange elements of source docs into EPUB.


@James Gifford—NitroPress Hi James, your advice was very helpful. By exporting lists as text I can achieve the level of customization that is comfortable for me. But I have a problem only on Kindle (converting the epub file via send to kindle): the parenthesis of the "a)" marker is wrapped for no reason like this:
a      text
)       text
        text
On other devices, however, it works fine so I think it depends on the export to Kindle format. I thought it depended on the width of the inline block but I tried to increase it and nothing changes.
Same problem with some bullets in some places it places in the second line for no reason (even in the same list, while the other bullets are right and have the same css without local formatting):
     text
•    text
Can you figure out what it's about? This thing is driving me crazy. Thank you.

Robert at ID-Tasker
Legend
May 26, 2024

Maybe this will help:

 

https://codepen.io/geekalert/pen/OJRzeMR 

 

CSS tab.