Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-21-2019, 08:37 AM   #1
ebookscovers
Enthusiast
ebookscovers began at the beginning.
 
Posts: 49
Karma: 10
Join Date: Mar 2016
Device: Ipad mini 2
Calibre paragraph breaks issue

Hi there. I’m looking for a quick ePub ebook solution. Where there is a text break the author wants a little skull symbol inserted which is an actual font to add a nice touch to the book. I don’t want to use the font as I figure there will be issues along the way on certain devices and through the conversion process etc. To avoid font issues I want to convert the skull font into a little jpg I can use on the specified text breaks throughout. But That way I would have to manually put in each skull image text break. Is there a faster way? And does the skull image break have to be a separate component with the chapter or can it be inserted within the chapter text with a wraparound ? Here’s hoping
ebookscovers is offline   Reply With Quote
Old 03-21-2019, 09:06 AM   #2
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 73,624
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Use a PNG, not a JPG. Better still, use a vector SVG (if we're talking about ePub only. If you're also targeting Kindle, you'll want a PNG).

As for the coding, I not quite sure what you're asking. the image would be included only once, and then referenced wherever you use it.

For use in text-breaks, presumably you already have text-break elements. It's just a question of inserting it in those.
pdurrant is offline   Reply With Quote
Old 03-21-2019, 09:44 AM   #3
ebookscovers
Enthusiast
ebookscovers began at the beginning.
 
Posts: 49
Karma: 10
Join Date: Mar 2016
Device: Ipad mini 2
Thanks for reply. I’ll go with png format. Will be putting in text breaks. Like you said use once then reference wherever it’s used. What code template would I use for referencing or copying pasting throughout where required? I haven’t inserted text break elements as yet. David
ebookscovers is offline   Reply With Quote
Old 03-21-2019, 10:45 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: 30,897
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Moderator Notice
Moving to EPUB as this has nothing to do with recipes in Calibre


Fleurons are just another Block, typically centered with top and bottom margins.
theducks is offline   Reply With Quote
Old 03-21-2019, 11:30 AM   #5
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,304
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
example:

Code:
HTML:
<p>Last para before text break.</p>

<div class="TxtBrk"><img alt="" src="../Images/skull.png"></div>

<p>First para after text break.</p>


CSS:
p              {text-indent:1.2em}
div.TxtBrk     {margin:2em auto; text-align:center}
div.TxtBrk img {width:10%; max-width:100px}
div.TxtBrk + p {text-indent:0}
Where you set the actual width of the image as the max-width in pixels and the width in percentage of the screen you want the image to fill.

You can style the first paragraph after the break to look different than the normal/standard paragraph by using the div.TxtBrk + p css.

Please - only put one skull.png image in your ebook...it's amazing how many books I've seen with 200+ copies of the same image just because it is used 200+ times in the book...
Turtle91 is offline   Reply With Quote
Old 03-21-2019, 11:48 AM   #6
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: 30,897
Karma: 60358908
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 Turtle91 View Post
example:

Code:
HTML:
<p>Last para before text break.</p>

<div class="TxtBrk"><img alt="" src="../Images/skull.png"></div>

<p>First para after text break.</p>


CSS:
p              {text-indent:1.2em}
div.TxtBrk     {margin:2em auto; text-align:center}
div.TxtBrk img {width:10%; max-width:100px}
div.TxtBrk + p {text-indent:0}
Where you set the actual width of the image as the max-width in pixels and the width in percentage of the screen you want the image to fill.

You can style the first paragraph after the break to look different than the normal/standard paragraph by using the div.TxtBrk + p css.

Please - only put one skull.png image in your ebook...it's amazing how many books I've seen with 200+ copies of the same image just because it is used 200+ times in the book...

Yep Very annoying to find (and it bloats file size. which might cost you for download charges)
theducks is offline   Reply With Quote
Old 03-24-2019, 08:37 AM   #7
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: 79,088
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Turtle91 View Post
example:

Code:
HTML:
<p>Last para before text break.</p>

<div class="TxtBrk"><img alt="" src="../Images/skull.png"></div>

<p>First para after text break.</p>


CSS:
p              {text-indent:1.2em}
div.TxtBrk     {margin:2em auto; text-align:center}
div.TxtBrk img {width:10%; max-width:100px}
div.TxtBrk + p {text-indent:0}
Where you set the actual width of the image as the max-width in pixels and the width in percentage of the screen you want the image to fill.

You can style the first paragraph after the break to look different than the normal/standard paragraph by using the div.TxtBrk + p css.

Please - only put one skull.png image in your ebook...it's amazing how many books I've seen with 200+ copies of the same image just because it is used 200+ times in the book...
That is ugly formatted code. I cannot stand CSS code that's all on one line.
JSWolf is offline   Reply With Quote
Old 03-24-2019, 03:09 PM   #8
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: 30,897
Karma: 60358908
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 JSWolf View Post
That is ugly formatted code. I cannot stand CSS code that's all on one line.
But it is valid! The render engine does not care

I prefer readability over saving a couple of byte used by CR LF's
theducks is offline   Reply With Quote
Old 03-25-2019, 01:03 AM   #9
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,202
Karma: 34984330
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
Just another thought about the skull decoration ---
Depending on how it displays proportionate with the font, it might be preferable to code the width in em instead of percentage of screen width. If someone is reading on a very large screen with a smallish font, 10% would be enormous in comparison the text.

I usually put this kind of decoration into a custom font, so that it is actually a font character, but when using a small image, I use ems. (except for old Mobi7, where I think you MUST set it in pixels)

div.TxtBrk img
{
width: 4em;
max-width: 100px;
}

Last edited by GrannyGrump; 03-25-2019 at 01:07 AM.
GrannyGrump is offline   Reply With Quote
Old 03-25-2019, 01:51 AM   #10
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
beware of ( and test if possible) . moon+ reader will sometimes grotesquely enlarge such breaks IF they have been inserted as pictures.
I can't be more precise, because when it happens in books I am reading , I go in and zap the offending code !
stumped is offline   Reply With Quote
Old 03-29-2019, 10:48 AM   #11
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: 79,088
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
But it is valid! The render engine does not care

I prefer readability over saving a couple of byte used by CR LF's
I know it's valid. It's just not all that easy to read sometimes.
JSWolf is offline   Reply With Quote
Old 03-29-2019, 04:30 PM   #12
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,751
Karma: 168431891
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by theducks View Post
But it is valid! The render engine does not care

I prefer readability over saving a couple of byte used by CR LF's
Quote:
Originally Posted by JSWolf View Post
I know it's valid. It's just not all that easy to read sometimes.
So you both agree that it's valid but you prefer a more human readable layout. Add me to the list of those who agree with that PoV.
DNSB is online now   Reply With Quote
Old 03-30-2019, 01:51 AM   #13
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
I hypothese that while a render engine may not "care" about over-complex code, it could slow things down when it has to decipher lots of it, via a low powered e-ink reader cpu ?

i can recall instances - back wen I had the old Sony e-readers, that they would sometimes glitch on awful code constructs, and were happier after I stripped then out.
stumped is offline   Reply With Quote
Old 03-30-2019, 04:20 PM   #14
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,304
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
That is ugly formatted code. I cannot stand CSS code that's all on one line.
I will certainly add that to the list I keep of things you cannot stand...and file it appropriately...

Spoiler:
1) This was an example of inserting an image as a scene break - not as "approved by JSWolf CSS formatting".

2) If you think "{width:10%; max-width:100px} or {margin:2em auto; text-align:center}" is overly complex and unreadable, then you just need more practice...the little semi-colon thingie means there are different commands on the same line - which the computer has no issues reading whatsoever - neither do I.

3) I do not care about the minuscule number of bytes saved by not using CR/LF...it is an organizational thing for me. I use the same standard CSS file as a baseline. I know that all the CSS on the page is correct...I'm not looking to decipher what each item does...that's why I name the selectors appropriately in the first place. I don't like to scroll through page after page of css while I'm looking for something. The selectors are all nice and organized and lined up on the left side of the screen for me to quickly find the one I care about...then I can edit it as, and if, necessary. I have no trouble identifying the semicolon and realizing that it means different styles... It's a shame that you do.

4) When I am done editing I use a neat little (Sigil) plugin "cssRemoveUnusedSelectors" that ...wait for it ... Removes Unused Selectors ... AND ... Reorganizes the CSS into a format that you would approve of...because it's "pretty"??




Quote:
Originally Posted by GrannyGrump View Post
Just another thought about the skull decoration ---
Depending on how it displays proportionate with the font, it might be preferable to code the width in em instead of percentage of screen width. If someone is reading on a very large screen with a smallish font, 10% would be enormous in comparison the text.

I usually put this kind of decoration into a custom font, so that it is actually a font character, but when using a small image, I use ems. (except for old Mobi7, where I think you MUST set it in pixels)

div.TxtBrk img
{
width: 4em;
max-width: 100px;
}

That's a great idea - I'll give it a try - Thanks!
Turtle91 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Paragraph line breaks midway uxaar Conversion 1 04-03-2012 09:19 AM
Paragraph breaks when removing margins Canorka Conversion 3 03-30-2012 02:00 AM
about paragraph breaks arslonga Calibre 0 02-03-2012 05:03 AM
Paragraph breaks in ePub? rocalisa Calibre 3 10-29-2010 03:53 PM
Paragraph breaks thedevilsjester Calibre 2 09-07-2010 12:26 PM


All times are GMT -4. The time now is 08:47 PM.


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