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 10-29-2014, 09:37 AM   #1
regis221
Junior Member
regis221 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2014
Device: kobo glo
Calibre PDF->EPUB - How to set up making gap only after dot?

Do you know how to set up in calibre making gaps (enters) only after dot?

I convert pdf to epub with "Heuristic Processing", but still I see unnecessary gaps on my ebook reader. Between two words is "enter", but there should be only "space".

There is maybe any css code to solve it?
regis221 is offline   Reply With Quote
Old 10-29-2014, 10:16 AM   #2
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,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by regis221 View Post
Do you know how to set up in calibre making gaps (enters) only after dot?

I convert pdf to epub with "Heuristic Processing", but still I see unnecessary gaps on my ebook reader. Between two words is "enter", but there should be only "space".

There is maybe any css code to solve it?
That sounds like the lines did not join (not unusual). Adjust the 'Unwrap factor value don a small amount (not bigger than 5 points) and try converting again

BTW EPUB does not use 'Enter' to start a new line, it ends the current code block type (eg </p> ) and starts a new one. Code Line Gaps in between don't count and exist for human eyes.

Do read the Stickies at the top of this forum and the FAQ topics on conversion at the calibre Help page
PDF is not a great source
theducks is offline   Reply With Quote
Old 10-31-2014, 04:59 AM   #3
regis221
Junior Member
regis221 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2014
Device: kobo glo
I use unwrap factor value about 0,15. It gives the best results, but sometimes I see gap on epub format after word which is the last words in pdf line (not last one in paragraph). That word is often word inside sentence and there should be only space (not a gap/"enter").

I would like to add css code for command <p class="calibre1"> </p> to make rule for calibre to use this command only if after word is dot.

If calibre use that command only after a dot, it will solve problem with breaking text in half of sentence.
But I have no idea how to write that code.

Last edited by regis221; 10-31-2014 at 05:04 AM.
regis221 is offline   Reply With Quote
Old 10-31-2014, 09:36 AM   #4
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,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by regis221 View Post
I use unwrap factor value about 0,15. It gives the best results, but sometimes I see gap on epub format after word which is the last words in pdf line (not last one in paragraph). That word is often word inside sentence and there should be only space (not a gap/"enter").

I would like to add css code for command <p class="calibre1"> </p> to make rule for calibre to use this command only if after word is dot.

If calibre use that command only after a dot, it will solve problem with breaking text in half of sentence.
But I have no idea how to write that code.
Using the editor, where I can see the code makes these easy (usually ) to create 'fixes'. IMHO trying to make this happen during a Conversion YMMV


I use a replace method to remove the 'empty paragraph' (0 or more whitespace)

Blah Blah.</p>
<p class="calibre1"> </p>

REGEX mode search:
Code:
\.</p>\s+<p class="calibre1">\s*</p>
Replace:
Code:
.</p>
Note I escape the period in the search because it is a wildcard
theducks is offline   Reply With Quote
Old 11-01-2014, 10:33 AM   #5
regis221
Junior Member
regis221 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2014
Device: kobo glo
Quote:
REGEX mode search:
Code:
\.</p>\s+<p class="calibre1">\s*</p>
Replace:
Code:
.</p>
Note I escape the period in the search because it is a wildcard
"No matches found"

Solution:
search:
Code:
([-,—,a,ą,b,c,ć,d,e,ę,f,g,h,i,j,k,l,ł,m,n,ń,o,ó,p,r,s,ś,t,u,w,y,z,ź,ż,0,1,2,3,4,5,6,7,8,9])</p>\s+<p class="calibre1">
replace:
Code:
\1

Last edited by regis221; 11-06-2014 at 08:29 PM.
regis221 is offline   Reply With Quote
Old 11-09-2014, 12:52 AM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by regis221 View Post
"No matches found"

Solution:
search:
Code:
([-,—,a,ą,b,c,ć,d,e,ę,f,g,h,i,j,k,l,ł,m,n,ń,o,ó,p,r,s,ś,t,u,w,y,z,ź,ż,0,1,2,3,4,5,6,7,8,9])</p>\s+<p class="calibre1">
replace:
Code:
\1
You do not nee all those commas.

The character set represented by [characters] matches all characters in the brackets (even if some are repeated ).
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't set Calibre as default for epub sespr Devices 5 09-24-2016 08:35 PM
EPUB to PDF - Can you set page margins? Vodevil Conversion 2 08-01-2013 10:42 AM
Trouble making my own font set - help please. bruck Kindle Developer's Corner 2 08-14-2011 11:41 AM
Help - Problems with PDF to EPUB on Calibre lushanbj Calibre 3 08-27-2010 03:00 AM
Calibre and pdf to epub JCSullivan Calibre 3 05-26-2010 09:46 PM


All times are GMT -4. The time now is 03:53 PM.


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