![]() |
#1 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jul 2012
Device: kobo
|
No space between 2 paragraphs?
I have 3 different areas where I have short poems. The all are double spaced between each line. How can I eliminate that blank line, or double spaced paragraphs?
Example: Come on in, baby take your coat off. Come on in, baby take a load off. I want them to look like this: Come on in, baby take your coat off. Come on in, baby take a load off. Below is the code that I see in Sigil, what part of it do I need to change? Or is this where I make a style sheet that can be used throughout the book. <p class="western" style="background: transparent; page-break-before: auto"><font face="Times New Roman, serif"><font size="3"><i>Come on in, baby take you coat off,</i></font></font></p> <p class="western" style="background: transparent; page-break-before: auto"><font face="Times New Roman, serif"><font size="3"><i>Come on in, baby take a load off</i></font></font></p> <p class="western" style="background: transparent; page-break-before: auto"><font face="Times New Roman, serif"><font size="3"><i>Come on in, baby shake the blues off</i></font></font></p> <p class="western" style="background: transparent; page-break-before: auto"><font face="Times New Roman, serif"><font size="3"><i>I’m gonna love that frown away</i></font></font></p> |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
western is the style WITH a non-zero margin-top or margin-bottom
Clone (and rename the clone) western in the stylesheet (NM=is my clue for NoMargin ![]() Code:
.westernNM { cloned code with margin-top, margin-bottom: 0 CSS is the easy way to go maintaining all those style=... lines later will be a pain |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jul 2012
Device: kobo
|
Can you tell me exactly what my style sheet should say?
.westernNM { cloned code with margin-top, margin-bottom: 0 (??) or on two separate lines as you put it? Or am I suppose to also have all or part of the original HTML line? I assume you are saying to name the style sheet 'westernNM.css' sans quotes? |
![]() |
![]() |
![]() |
#4 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
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:
There is no such thing as 'My Stylesheet'. There is a stylesheet(s) that was designed ONLY for that document set. Note some pub houses START the design process with a 'House standard' sheet, assigning each paragraph/image/whatever the house designated style code <p class="houseCO">, <h3 class="houseCN"> ... Any other book, and those names might be different, or the VALUES adjusted (there can be house rules on how to override, usually Hands OFF the standards , just they add houseCN-override style to the stylesheet and code <h3 class="houseCN-override"> For every class=, there should exist a exact same name in a stylesheet Note: Sigil and Calibre both have a tool to 'clean' the stylesheet of unused style definitions (only run at the very end, just prior to release, of the to reduce file size) |
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jul 2012
Device: kobo
|
[QUOTE=theducks;2949184]None of the above:
There is no such thing as 'My Stylesheet'. I appreciate learning the proper wording, but in the Sigil tutorials it says, "You can easily link your stylesheets to your HTML files by...." And in my post on changing the H1 header, you stated, "create/import your stylesheet" so you have me a bit confused here. At any rate, I'm now working through w3schools.com tutorials. I'm not planning on publishing this book through a publisher so I'm not concerned with their requirements at this time. Having said all that, I managed to get the lines in question, single space and it works in my kobo ebook and in Calibre. I put it in 'by hand' but will probably redo the whole thing once I have a better understanding of html / stylesheets and how they work together. Here's how I made it work: <p><i>Come on in, baby take you coat off,</i><br /> <i>Come on in, baby take a load off</i><br /> <i>Come on in, baby shake the blues off</i><br /> <i>I’m gonna love that frown away</i></p> |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I was being Literal
Some folk believe there is only one stylesheet and all they have to do is rip out the old one (book source Publishers X) and replace it wit 'My Own Stylesheet' and all is good ![]() Stylesheets and the Book files are Sets/pairings, Unless the book starts out with the same stylesheet being used, a swap is difficult |
![]() |
![]() |
![]() |
#7 | |
Connoisseur
![]() Posts: 67
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
|
Quote:
![]() Three men in a boat is a great epub less for its content for our purposes but for its styling ![]() its worth opening it in sigil and examining in detail you will want at least a tab open for the style sheet and a suitable chapter (mostly chapters and html files correspond but sometimes you want a page break where something needs to be at the top then its a good time to split a chapter at that point. For a more book like effect you might insert a blank page). open another instance of sigil and open your text or just open a new epub and paste in your text. There are 2 ways of pasting paste in book view or paste in code view. Book view will try to format like the original which can be messy. if you paste into code view between <p> and </p> you should get one giant paragraph which is good because then you don't need to reflow each line. Back in book view you can split it back into paragraphs and headings. <div> stuff </div> is very handy as you can style a div and its contents get styled at that level The lowest level really is <body> usually this might only set the page colour. what can make css complicated is inheritance, say i set my page as a pink background then by default everything gets a pink background unless i apply a background colour setting at a higher level. taking as example from above <p class="houseCO"> blah blah </p> <h3 class="houseCN"> my heading </h3> the reader should go looking for a style houseCO and apply its styles to that paragraph then similarly for houseCN. css heres a sample of 3 men in a boat body { font-family: "Fontin", serif; } h1 { font-size: 2em; text-align: center; font-weight: normal; text-indent:0; margin:1.5em auto 0.25em; } .subtitle { text-align: center; font-size: 1.5em; font-style: normal; text-indent:0; margin:0 auto; } here is an alternative layout for body body { font-family: "Fontin", serif; } The browser doesn't care about white space so the two body sections mean exactly the same. the format is stylename opening brace { attribute comma value semicolon closing brace } the class .subtitle has 5 pairs of attributes and values it could be put on 1 line but it gets hard to read so the coding style is usually as i pasted from the 3 men in the boat css file. If we look at h1 what font will it use? well everything has default values these are browser/reader independant but generally the sameish however in this case "Fontin" serif was specified in body so h1 will probably inherit that. If h1 was in a div with a different style font then that font would be applied the rule is the nearer a style is to the text then the higher priority it is. if the specified font isn't available it should choose a serif font at least. Although the user might over ride with a different font. (A handy thing about <div> s you can give them a size). .subtitle can apply to any element with that class "subtitle" applied to it be it a <p or <h or <div so you can lift styles rename them for your own scheme but you need to be careful of what they inherit or it can look quite different. if you use the inspector in the preview pane you can see where in the css a particular attribute value comes from , it also tells you what was over ridden by the style sheet and what the value would have been without the style applied. finally quirks ideally each reader would know all the rules and obey them but sometimes they don't my reader didn't respect the margins i specified round images and butted text against the image in the end i added a white border to my images to push the text back. not elegant but it worked. Some ereader software will make a mess of fancy formating and will not for example, flow text around an image at all and place the image in a separate paragraph . On the positive side there are better reader programs about. sizes tend to be in em px or % you can sometimes give just a number but then its up to the reader to guess what you meant so don't do it. Some of the android readers do text to speech indian english is surprisingly good (easier on the ear than uk english) and the french voice is quite "ello , ello" in its pronunciation. I don't think it is possible yet to specify a voice for lines of text but it could make for some interesting audio dialogue when it does make it into a later version of the standard, it is too much fun for it not to ![]() Last edited by blackest; 10-18-2014 at 08:26 PM. Reason: errors |
|
![]() |
![]() |
![]() |
#8 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Well, I can show you what MY style sheet says:
http://notjohnkdp.blogspot.com/2013/...yle-sheet.html It does evolve over time, but I think that (last year's) version covers everything I'm using at the moment. When I applied it to a book I formatted two years ago, the only change I had to make was to change all instances of <p class="normal"> to a space-saving <p> I also noticed that in the 2012 book I had applied italics to every chapter head, whereas my current style sheet does that in the h2 heading. The result was the same, and the epub validated okay, so I didn't take out the excess italics tags, which I suppose was very bad of me. |
![]() |
![]() |
![]() |
#9 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
|
How about using <br>?
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jul 2012
Device: kobo
|
Thxs Ghit....That's exactly how I got it to work and all I needed to know.
<p><i>Come on in, baby take you coat off,</i><br /> <i>Come on in, baby take a load off</i><br /> <i>Come on in, baby shake the blues off</i><br /> <i>I’m gonna love that frown away</i></p> |
![]() |
![]() |
![]() |
#11 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
I realize you're a newb, but those of us who know better shouldn't be giving you bad coding advice. I understand that you want the lines to look like lyrics/poetry. You shouldn't be using "break," because not all readers will honor it, and generally, it's not considered "good coding," if you're interested in that. Try someting like this, which will also give you a hanging indent, when the line wraps (notice I didn't say, IF the line wraps--trust me, it will). Code:
<p class="top2">Come on in, baby take you coat off,</p> <p class="poem">Come on in, baby take a load off</p> <p class="poem">Come on in, baby shake the blues off</p> <p class="poem">I’m gonna love that frown away</p> <p class="top2">Next stanza</p> <p class="poem">and continue....</p> Code:
p.top2 { margin-top:2em; text-indent:0; margin-bottom:.5em; margin-left: 2em; text-indent: -2em; text-align:left; } p.poem { margin-top:0; margin-right:0; margin-bottom:.5em; margin-left: 2em; text-indent: -2em; text-align:left; } FWIW. I realize that this type of coding might be more trouble than you think it's worth, but with some regex and a few minutes of hand-work, it should give you a nice result. Hitch |
|
![]() |
![]() |
![]() |
#12 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
I keep seeing this advice not to use <br /> but haven't come across a device that doesn't support it, at least as a single instance. Which ones don't?
I even use tables in web design occasionally. So take me out and shoot me. |
![]() |
![]() |
![]() |
#13 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,168
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I vaguely remember that the older Kindle devices had issues when you used the <br /> tag in epubs and then converted the epub to mobi.
|
![]() |
![]() |
![]() |
#14 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
Interesting! My Kindle's an early one, not sure if it's the very first model, but it was bought to test my very first Sigil-based attempts at constructing ebooks, and I don't think it's ever minded <br />
Anyway, Hitch will know. |
![]() |
![]() |
![]() |
#15 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
I can't even say that it's all fine now. I mean...every day, I get an email from someone, who's looking at their book in "Reader X." Now, I posted some weeks back about someone who used some e-reader I've never even HEARD OF (trust me: that takes some doing), and her mobi file looked like the back end of a drowned abandoned animal. It was dreadful. I mean, DREADFUL. She was sending her layout person (this was one of our subcontracing gigs, wherein we are the secret "ebook experts" they employ) shrieky emails. And the book was positively GAWJUS in every sort of normal reader, even Calibre, but this thing...it was just HORRID. I don't even know how she FOUND this damned software. Honestly...trying to ensure that every book works on EVERY POSSIBLE READER is the way to the madhouse. It really is. Yes, you can make a book vanilla enough so that it will never look utterly lousy, but...it's hard enough as it is to keep bookmakers happy and working, because truth be told, they get bored as crap. I mean, let's face it; this is detailed, tedious, highly-repetitive work with little in the way of pleasant surprises; they're always horrible surprises. (I took in an "ePUB-fix," for a book that was mostly made with Calibre, and the bookmaker who has it is still not speaking to me. Seriously.) Allowing/letting them add beauty to books is the only way to keep them happy, rather than chaining them to desks and feeding them bread and water. That's why I say, try to stick to what works in the "big" readers: Kindles, Nook, ADE, Sony, Kobo, and yes, even iBooks. And Readium, which I use moderately often for previewing, etc. Obviously, browser-based, FFePUBReader, too. My feeling is, if a book works on all of those, you're reasonably safe. Also, use what's demonstrably viable (like paragraph tags instead of breaks). That's my $.02, FWIW. Hitch |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding space between paragraphs | Gazella | Conversion | 5 | 04-03-2014 04:35 PM |
How do I get a double space between paragraphs? | ficbot | Sigil | 7 | 07-17-2013 09:12 PM |
Create a space between some paragraphs | Elle518 | ePub | 17 | 04-12-2012 04:21 PM |
space between paragraphs | gatorman | Sigil | 3 | 01-07-2011 10:17 AM |
Unwanted space between paragraphs | superanima | Calibre | 3 | 10-14-2009 02:28 PM |