07-02-2014, 02:28 PM | #1 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Nov 2011
Device: Kindle
|
Inserting a larger than normal gap between SOME paragraphs
Hi,
First up my development files are EPUB but I am creating .epub files and .mobi files. I use kindlegen with the 'content.opf' file to generate my .mobi files. I've been having some difficulty inserting a larger than normal gap between some paragraphs. That is to say I am NOT trying to change the default spacing between paragraphs but trying to insert gaps of different sizes between some paragraphs. e.g. In some books an extra large gap is introduced between 2 paragraphs in a chapter; sometimes a symbol is used, sometimes not. It denotes a change of scene or tone, or is used for a variety of reasons to tell the reader that the sections on either side of the larger-than-normal gap are to be considered separate. In other cases introducing smaller or larger gaps can also be useful. The following HTML and CSS works as expected with my .epub files but NOT with my .mobi files. The idea is that I use CSS to change the font size and output a single space entity to introduce various sized gaps. By using em for the font size the gaps can remain relative to the text size the user has chosen. By having small, medium, and large versions a gap of various standard sizes can be easily introduced (and of course I can change the sizes this is all at the testing stage). The problem is that the gap sizes are not the sizes I expect with my .mobi files. They are as I expect with the .epub files. With the .mobi files 'small' instead of being about half a line (0.5em) of the text lines above and below them (1em) looks about 1 line. 'Medium' looks like at least 2 lines instead of 1. 'Large' about 3 lines instead of 2. Code:
HTML: <p class='InsertGapSmall'> </p> <p class='InsertGapMedium'> </p> <p class='InsertGapLarge'> </p> CSS: .InsertGapSmall { display: block; font-size: 0.5em; margin: 0; } .InsertGapMedium { display: block; font-size: 1em; margin: 0; } .InsertGapLarge { display: block; font-size: 2em; margin: 0; } .ParaNormal { display: block; font-size: 1em; margin-top: 0.25em; margin-left: 0; margin-right: 0; margin-bottom: 0; text-align: justify; text-indent: 5pt; } Real world usage: <p class='ParaNormal'>A full paragraph of text before the gap...</p> <p class='InsertGapMedium'> </p> <p class='ParaNormal'>A full paragraph of text after the gap...</p> Many thanks. Last edited by mattst; 07-02-2014 at 03:00 PM. |
07-02-2014, 02:56 PM | #2 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Don't use non-breaking-space filler paragraphs. Use a default:
Code:
p { display: block; font-size: 1em; margin-top: 0.25em; margin-left: 0; margin-right: 0; margin-bottom: 0; text-align: justify; text-indent: 5pt; } Code:
.spacerMedium { margin: 1em 0 0 0; } Code:
<p>A full paragraph of text before the gap...</p> <p class='spacerMedium'>This paragraph has some space before it.</p> Last edited by eschwartz; 07-02-2014 at 07:44 PM. |
Advert | |
|
07-02-2014, 04:10 PM | #3 | |
Lector minore
Posts: 655
Karma: 1738720
Join Date: Jan 2008
Device: Aura One, Paperwhite Signature
|
@eschwartz shouldn't that be
Quote:
Personally, I prefer describing something like that as "scenebreak", "firstpara" or something that describes what it is versus something like "spacer" that describes what it does. |
|
07-02-2014, 04:16 PM | #4 |
Resident Curmudgeon
Posts: 76,139
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I use spacebreak as the class name for scene breaks.
|
07-02-2014, 07:44 PM | #5 | |
Ex-Helpdesk Junkie
Posts: 19,421
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:
(I only use "scenebreak" and it uses asterisks or pictures in it. One-size-fits-all.) Last edited by eschwartz; 07-02-2014 at 07:47 PM. |
|
Advert | |
|
07-05-2014, 10:17 AM | #6 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Nov 2011
Device: Kindle
|
Thanks for your help. I understand and see the sense of what eschwartz explained, that's what I'll do.
But in the interest in furthering my understanding, what is the reason it does not work? Thanks again. |
07-07-2014, 01:31 AM | #7 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
It is just an ugly hack, leads the reader to see blank paragraphs (like when highlighting things) and can potentially do weirdly unexpected things at weird times. And depending on the conversion used, blank paragraphs may get stripped unexpectedly -- I believe Sigil has endless fun with nbsp AND empty paragraphs.
It is also much easier to just add in a declaration to the paragraph itself to add spacing. |
07-07-2014, 06:40 AM | #8 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Either the conversion software or the reader can throw away what are clearly empty, and by their reasoning, meaningless paragraphs.
That is why it is better, theoretically, to put a class into the paragraph tag of the paragraph you want space around. From an editing point of view, it is safer to NOT have empty paragraphs, as they may not be purposeful, but accidentally created by a search and replace gone amok, and indicate a paragraph what was full of stuff, but which you gutted in error. |
07-07-2014, 12:28 PM | #9 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Nov 2011
Device: Kindle
|
Okay, thanks again all.
|
07-07-2014, 04:31 PM | #10 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Personally I would advise against simply using a larger gap between paragraphs for a scene break, because it doesn't show up if the reader breaks the page at that point. I would always use a visual indicator, such as three centred asterisks.
|
07-07-2014, 06:08 PM | #11 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
It does pay to be consistent, though. One book I just worked on used the three asterisks to indicate missing material. It was fairly obvious from the context jumping from 4 to 8, but if you are going to do it, have it mean the same thing whatever it is.
|
07-07-2014, 06:39 PM | #12 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
07-07-2014, 07:03 PM | #13 |
Resident Curmudgeon
Posts: 76,139
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I use a 2em gap for section breaks. But that's not an issue because I also use widows and orphans at 0. I don't mind it with a printed book, but I mind it with an eBook. What I find annoying is when eBooks that use blank space for section breaks also keep in the * * * for when the section breaks fall at the end of the page on a pBook. That's just silly to have such.
|
07-07-2014, 08:06 PM | #14 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Don't know that you can fault asterisks for goofy stuff that comes from it being reflowable. I have been just reading a book with pictures whose captions don't always stick to the picture which can be made worse by increasing text size.
|
07-07-2014, 10:23 PM | #15 |
Resident Curmudgeon
Posts: 76,139
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Pictures captions not sticking with the picture can happen easily. But the * * * left in because of the print version is just stupid.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Stop Sigil from inserting unwanted lines between paragraphs | Benasam | Sigil | 16 | 05-28-2014 03:16 PM |
gap between paragraphs | moonshot | General Discussions | 5 | 02-09-2014 02:43 PM |
Closing The Gap | indie | Self-Promotions by Authors and Publishers | 6 | 09-25-2010 02:04 AM |
any way to solve the writing 'gap' of the stylus? | booklover | iRex | 10 | 05-05-2008 06:05 PM |
Missile Gap by C. Stross | Liviu_5 | Reading Recommendations | 0 | 04-22-2007 08:55 PM |