![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Feb 2017
Device: Kindle Paperwhite
|
Fails to create hanging indents in MOBI
THE PROBLEM:
I need to insert poems into an ebook. The poems need to be set apart from the plain text by some extra line spacing. In addition, poems need to have greater indentation than body text, and should have hanging indents so that long lines wrap around and the wrapped text is indented farther than the start of the line (so a reader knows this is a wrap and the poet didn't intend a new line). I achieve the hanging indents by using a negative value for text-indent. (Amazon says this is the supported method for getting a hanging indent.) I have html with my CSS built-in, and it works the way I want in a browser. When I use Calibre to convert the HTML to EPUB the result looks right. But when Calibre converts the HTML to MOBI the hanging indent disappears. The same incorrect result occurs when I use the correctly working EPUB as input to Calibre and convert it to MOBI. NON-DEFAULT SETTINGS: In Preferences, in Layout, I have "Remove spacing between paragraphs" UNchecked and "Indent size" set to No change. All other settings are default. FILE I'M CONVERTING (Here is the complete HTML): <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <head> <style type="text/css"> html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, pre, table, th, td, tr { margin: 0em; padding: 0em; } p { text-indent: 1em; } p.poemline { margin-left: 2em; text-indent: -1em; } div.poem { margin-left: 1.5em; margin-top: 0.4em; margin-bottom: 0.4em; } </style> </head> <body> <p>Here is a paragraph of ordinary text using the html "p" tag. I made it long enough to wrap on most e-readers, and also in a narrowed-down browswer window.</p> <p>Here comes some poetry!</p> <div class="poem"> <p class="poemline">The morning lit, the birds arose... and the rest of this long line is just stuff I added to make the line wrap; since this is a poem, the wrapped line should have a hangingi indent.</p> <p class="poemline">The monster’s faded eyes,</p> <p class="poemline">Turned slowly to his native coast,</p> <p class="poemline">And peace was Paradise!</p> </div> <p>And that was some poetry! Here's most ordinary text. There should be some line spacing between the poem and the ordinary text grafs before and after it.</p> </body> --------------- The job details from the conversion job (HTML to MOBI) are here: Merging user specified metadata... Detecting structure... Auto generated TOC with 0 entries. Flattening CSS and remapping font sizes... Source base font size is 12.00000pt Removing fake margins... Found 1 items of level: div_1 Found 4 items of level: p_2 Found 3 items of level: p_1 Ignoring level p_2 Ignoring level p_1 div_1 left margin stats: Counter() div_1 right margin stats: Counter() Cleaning up manifest... Trimming unused files from manifest... Creating MOBI Output... Serializing resources... Creating MOBI 6 output Applying case-transforming CSS... Parsing manglecase.css ... Rasterizing SVG images... Converting XHTML to Mobipocket markup... Serializing markup content... Compressing markup content... No TOC, MOBI index not generated MOBI output written to /var/folders/cs/13zbn_ld053g_31zsg7wk_780000gn/C/calibre_2.80.0_tmp_6XmLx3/fXQWMa.mobi ----------------------------- OUTPUT FILE: The MOBI file is attached. Any help would be appreciated. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274
Karma: 5935030
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
|
Previous discussion on this topic::
https://www.mobileread.com/forums/sh...d.php?t=176061 My advice: Give up on Mobi, it's seriously obsolete. Convert your book to AZW3 for Kindle users. Even the venerable Kindle Keybaord device was updated to support the newer file format. |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
hanging indents alignment on Kindle | backwoodsman | Calibre | 9 | 04-22-2012 03:36 AM |
Indents and hanging indents in epub poetry | Derek R | ePub | 14 | 02-19-2012 04:43 AM |
Hanging Indents | John123 | Sigil | 5 | 12-04-2011 02:33 AM |
Display of Hanging Indents | crutledge | Workshop | 1 | 09-25-2009 06:09 PM |
Hanging indents? | llasram | Kindle Formats | 11 | 01-05-2009 10:59 AM |