08-18-2012, 04:13 PM | #16 | |
Jeffrey A. Carver
Posts: 1,355
Karma: 1107383
Join Date: Aug 2008
Location: Massachusetts, USA
Device: Lenovo Yoga Tab Plus, Droid phone, Nook HD+
|
Quote:
<body class="calibre"> <h1 class="calibre5" id="calibre_pb_1">Copyright Information</h1> <p class="Centered">This is a work of fiction. All the characters and events portrayed in this book are fictitious, and any resemblance to real people or events is purely coincidental.</p> <p class="Centered"> </p> <p class="Centered">GOING ALIEN</p> <p class="Centered">Copyright © 2012 by Jeffrey A. Carver</p> <p class="Centered"> </p> <p class="Centered calibre6 sgc-1">A Starstream Publications Ebook</p> This is right below the header of that particular html page. What's the ancestor to these tags? |
|
08-18-2012, 04:41 PM | #17 |
Enthusiast
Posts: 43
Karma: 31740
Join Date: Feb 2009
Location: Washington State
Device: iPaq 3800 series
|
He expects us to do all the work in the Word.docx so the conversion will be no problem. I understand the reasoning. It's easier to convert if it just has to follow what is done already, its not a writing program like Word or Lotus, or even OpenOffice. It is not like when I go through a htm's commands, and make sure they do what I want them to do.
|
08-18-2012, 11:11 PM | #18 |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
It can also happen when there is CSS like the following:
Code:
p {margin: 0; text-indent: 1em;} .center {text-align: center;} I actually have had plenty of problems when converting mobi files from Amazon with centred text having an indent applied. This usually happens though, because for whatever reason, there is usually an explicit indent applied to the center class. (I don't know if the indent is present in the original mobi, or if it is introduced in the conversion stage). |
08-19-2012, 01:56 AM | #19 |
creator of calibre
Posts: 43,926
Karma: 22669820
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@starrigger: That has nothing to do with your code, it is an illustration of how css inheritance works and why it is not, in general, a safe operation to add a text-indent:0.
Last edited by kovidgoyal; 08-19-2012 at 06:07 AM. |
08-19-2012, 05:58 AM | #20 | |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
The first part of the post was more directed at starrigger, showing him a different example of CSS inheritance. I guess the second part was more a general comment that it's not just self created word/html files that have problems with centred indents, and that CSS inheritance isn't always the cause either. I have to say that centre text with indents is one of my pet peeves, and have long wished there was a way to correct this automatically, either during conversion, or after the fact. |
|
08-19-2012, 06:02 AM | #21 |
creator of calibre
Posts: 43,926
Karma: 22669820
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I was responding to starrigger, not you.
|
08-19-2012, 03:18 PM | #22 |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
|
08-19-2012, 03:29 PM | #23 | |
Resident Curmudgeon
Posts: 74,312
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
display: block; font-family: "Times New Roman", "serif"; <-- can break font changing and not needed font-size: 1em; <--- can cause a problem with font sizes and not needed line-height: 1.2; <--- too large a line height and not needed margin-bottom: 3pt; <-- should be 0 as this causes a paragraph space margin-left: 0; margin-right: 0; margin-top: 6pt; <-- 2em is best text-align: center; text-indent: 0 } 5 issues in one style. The code is not clean. As for centering... Code:
.center { margin-top: .5em; margin-bottom: .5em; text-align: center; text-indent: 0 } Code:
p { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; text-align: justify; text-indent: 1.2em } If your <p> is like above where is has a text-indent other then 0, then you do have to specify in the class style the text-indent to be 0 or you will get a text-indent of whatever is defined in <p>. Using the above <p>, here's the code for the section break. Code:
.scenebreak { margin-top: 2em; text-indent: 0 } Last edited by JSWolf; 08-19-2012 at 03:37 PM. |
|
08-19-2012, 10:17 PM | #24 | |
Jeffrey A. Carver
Posts: 1,355
Karma: 1107383
Join Date: Aug 2008
Location: Massachusetts, USA
Device: Lenovo Yoga Tab Plus, Droid phone, Nook HD+
|
Quote:
Is it the sort of thing that could be a plug-in that people who care could install. and others not? I should add this: I've realized it's not just centering that's an issue in Nook and Aldiko display. Both of them want to indent every first line, so if you want a paragraph that begins flush-left, it's not enough not to have an indentation specification; you have to positively specify 0 indent. |
|
08-19-2012, 10:54 PM | #25 | |
Resident Curmudgeon
Posts: 74,312
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
.noindent { text-indent: 0 } Code:
<p class"noindent">Text for the paragraph with no indent.</p> Oh and lets put in a body CSS style... Code:
body { widows: 0; orphans: 0; margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; text-align: justify } Last edited by JSWolf; 08-19-2012 at 11:00 PM. |
|
08-24-2012, 01:35 AM | #26 |
Enthusiast
Posts: 43
Karma: 31740
Join Date: Feb 2009
Location: Washington State
Device: iPaq 3800 series
|
The problem is, not everyone likes justified. I realize that books are normally justified, but specifying normal indents and no-indents, centering, drop-Caps, etc., is what the main question is. I wonder it it is a case of having combined styles in the docx, that says, <p class="noindent"><span align="center">* * *</span></p>, might be more in line with what Calibre needs for that style?
|
08-24-2012, 12:37 PM | #27 | |
Resident Curmudgeon
Posts: 74,312
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
the code there is excessive. Code:
<p class="sectionbreak">* * *</p> Code:
.sectionbreak { margin-top: .75em; margin-bottom: .75em; text-align: center; text-indent: 0 } Also, as far as using Word, don't. And if you do, forget the formatting. Use text markup to specify what styling you want to use. Take it out of Word as plain text into Sigil and work on it from there. It's a lot easier to modify a text file with text markup into a nicely looking ePub (using Sigil) then it is to try to fix all the mess Word makes. As for indents and justify and whatnot, most people prefer a proper indents, justified, small to no margins and no paragraph spaces. As for the drop cap, that's fine too if you want. If you decide to use a large letter as the first letter of the paragraph, make sure you set a line-height to 0 or you can make the first line off spacing wise. There are a lot of mistakes publishers make. *wide margins *indents too large (I've seen them as big as 5%) or none *paragraph spaces and sometime big ones *section breaks of only one line *using a large first letter for the first paragraph in a new chapter/section and that first line of that paragraph being offset from the rest of the paragraph. *incorrect size for simulated small caps. *simulated small caps used without adjusting the line height so the lines spacing is all uniform *left justified *simulated blockquotes with the margins set incorrectly *right justified with a margin that should not be there *large space at the top of a chapter *chapter headers too small or too large *graphics that are unreadable such as a map *generic crappy cover (so get a new cover commissioned) *spaces abound em dashes That's a fairly good list. And that doesn't take into account the asinine errors they end up putting in by someone who has no clue how to proofread. There are other things publisher do wrong, I do clean up the messes that they make so when I read, my reading is focused on the book, not how badly formatted the book is. |
|
08-24-2012, 02:09 PM | #28 |
Jeffrey A. Carver
Posts: 1,355
Karma: 1107383
Join Date: Aug 2008
Location: Massachusetts, USA
Device: Lenovo Yoga Tab Plus, Droid phone, Nook HD+
|
Jon, a lot of what you're putting forward as "best practice" is really just your preference. Many people, for example, prefer generous margins and find little-or-no margin very hard on the eyes. Justified text is preferred by some, not by others. Justified text on a small device looks awful. (Although some of the newer display modes that shorten lines that would otherwise be hideously spaced out is not a bad compromise.) The best option, where possible, is to leave it for the end-user to be able to choose justified-unjustified. Spaces around em-dashes are not necessarily a mistake; it's a matter of preference. I don't use that method myself, but one good reason for doing it is that it ensures a line can break at a dash, rather than having the dash bind two words together.
The section break is practically an art in itself. I have begun using single-line section breaks, with style set for additional spacing above and below, and a simple typographical centered (centered!) marker such as * * * or o0o or ~~~. But there is no one "correct" way to do it. Don't even get me started on ellipses. On your statement "Don't use Word," I say, not true. It's all well and good to say build the formatting from ground up in Sigil or whatever, and that's fine if you have endless time. But most authors want to get back to their writing. The fact is, you can build perfectly good ebooks using Word (the Smashwords Style Guide offers many useful tips), if you are careful with styles and are willing to tweak a little as needed. So the CSS isn't quite as clean as you would like. It still works, and if done carefully works very well. But I still wish Calibre would offer the option, which Kovid indicated wouldn't be hard, to add a line ensuring that centered text would truly be centered. He doesn't want to, and that's his right. But I think it would be an improvement that people would appreciate. |
08-24-2012, 02:59 PM | #29 | |
Resident Curmudgeon
Posts: 74,312
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
A happy medium is with indents and margins not too big (generous). back when Sony was using a version of ADE that did not justify, a lot of people (on MR) were saying they preferred justified vs left justified. Also, a lot of eBooks do have paragraph spaces that are just too large and they do take you away from the book as your eye then goes from one paragraph to nothing before going back to the text. And indent that is too big also is a distraction (5% as I've seeen before is just way too large on a 6" screen). As for indents not looking good on a small screen, screens have gotten larger and/or higher resolution so it's not as bad as it used to be. Also, if you put in margins, a program like iBooks will have greater then generous margins (ridiculous margins) as it already has a default margin of generous. As it turns out, a lot of people using an iPhone or and iPad will be using iBooks to read ePub and that's where it gets silly (margin wise) is the ePub already has generous margins. The default margins are already silly on an iPhone's small screen. When I got my 500, I did not buy eBooks from Sony except to use the $50 credit I got for buying the 500. I hated the small text and outrageous margins. As for the section break, as long as it's not too big and it clearly marked, it doesn't matter if you use * * * or ~~~ or --- or some graphic image. Just don't do what a lot of publishers do and put in blank space for most of the section breaks and leave in * * * because that's what the print edition did when the section break ended near the bottom of the page. Another thing a lot of publishers do wrong is they use a text size of small. I think it's best to go for the default font size (1em is the default font size) for the main text. I know I am putting in some of my preferences, but they work better for more people then the poorly done publisher formatting. I've read (on MR and other forums) that people do not like the way most publisher formatting is done. I've even read of people requesting indents when the formatting is no indents and paragraph spaces. Let's not forget one thing... Widows and orphans... I know a lot of people would like them to go away, but no reader/app has any settings to make this happen and they don't even know they can be made to go away. So a widows: 0 and orphans: 0 in the body style will just just that, make them go away. So in your opinion, what is a happy medium as far as formatting an eBook goes? Last edited by JSWolf; 08-24-2012 at 03:06 PM. |
|
08-24-2012, 03:03 PM | #30 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
You might want to consider using markdown, with a good editor that has an html preview. I tried this for a book of poetry a while back using Mou. My recommended apps are Mac based, if you're on Windows I'm sure there are similar alternatives, Markdownpad comes up first in Google and seems to fit the bill.
There are several advantages here:
Special formatting - e.g. the centered text example here, would need to be handled by inserting html directly into the markdown text, basically just wrap those lines in <div> or <p> tags with a class assigned, and have that class defined in your css. There are examples of that in the thread I linked. If you really wanted to stay away from Sigil Calibre could also convert the markdown text to ePub, and you'd just take the css from Mou and stick that in Calibre's extra css settings. Markdown in general has become my preferred way to fix up horribly formatted books vs. trying to massage the existing html or using Word/rtf. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to adjust table spacing/lines in Calibre conversion? | mischko | Calibre | 5 | 03-02-2012 09:43 AM |
Blank Lines in MOBI-Conversion | ulrichbi | Conversion | 3 | 01-19-2012 04:50 AM |
Empty lines in epub without apparent reason | sinusLog | Conversion | 6 | 09-30-2011 01:19 AM |
Lines became paragraphs after .lit to .mobi conversion | Piper_ | Calibre | 11 | 09-19-2010 05:11 PM |
.epub hyperlinks, centered and non indented text. | Xabache | ePub | 2 | 09-13-2010 01:11 PM |