Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 05-09-2024, 12:01 PM   #1
MGA
Member
MGA began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2024
Device: Kobo, Clara
Strange problem with conversion from docx to epub- linebreaks

Dear friends,

I had a very weird, and hopefully small, problem with my conversion attempt.

I am quite inexperienced with these kind of things, so please forgive me for asking a silly question. My sense is that this will be very easy for an experienced user to figure out.

I was originally trying to convert a book, from pdf to epub, and I got a lot of issues from this. Then I learned that pdf is a terrible input format, so I tried the same project again, this time with docx as input format, and behold: it worked much better!

However there is a new issues that arose:

All the line breaks were removed from the book. No empty spaces between paragraphs. So I wonder, will I have to manually go through the entire document and add <br> everywhere, or is there a solution to this?

I would be very grateful for a reply, and apologies that this post does not follow the guidelines for how to post new threads, but I hope that the, assumed, simplicity of the issue can atone for this.
MGA is offline   Reply With Quote
Old 05-09-2024, 12:58 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,228
Karma: 74000000
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
I believe the mistake is in trying to format in Word with blank lines. The normal solution is to utilize styles in Word and set the paragraph style to include spacing after it.

Sent from my Pixel 7a using Tapatalk
PeterT is offline   Reply With Quote
Advert
Old 05-09-2024, 02:17 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,901
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
A holdover from Typewriter days? 2 slaps at the return lever
theducks is online now   Reply With Quote
Old 05-09-2024, 02:32 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,410
Karma: 129358310
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
What version of calibre are you using?
JSWolf is offline   Reply With Quote
Old 05-10-2024, 08:52 AM   #5
MGA
Member
MGA began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2024
Device: Kobo, Clara
Quote:
Originally Posted by JSWolf View Post
What version of calibre are you using?
Thanks, and sorry that I forgot to mention that.

The version is: 7.10.0.
MGA is offline   Reply With Quote
Advert
Old 05-10-2024, 09:02 AM   #6
MGA
Member
MGA began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2024
Device: Kobo, Clara
Quote:
Originally Posted by theducks View Post
A holdover from Typewriter days? 2 slaps at the return lever
Thank you for taking the time to reply. Unfortunatly, even at sections in the book where I have made several line breaks, the problem remains the same.

MGA is offline   Reply With Quote
Old 05-10-2024, 09:07 AM   #7
MGA
Member
MGA began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2024
Device: Kobo, Clara
Quote:
Originally Posted by PeterT View Post
I believe the mistake is in trying to format in Word with blank lines. The normal solution is to utilize styles in Word and set the paragraph style to include spacing after it.

Sent from my Pixel 7a using Tapatalk
Thank you, that is interesting and I might experiment with this, but I thought that an ordinary line break would have been simple for Calibre to recognise.

Best regards,
MGA is offline   Reply With Quote
Old 05-10-2024, 11:57 AM   #8
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,393
Karma: 87454321
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Never have blank lines. Use a paragraph style in MS Word or LO Writer.
Similarly never more than one space, never tabs and never a space at the start of a line or the end. Use paragraph styles etc.

I actually search and delete them before a final save.
Quoth is offline   Reply With Quote
Old 05-10-2024, 12:44 PM   #9
Jaws
JCL Punch-Card Collector
Jaws began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
Quote:
Originally Posted by MGA View Post
Thank you, that is interesting and I might experiment with this, but I thought that an ordinary line break would have been simple for Calibre to recognise.

Best regards,
One difficulty with expecting Calibre to recognize a "blank line" as merely a "paragraph break" is that for many input formats, the "blank line" marks not spacing between paragraphs but a section break without decoration. Acknowledging that limits what Calibre can choose to recognize automatically.

If publishers would always mark section breaks with decoration (which is not how they will/have ever done for on-paper editions), this would be less of a problem and perhaps the default treatment could be different. Nope.
Jaws is offline   Reply With Quote
Old 05-10-2024, 01:56 PM   #10
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,393
Karma: 87454321
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
You can have a first-paragraph-is-scene break style in the MS Word or LO Writer with no first line indent and as much top margin space as you iike.

Or a scene-break style that has top, & bottom margins and is centered with 0 for left and right margin and put one of
. . .
* * *
~
-



etc. in that scene break paragraph.

There is no need ever in an ebook (or source wordprocessor file) to use directly entered empty lines, extra spaces or tabs. Not even for paper print. It's only for an MSS typed on a physical mechanical typewriter. Obsoleted 40+ years ago.

Anything deliberately at the top of a page (like a heading that forces a new page) is better with padding-top as margin-top is often ignored for the first element on a new page. Web sites don't have pages like ebooks, except on the Print option.

Last edited by Quoth; 05-10-2024 at 01:59 PM.
Quoth is offline   Reply With Quote
Old 05-10-2024, 02:12 PM   #11
MGA
Member
MGA began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2024
Device: Kobo, Clara
Quote:
Originally Posted by Quoth View Post
Never have blank lines. Use a paragraph style in MS Word or LO Writer.
Similarly never more than one space, never tabs and never a space at the start of a line or the end. Use paragraph styles etc.

I actually search and delete them before a final save.
Thanks for all your help.

I just wonder about this thing with no more than one space. I assume that you mean how we structure the document aside from what we do with the paragraph style function? Or would it be complicated to create larger "empty spaces", for example around verse, to separate it a bit from the regular text.

And also, if we use paragraph style in LO Writer, would that mean that each single paragraph would get particular HTML-coding in the final EPUB version? Sorry for asking, this is rather complicated for someone relatively inexperienced in this domain.

Best wishes,
MGA is offline   Reply With Quote
Old 05-10-2024, 02:19 PM   #12
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,228
Karma: 74000000
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Nothing prevents you having multiple pre defined paragraph styles; one for regular text and a different one for verse. Then it's just a question of assigning the correct style to a paragraph. Additionally modifying the style propagates the new styling to all paragraphs.

Sent from my Pixel 7a using Tapatalk
PeterT is offline   Reply With Quote
Old 05-10-2024, 05:00 PM   #13
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,393
Karma: 87454321
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Each MS Word or LO Writer "paragraph style" is mapped 1:1 to CSS in the converted to epub.

You can have as many styles as you want, and normally one is the default for ordinary paragraphs.

Typically you might have a style for each of
Title
author
headings that are new pages but not chapters (front and end matter pages)
chapter headings (these are usually having a heading level of 1 or 2)
other headings that don't make a new page
First paragraph after a chapter heading
quotations, letters etc
a scene break paragraph
a regular paragraph

You would also have paragraph styles for lists, preambles, notes, marginalia etc.

A paragraph or line in a different font gets a style.

The ONLY things ever direct formatted (and character styles can be used) are some words in a paragraph in bold or italic (and bold in fiction is really only for headings and sub headings), superscripts and subscripts (best avoided). Never centre, left, right, fully justify by format tools, use a style.

A text book or reference work is far more complicated.

Basically, no direct formatting. Delete all from the formatting tool bar except italics if writing fiction. Use styles.
The Enter/Return key only ends a heading (a short paragraph), list item or paragraph. Even lists are best as a simple paragraph style and manually enter the number, bullet or letter at the start of each item, because HTML lists are less flexible on ereaders than web pages.
Never press tab, or space more than once, or Enter more than once.
All spacing and layout for paper or ebook should be by styles. Tables are only 100% OK for paper. They are a hazard for ebooks.
Images are best at one per line unless small and the same height and in a centred paragraph.
Do not set line height. That's for paper. Only use margins and padding.
No headers or footers: Only for paper.
Only one page style and make it small to get an idea of what fits on a small screen, A5, or about 6″ x 4.5″ with about 10 to 18 pt margins all around.
Most ebooks are read on phones!

Remember the Wordprocessor defaults are likely for Letter or A4 size business reports.

Save all your styles as a default template.
You can have a different one for paper print and load it in Overwrite mode and then Save As a different name.
If using LO Writer only edit & save ODT as opening a docx is a conversion. Do an extra Save As in docx.

A poem might have multiple paragraph styles: first line of first verse, first lines, body lines, last lines and then last line of last verse.

first line of first verse: bigger top margin to offset from main text.
body lines: no top or bottom margin, or to tasts
first lines: extra top margin
last lines: extra bottom margin
last line last verse: extra bottom margin to offset from main text.

For a LtoR language they would all be left justified. A poem title might be centred and bold style.

A regular paragraph has a larger first line indent than the body. A poem line or list item has a smaller first line indent than the left margin so if the screen is small and it wraps it looks like one wrapped line and not a regular paragraph.
Quoth is offline   Reply With Quote
Old 05-11-2024, 03:00 AM   #14
MGA
Member
MGA began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2024
Device: Kobo, Clara
Quote:
Originally Posted by PeterT View Post
Nothing prevents you having multiple pre defined paragraph styles; one for regular text and a different one for verse. Then it's just a question of assigning the correct style to a paragraph. Additionally modifying the style propagates the new styling to all paragraphs.

Sent from my Pixel 7a using Tapatalk
I understand. Thanks for explaining!
MGA is offline   Reply With Quote
Old 05-11-2024, 03:02 AM   #15
MGA
Member
MGA began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2024
Device: Kobo, Clara
Quote:
Originally Posted by Quoth View Post
Each MS Word or LO Writer "paragraph style" is mapped 1:1 to CSS in the converted to epub.

You can have as many styles as you want, and normally one is the default for ordinary paragraphs.
(---)
Woww, that is priceless. Thank you very much.
MGA is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion problem Docx to epub font failure sinbadalexandros Conversion 1 04-10-2020 03:17 AM
Heading style problem at docx to mobi conversion resolfe Conversion 2 04-18-2019 10:38 AM
Epub to Docx conversion? Hattie Conversion 14 09-13-2014 04:12 AM
Conversion of Endnotes .docx to .epub profjones Conversion 1 11-01-2013 08:05 AM
Strange image conversion problem ePub to mobi AlexBell Conversion 19 09-10-2011 02:42 AM


All times are GMT -4. The time now is 04:48 PM.


MobileRead.com is a privately owned, operated and funded community.