05-08-2012, 08:56 AM | #1 |
Enthusiast
Posts: 33
Karma: 20
Join Date: Jun 2011
Device: none
|
Correcting for a missing line break
Newbie to Sigil wants to learn how to do this. Here's the scenario:
I'm using Mac OS 10.6.3 and Sigil 0.4.2 (just downloaded the newest, not installed yet). I layout the book in MS Word 2008, save as filtered HTML, open that in Sigil, add chapter breaks, generate the TOC, save as EPUB and convert it to MOBI. This process works for me and creates final products that appear exactly as I want them to. So far so good. In the DOC file, I use a single extra return on occasion to space a bullet list or extended quote, for example, from the main body text above and below. Yesterday I noted that the EPUB an MOBI versions of my current project were missing one of these returns used to separate a warning notice from the main body text. I found the error in Sigil book view and traced it to the source DOC file. In the past, I've corrected the DOC and gone through the process again, which I can do fairly quickly, but it's obviously a case of newbie make-work by not understanding how to do this efficiently. So with the EPUB open in book view, I added the single extra return under the mistaken impression that this would result in a corresponding change in the code and fix the problem. I saved it, opened it in Adobe Digital Editions and found the problem still exists. I went back to the EPUB in Sigil and it appears to me that there is a line break where there should be in code view. I have attached three screenshots of the EPUB in Sigil book view, code view, and in ADE. Can someone help me understand what's wrong with the code and how to fix it? Thank you in advance. |
05-08-2012, 09:16 AM | #2 |
Guru
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
A first quick look...
Change the first Code:
<p class="Ebook"><br /></p> Code:
<p class="Ebook"> </p> Last edited by Perkin; 05-08-2012 at 09:37 AM. Reason: change of case for ebook -> Ebook |
05-08-2012, 01:02 PM | #3 |
Enthusiast
Posts: 33
Karma: 20
Join Date: Jun 2011
Device: none
|
Thank you, Sir Perkin. You have solved the problem.
If you don't mind a follow-up question: Would it be correct to say that inserting the return in Sigil book view created a corresponding code that equates to white space, which the rendering engine (ADE in this case) eliminated, but the replacement code filled the space with content (invisible to the reader) that then appears as a blank line? |
05-08-2012, 04:06 PM | #4 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Correct, it is important to note that the rendering engine can eliminate what it thinks is extraneous spaces.
Dale |
07-18-2012, 09:34 AM | #5 |
Junior Member
Posts: 1
Karma: 10
Join Date: Jul 2012
Device: none
|
Hello there,
I'm using the same kit as Tango Mike and have had the same problem. I used the solution provided by Perkin throughout the whole ebook but only the first two instances have worked. Adobe Digital Editions is still showing the rest of the book without the line breaks where I want them. Please help! |
07-18-2012, 10:16 AM | #6 | |
Well trained by Cats
Posts: 30,372
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
.normal {margin-top: .5em; } .newscene {margin-top: 2em; } I now use mostly Top Margins to avoid blank-page (orphans). With no bottom margin, the page just ends. If there is a bottom margin and that wont fit, text may pushed onto the next screen-page Or the next screen-page will be blank |
|
07-20-2012, 09:20 AM | #7 |
Enthusiast
Posts: 33
Karma: 20
Join Date: Jun 2011
Device: none
|
arfellian, I'm probably misinterpreting what theducks is saying, but at the risk of doing so, I think it's important to clarify something.
First, the problem for me was caused by failure to include an extra paragraph return in the original .doc file between the main body text and the start of a centered warning notice. I'd used one at the end of the warning notice to separate it from the following main body text, so it appeared as I expected it to. The point is that if I'd done it correctly in Word, it would have appeared correctly in the epub created with Sigil. Perkin helped me understand that an extra paragraph return added in Sigil book view wasn't fixing the problem and why. As DaleDe confirmed, using the correct code made sure that the rendering engine interpreted the blank line the way I wanted it to. In other words, "leave it alone, it's intentional." In my rather limited experience, single paragraph returns added to the Word document before conversion have always appeared correctly in the .epub. But if I try to use more than one return for additional space, things get ugly in a hurry. theducks will correct me if I'm wrong, but I'm under the impression that it's impossible to eliminate orphans in an ebook, if by orphans we mean single lines of text sitting at the top of an otherwise blank page. You can go to the trouble to do that throughout the book so they don't appear in ADE, and that .epub viewed on an eReader, especially with the reader's ability to adjust font size, will appear very much differently. But regardless of the font size used by the reader, you can avoid the problem of having a chapter heading, for example, sitting at the bottom of a page and the text that follows beginning at the top of the next. I personally like the look of page breaks at the start of each chapter rather than having the entire book appear with continuously flowing text. I build my .doc file with the chapter headings in the Heading 1 style and use something like 48 points before and 24 after in the paragraph spacing portion of the style definition. This sets the chapter heading apart so it clearly telegraphs its location. I used to manually insert page breaks in Word to begin the each chapter on a new page, but the better way is to build the .doc with no page breaks between chapters and add them in Sigil with the chapter break command. This has worked flawlessly for me, and I know that the chapter heading will always appear at the top of a new page with the accompanying text below it. I know very little about code, so my solution is to carefully edit the .doc file to avoid the trouble makers like multiple extra returns, tabs, extra spaces between the end of sentences and the paragraph returns, etc. If I do that, the Sigil-to-epub conversions usually appear as I expect. If I need more spacing than provided by single returns, I create a style and use the before and after spacing values to provide it. I apologize if I've jumped in here with a comment that misses the point, and I don't want to appear as if I'm contradicting the experts. That is most certainly not my intent. TM |
07-20-2012, 10:01 AM | #8 |
Well trained by Cats
Posts: 30,372
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
T M
I do no work in Word. My solution is to work on the block. For most part a block is what is inside a P,H# or DIV tag pair. Margin is the thickness of the Mortar between the blocks, and can be controlled for each side. Being a visual thinker, I like the picture found and described in Section 8 http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html Since the Body contains a stack of many block, each with their Mortar, before the Body tag can close, the last layer of Mortar hast to apply. If this is the Margin-Bottom, it may be the only thing on the screen (at the readers current Zoom setting). That is why I avoid using margin-bottom for most paragraphs. YMMV Back to your scene break problem: many devices ignore extra 'non-printing' white space. to trick it into accepting multiple blank lines, the use of a Non-breaking space is use ( Code:
The HTML entity I prefer to work on the code. So I create 1 or more styles for scene breaks. Now I can change my mind on how much white space to allow for each class. IMHO working with the code is so much easier that trying to make a a Word Processor generate workable (and cleanish) HTML |
07-20-2012, 12:30 PM | #9 |
Enthusiast
Posts: 33
Karma: 20
Join Date: Jun 2011
Device: none
|
theducks, I understand the philosophy of what you're saying even if I don't understand the practical application of it. When arfellian mentioned using the same "kit," I assumed (always a risk) that meant Word was a part of it.
Be that as it may, I would love to have your knowledge and skill at dealing with the source code and not have to rely on what some other application does in flawed attempts trying to create it. But first and foremost, I'm a writer whose core interest is in creating stories. Without the financial ability to hire others to create the products, I've had to teach myself how to do the best job I can with what I can reasonably learn without detracting too much from the writing. The various forums for Word, Photoshop, InDesign, Sigil, and Calibre have proven to be difference between success and failure at this writer's desk. I shudder to think what it would have been like to try this without such user-friendly access to experts who are willing to share their knowledge. TM |
07-20-2012, 09:59 PM | #10 | |
Well trained by Cats
Posts: 30,372
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I am suggesting no trying to do very much styling via Word. (for typical novel formatting) Get the content down SOLID , all the word processors in the world can't do that. Take some time to learn CSS/HTML: Basic (EPUB usage) CSS is fairly simple. IMHO use the content MR Library for a (reverse engineering) model to borrow from. Example of not having to set even font sizes in your word processor: a basic Stylesheet usage plan body { /* the basic layout, font of a page (per chapter?) */ h3 { /* used for chapter headings */ h3 + p {/* first paragraph after a heading3 */ p { /* all the rest of the paragraphs after the first*/ setting the parameters for each of those require no special 'classes' in your document th set up a look and feel of a book. It is woth the effort. All other styling can be treated as exceptions of the basic style |
|
07-21-2012, 02:31 AM | #11 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
I tried to use it once, to fit this kind of paragraph with dropcaps but met with two problems: - everytime when there is anything between the title and the paragraph and it happens fairly often (epigraphy, date, quote, whatever, even decoration) - even if there is nothing between the title and the text, I failed to display dropcaps with ADE using this tag. Could you comment a little on your experience with this tag? |
|
07-21-2012, 03:06 AM | #12 |
Sigil developer
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
The CSS selector "h3 + p" just means an h3 tag immediately followed by a p tag. So that explains your first issue (you can't have anything between the two). Not sure about the second.
|
07-21-2012, 03:25 AM | #13 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I understand the first one, but it's a very serious practical limitation. As far as the second is concerned, I could better comment it this way:
As h3 + p {/* first paragraph after a heading3 */ seems to be quite useful to display dropcaps, has anybody succeeded using it for a dropcap? Could this person provide us with an EPUB example? |
07-21-2012, 03:49 AM | #14 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
But i won't use it. You'll have to check every instance of the thing that there's really nothing between the two tags... Last edited by mmat1; 07-21-2012 at 04:02 AM. |
|
07-21-2012, 04:07 AM | #15 | ||
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Quote:
h3+p is useful to remove indent from the first paragraph, though. You can make it work with epigraphs, decorations, etc. by using something like "h3+p, .chapterhead + p { ... }". Now the same stuff applies to any <p> immediately following an <h3> or anything with the class "chapterhead". You just have to add this class to everything between the <h3> and the first <p> (actually, only to the last of these things is enough), like this: Code:
<h3>Chapter Twelve</h3>
<div class="epigraph chapterhead">
Never say never.
</div>
<p>It was a dark and stormy night...</p>
|
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to insert break-line | schuster | Recipes | 1 | 05-24-2011 03:19 PM |
Yet another PDF line break question | heddhunter | Calibre | 7 | 01-18-2011 02:41 PM |
Advice on PRS-505 purchase with missing vertical line on screen | GSteer | Sony Reader | 9 | 04-03-2010 12:42 AM |
PDF 2 LRF, line break issue | ^_Pepe_^ | Calibre | 1 | 12-03-2009 06:43 AM |
Book Designer - Page Break Line is not showing? | pitolee | Sony Reader | 6 | 04-19-2007 09:26 PM |