|
|
#1 |
|
Enthusiast
![]() 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
|
|
|
|
|
|
#2 |
|
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 74,456
Karma: 318076944
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. |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Enthusiast
![]() 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
|
|
|
|
|
|
#4 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,269
Karma: 61916422
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. |
|
|
|
|
|
#5 |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,397
Karma: 20212733
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}
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... |
|
|
|
| Advert | |
|
|
|
|
#6 | |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,269
Karma: 61916422
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Yep Very annoying to find (and it bloats file size. which might cost you for download charges) |
|
|
|
|
|
|
#7 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,786
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
|
|
#8 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,269
Karma: 61916422
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
|
|
|
|
|
#9 |
|
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,245
Karma: 35164265
Join Date: May 2011
Location: PA {back in the usa!}
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 02:07 AM. |
|
|
|
|
|
#10 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 ! |
|
|
|
|
|
#11 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,786
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
|
|
#12 | |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,197
Karma: 174315444
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
|
|
|
|
|
#13 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#14 | ||
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,397
Karma: 20212733
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:
![]() Spoiler:
Quote:
That's a great idea - I'll give it a try - Thanks! |
||
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Paragraph line breaks midway | uxaar | Conversion | 1 | 04-03-2012 10:19 AM |
| Paragraph breaks when removing margins | Canorka | Conversion | 3 | 03-30-2012 03:00 AM |
| about paragraph breaks | arslonga | Calibre | 0 | 02-03-2012 06:03 AM |
| Paragraph breaks in ePub? | rocalisa | Calibre | 3 | 10-29-2010 04:53 PM |
| Paragraph breaks | thedevilsjester | Calibre | 2 | 09-07-2010 01:26 PM |