05-16-2024, 12:57 AM | #1 |
Member
Posts: 22
Karma: 10
Join Date: Oct 2013
Location: Torino, Italy
Device: Kobo Aura
|
DOCX > EPUB Conversion - Change list indent
When I convert my Word (DOCX) documents into EPUBs, the lists (numbered or bullet) have an excessive indent (36 pt). See example below:
I know how to manually edit the stylesheet.css in Calibre, to modify this indent. But I wonder if there's a way to permanently set the lists' indent the way I want it (e.g. 6 pt). - I checked the "Look and Feel" prefs in the Convert window, but it doesn't seem to have such option. - Is there maybe a config or ini file in the Calibre software (either on Mac or Windows), that I can edit to set this indent? |
05-16-2024, 01:03 AM | #2 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The indent comes from the input document, so change it in your word document. See th esample word file at https://manual.calibre-ebook.com/conversion.html for an example.
|
Advert | |
|
05-16-2024, 04:51 AM | #3 |
the rook, bossing Never.
Posts: 12,368
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
I create my own paragraph styles in MS Word or LO Writer rather than using built-in list styles.
|
05-16-2024, 06:08 PM | #4 |
Member
Posts: 22
Karma: 10
Join Date: Oct 2013
Location: Torino, Italy
Device: Kobo Aura
|
|
05-16-2024, 06:52 PM | #5 | |
Member
Posts: 22
Karma: 10
Join Date: Oct 2013
Location: Torino, Italy
Device: Kobo Aura
|
Quote:
The input (Word) document has an indent of 0,4 cm for the List style. The indent in the resulting EPUB is about 36 points (1,27 cm). I even tried editing the style (in Word) and removing the "Style based on: Normal" setting (putting it as "No style" instead); just in case the "Normal" style had anything to do with it. Same result. As I said in my reply above, all the styles in my Words docs are manually crafted by me, exactly the way I want them (it's part of my job, BTW ). Looks like somewhere my indent setting is ignored and a "default" setting of 36 points is used instead - for Lists at least. This has happened since I began doing these conversions (in 2015), and still happens both in Calibre 3.48 (Mac) and Calibre 7.10 (Windows). Checking the stylesheet.css in Calibre (Edit book), I see several ".block_# {" items with "margin-left" values going from "29.4 pt" to 34.1 or 40.7 (depending on the file I'm working on). If I manually set them all to "6 pt", the lists in my EPUB become the way I want. There are no such big margins in my Word docs (at least in the styles I'm using), so one wonders where those margins come from. That's why I thought Calibre uses some "default" margin or indent. Maybe they're coming from my Word docs, but from which setting? (surely not from my styles). |
|
Advert | |
|
05-16-2024, 08:32 PM | #6 |
null operator (he/him)
Posts: 21,005
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@Crescendo63 - I suggest you create a simple DOCX that attaches the template that has the Styles you want to use for lists and post it here or at https://bugs.launchpad.net/calibre so that Kovid can take a look at it.
FWIW - for highly structured documents, such as yours appears to be, I sometimes use the Mammoth DOCX->EPUB converter which requires creating a reusable mapping of the DOCX Styles to an EPUB stylesheet. I use it via a Sigil plugin (wrapper) called DOCX Input. BR |
05-16-2024, 11:53 PM | #7 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
05-17-2024, 06:27 AM | #8 |
the rook, bossing Never.
Posts: 12,368
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Are you using actual "List" settings in the paragraph style or just indents. I never use "list", simply regular body text and all the desired indents and spacings. I add the list prefix letters/numbers/roman/bullets, if needed, manually as the auto list HTML can fail on some ereaders.
So all my paragraph styles are text, except any that should be in a TOC, they get a heading level. The lists look like lists and I have no indent errors. Also I use pt for docs to be an epub, but change the editor to use cm when editing a doc to be exported as a PDF. I can save the version for epub with a new name, then overwrite the styles with a template import, add headers, footers, page numbers and change some pages to be front matter, contents, chapter start, end matter, appendix etc. For the editing for epub conversion I use a small page size with small margins (both of which are ignored by conversion to epub) to have an idea of issues with images, lists, special styles etc. |
05-17-2024, 06:35 AM | #9 | |
the rook, bossing Never.
Posts: 12,368
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
I can't use the built in heading levels as I may have different styles of headlng at the same level, and mysteriously sometimes conversion of built-in heading levels gives list HTML. The other thing I have to do is manually edit the CSS for images, because LO Writer or MS Word image handling is designed only for paper/pdfs. The ebooks don't even work quite the same as webpages. I stopped using actual MS Word a few years ago. LO 7.x and it's been good enough since version 5.x and I have two panels at the side. One is styles (All applied styles and current highlighted, or change to one double clicked) and the other is Outline/Navigator, which has all headings, links, images, bookmarks, etc and current one selected and allows jump to one double clicked. My formatting tool bar only has: paragraph style, clear format, remove format, bold, italic, subscript, superscript (as these do little different from a character style when only used for a word or part of paragraph), UPPER CASE, lower case, Language direction. All indents, lists, etc are paragraph body styles. Last edited by Quoth; 05-17-2024 at 06:43 AM. |
|
05-20-2024, 09:06 PM | #10 |
Member
Posts: 22
Karma: 10
Join Date: Oct 2013
Location: Torino, Italy
Device: Kobo Aura
|
Thank you all for the inputs.
I'll check them out as soon as possible, and then I will report the results. |
05-24-2024, 01:03 AM | #11 | |
Member
Posts: 22
Karma: 10
Join Date: Oct 2013
Location: Torino, Italy
Device: Kobo Aura
|
Quote:
I did try to use regular text with indent (no Word's List attribute) and, on conversion, this didn't produce the excessive indent, nor the several added styles in the stylesheet.css. So my issue might stem from using Word's List attribute (but why does Calibre mismanage that?). Alas, this way the indent resulted misaligned (see image below). I could fix that editing the stylesheet.css, but I'm looking to avoid manual corrections. I hope to find a solution that works without editing the EPUB. |
|
05-24-2024, 01:31 AM | #12 | |
Member
Posts: 22
Karma: 10
Join Date: Oct 2013
Location: Torino, Italy
Device: Kobo Aura
|
Quote:
Following the instructions you linked, here are the files: 1. The original Word doc: Capire gli altri CUT-XPORT.docx 2. The Calibre log: Calibre job log.txt 3. The resulting EPUB: Capire gli altri CUT-XPORT.epub The problem: as you can see from the image below, in the EPUB both lists (numbered and dotted) have a much bigger indent than the original Word doc: The following are the options I used during the conversion: - DOCX Input: Do not try to autodetect... = ON - EPUB Output: Do not split... = ON; No default cover = ON; No SVG cover = ON; Put inserted TOC... = ON Hope this helps. Let me know if you need anything else for troubleshooting. Thanks again |
|
05-24-2024, 05:01 AM | #13 | |
the rook, bossing Never.
Posts: 12,368
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
I only ever need to edit image CSS, no other CSS ever needs edited. The MS Word (and LO Writer) more advanced list features don't even work on many ereaders. You can only start from 1, A, etc. Auto list numbering and bullets doesn't even work well on HTML export. It only works 100% on direct print or PDF direct export. So for years I create a paragraph style using body text and first line indent is negative usually. Numbers / letters / bullets are manually added. It 100% works for epub. Also mobi, azw3 and KFX made from epub by Calibre or Amazon. Last edited by Quoth; 05-24-2024 at 05:10 AM. |
|
05-27-2024, 11:16 PM | #14 | |
Member
Posts: 22
Karma: 10
Join Date: Oct 2013
Location: Torino, Italy
Device: Kobo Aura
|
Quote:
Anyway, I experimented with "non-List" indented paragraph, the way you use them, and I found a set of parameters that work ok. I'm still waiting for a reply from Kovid, though, in case he finds a solution on the Calibre side. I'd like to avoid re-formatting and revising manually all the many lists in my dozen of long docs... |
|
05-28-2024, 07:06 AM | #15 | |
the rook, bossing Never.
Posts: 12,368
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
It's only a typing convenience like typing ' or " and getting ‘and’ or “and”, but even that goes wrong with '90s (gives ‘90s and it’s ’90s) feet, inches, minutes, seconds give 4’ 6” instead of 4′ 6″ (subtle use prime and double prime, not closing quotes). Now that I'm used to not have auto-list (for nearly 10 years), I don't miss it. I edited my keyboard on Windows so that alt-gr did more than áéíóú etc, but now I use Linux and alt-gr v b V B gives “ ” ‘ ’ for when auto "smart quotes" fail. Also Caps-Lock is now compose and I added Greek, prime, double prime and minus to it. The only thing I'd like extra is custom paragraph style names with levels (i.e. not body text) recognised as I never use Heading1, Heading2 etc, but I added h1, h2, h3 to the "Edit Spans & Divs" tool and simply use it to swap any <p id= and matching </p> to h2 or whatever with original properties. Calibre ignores the heading level and puts all customed named headings as <p, i.e. body. I'd like LO and Word to have more CSS orientated image properties, but I'm not using many images so I check the CSS. Most are changed to auto for height and a percent for width. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
In Docx to ePub Conversion window, wanna add Kobo Forma in the "Output Profile" list | droopy | Conversion | 3 | 04-08-2020 06:37 PM |
Convert EPUB to DOCX [Change Default Margins] | Lassox | Conversion | 3 | 04-12-2017 11:03 PM |
Epub to Docx conversion? | Hattie | Conversion | 14 | 09-13-2014 05:12 AM |
Paragraph spaces in ePub to Mobi conversion disrupts indent formatting | markpearl | Conversion | 34 | 09-21-2011 03:42 PM |
HTML to EPUB: list indent disappears | dmapr | Calibre | 8 | 04-30-2010 07:31 PM |