![]() |
#1 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
|
line breaks in EPUB
When converting a DOCX to EPUB, several sentences which are okay in Word produce line breaks in the EPUB.
Word: Arriving in San Francisco we were transported to the Victorian home we had arranged to rent in Pacific Heights located high on a hill overlooking the city. We were entranced by the sparkling waters of the bay and I remarked it wouldn’t be surprising if someday they figured out how to build a bridge across there. Invigorated by the view we arose early next day to admire the beauty of the area. Date: April 18, 1906. Time: A little past 5:00 AM. “Well, Fran, my dear, here we are in our thirty-eighth year together and we’re both awake bright and early. How would you like to celebrate today?” “Oh, Matt, it doesn’t seem possible we’ve been together that long. We’ve certainly had some wonderful times. It seems to me like every day is a celebration.” “Me, too. I thought maybe we might…” “Did you feel that? It felt like...” “Something’s shaking...” “What’s that rumbling noise? Sounds like...” (Editor's note: At 5:12 AM on April 18, 1906 San Francisco was struck by a devastating earthquake.) We were startled, frightened, and bewildered. EPUB: Arriving in San Francisco we were transported to the Victorian home we had arranged to rent in Pacific Heights located high on a hill overlooking the city. We were entranced by the sparkling waters of the bay and I remarked it wouldn’t be surprising if someday they figured out how to build a bridge across there. Invigorated by the view we arose early next day to admire the beauty of the area. Date: April 18, 1906. Time: A little past 5:00 AM. “Well, Fran, my dear, here we are in our thirty-eighth year together and we’re both awake bright and early. How would you like to celebrate today?” “Oh, Matt, it doesn’t seem possible we’ve been together that long. We’ve certainly had some wonderful times. It seems to me like every day is a celebration.” “Me, too. I thought maybe we might…” “Did you feel that? It felt like...” “Something’s shaking...” “What’s that rumbling noise? Sounds like...” (Editor's note: At 5:12 AM on April 18, 1906 San Francisco was struck by a devastating earthquake.) We were startled, frightened, and bewildered. ***** Spoiler:
Last edited by theducks; 06-25-2023 at 09:27 AM. Reason: Please Spoiler Log files |
![]() |
![]() |
![]() |
#2 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Check your MS Word Styles. Make sure no direct formatting.
Also no headers, footers, page numbers or automatic hyphenation (all those are only for paper / PDF export) No inches or cm. Only pt (or em if your version of Word supports it. 1em = 12 pt for ebooks, but not for paper!). Make sure on your dialogue that each part equals one paragraph. Do not use Shift Enter or similar, but just enter. A "shift enter" may translate to a <br /> Should be <p class="some-body">Arriving in San Francisco we were transported to the Victorian home we had arranged to rent in Pacific Heights located high on a hill overlooking the city. We were entranced by the sparkling waters of the bay and I remarked it wouldn’t be surprising if someday they figured out how to build a bridge across there.</p> <p class="some-body">“Something’s shaking...”</p> <p class="some-body">“What’s that rumbling noise? Sounds like...”</p> Don't enter blank lines to space, instead have a paragraph style that adds non-zero top (& optionally bottom) margins. Have the regular body text style for narration and dialogue have a first-line-indent value. A paragraph style for after a heading or scene break can have a zero first line indent margin. Don't set any line-spacing Last edited by Quoth; 06-25-2023 at 07:36 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Should be <p>Arriving in San Francisco we were transported to the Victorian home we had arranged to rent in Pacific Heights located high on a hill overlooking the city. We were entranced by the sparkling waters of the bay and I remarked it wouldn’t be surprising if someday they figured out how to build a bridge across there.</p> <p>“Something’s shaking...”</p> <p>“What’s that rumbling noise? Sounds like...”</p> With the style for p in CSS such as... Code:
p { margin-top: 0; margin-bottom: 0; text-indent: 1.2em; } |
|
![]() |
![]() |
![]() |
#4 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
or
.somebody { margin-top: 0; margin-bottom: 0; text-indent: 1.2em; } I didn't bother putting example CSS because it's automatically created to match the docx paragraph style. No need to edit any CSS or HTML for any text or heading if the docx is correct. |
![]() |
![]() |
![]() |
#5 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I prefer the default paragraph format to be <p>. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
|
Thank you, Quoth and JSWolf! I'll study your tips and give it a go. Much appreciated!
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
|
Update: For some odd reason, the troublesome paragraphs, although formatted the same as others in Word, had a different class block. Changing it from 20 to 13 did the trick.
Thanks again! |
![]() |
![]() |
![]() |
#8 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
But you are mostly editing existing ebooks. Creating ebooks from Word or LO Writer via docx shouldn't involve any ebook editing at all, except maybe image classes that need % and auto properties rather than absolute pixels.
|
![]() |
![]() |
![]() |
#9 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If the ePub from the DOCX has <p class="someuselessclass"> then yes it should be edited to remove the class.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Some line breaks after converting epub to azw3 | reinferrer | Conversion | 1 | 09-19-2020 07:49 AM |
Line breaks on Kindle, no line breaks on 4 PC | Siavahda | Kindle Formats | 0 | 10-20-2012 05:50 AM |
RTF to EPUB...extra line breaks | GreenMonkey | Calibre | 46 | 12-27-2010 04:25 PM |
Removing paragraph breaks present after every line in EPUB? | Snakey | Calibre | 6 | 12-17-2010 11:08 AM |
Odd line/paragraph breaks in epub and FB2? | PKFFW | Calibre | 4 | 10-01-2009 07:49 AM |