|
|
#151 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 126
Karma: 194002
Join Date: Aug 2009
Device: Nook Classic wi-fi, iPod Touch (Bluefire Reader)
|
Multi Part Chapter Headers Using HTML Tables
It works well in everythin I could test it in (nook classic, Bluefire Reader on my iPod Touch, Calibre, the Firefox ePub Reader, ADE 1.7.2 and 1.8 preview, and Sony Reader Library). And it converts decently to mobi using Kindlegen. Here's the html code. Code:
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="leftgrey">BOOK #</td>
<td class="centergrey">Section #</td>
<td class="right">Chapter #</td>
</tr>
</table>
<hr />
Code:
table {
margin-top : 2em;
margin-bottom : 0;
}
td {
font-family : sans-serif;
font-size : 1.5em;
width : 33%;
}
.left {
text-align : left;
}
.leftgrey { /* --- Use for greying out unchanging items --- */
text-align : left;
color : #cccccc;
}
.center {
text-align : center;
}
.centergrey { /* --- Use for greying out unchanging items --- */
text-align : center;
color : #cccccc;
}
.right {
text-align : right;
}
hr {
margin-top : 0;
border : 0;
background-color : black;
height : 3px;
}
|
|
|
|
|
|
#152 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 91
Karma: 159548
Join Date: Dec 2010
Device: none
|
Thanks.
Another point: DO or DO NOT most readers react to the addition of font-family for small-caps? Thanks again. |
|
|
|
|
Enthusiast
|
|
|
|
#153 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,112
Karma: 927511
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
|
Most readers ignore smallcaps at the moment.
__________________
Creator and maintainer of the e-Book Tools Word add-in. Creator and maintainer of the Clean HTML macro for MS Word. |
|
|
|
|
|
#154 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 81
Karma: 37574
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
|
iBooks handles small-caps but one thing I noticed, if you set font-size: 1em and use small-caps, they won't display properly but setting the font-size of the small-caps to 1.1em or 0.9em and suddenly they work.
|
|
|
|
|
|
#155 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 91
Karma: 159548
Join Date: Dec 2010
Device: none
|
Tanks -- information always of value when editing.
|
|
|
|
|
|
#156 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,704
Karma: 3644259
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
|
If you embed a font that uses only small caps and reference it then it will work but the CSS method does not work.
__________________
Dale DePriest http://pages.suddenlink.net/dalede or http://daledepriest.wikispaces.com currently using an EZ Reader or a Literati or my iPad. |
|
|
|
|
|
#157 |
|
Member
![]() Posts: 17
Karma: 10
Join Date: Sep 2009
Location: Tennessee
Device: PRS-505, PRS-650
|
My apologies if this is old hat to everyone, but it is new to me.
I've always been a little bothered by "quoted quotes" in epubs - when you've got a character speaking, and he's quoting something else. Having a double quote followed immediately by a single quite looks pretty bad, to me; it looks like a triple quote in most epubs I've seen. Putting a space between the double quote and single quote also looks pretty bad to me. It occurred to me on my drive home this morning that I could fix that with css. Code:
.space
{margin-left: 2pt;
}
Code:
<p>"<span class="space">'</span></p> I haven't decided yet if I'm OCD enough to start doing this in all my books. |
|
|
|
|
|
#158 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,145
Karma: 2505637
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
I've always thought that this should be handled by font kerning...
|
|
|
|
|
|
#159 | |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,326
Karma: 73595938
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
Quote:
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Need professional help formatting your ebook? Send me email.....................Books I've read in 2013, 2012, 2011, 2010 |
|
|
|
|
|
|
#160 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,704
Karma: 3644259
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
|
Nice solution. I had thought of using CSS with letter-spacing to fix this problem and then set the span to the full " ' combination since it can also be ' " then there is also things like " ' ".
Dale
__________________
Dale DePriest http://pages.suddenlink.net/dalede or http://daledepriest.wikispaces.com currently using an EZ Reader or a Literati or my iPad. |
|
|
|
|
|
#161 | |
|
Member
![]() Posts: 17
Karma: 10
Join Date: Sep 2009
Location: Tennessee
Device: PRS-505, PRS-650
|
Quote:
Do most epub readers recognize the letterspacing attribute? I didn't even know that existed until just now - I'll have to do some testing with it later. It would certainly be easier to do it that way than to create one for " ' and another for ' ". |
|
|
|
|
|
|
#162 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,145
Karma: 2505637
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
Or you could add one of the different non-breaking spaces available in Unicode:
-> Normal size, although it usually does not expand with other normal spaces when the line is justified. & #8199; -> Figure space, shouldn't be much different from . & #8239; -> Narrow no-break space. I'd favour this one. & #8288; and & #65279; -> These are zero-width, and have other uses. |
|
|
|
|
|
#163 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,045
Karma: 416729
Join Date: Jan 2009
Device: KoboGlo
|
@Jellby
About & #8239; -> Narrow no-break space. " This char is also used in French before ";?!»" chars and after "«". " As a French, this space entity interests me a lot of course. It's what we call or close to "espace fine insécable". However I can see no way to use it for EPUB purposes. Sigil erases it immediately, ADE will probably flag it with a question mark as it did with   (this last one at least is recognized by Sigil) ) It seems we need special software to handle this? But how can we expect to transfer it to ebook-readers which follow ADE specifications? This has always puzzled me. Emulation, though possible, seems to be too cumbersome for these small animals. texte<span class=*»fine*»>nbsp</span>texte Related CSS*code: .fine {font-size: 30%; } If you could provide some more comments on this, I would be very interested.
Last edited by roger64; 03-26-2012 at 08:57 AM. |
|
|
|
|
|
#164 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,145
Karma: 2505637
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
I don't know what Sigil does, but my reader (Cybook Orizon, which uses an Adobe engine internally) supports it fine, at least with the fonts I use.
|
|
|
|
|
|
#165 | ||
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,837
Karma: 23400772
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
|
Quote:
The regex expression \x{202f} will find all occurrences of the narrow, non-breaking spaces that you thought were erased (in Code View). This is all based on Sigil 0.5.3. Quote:
__________________
“Politics: A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage.” |
||
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| direkter Umlaut oder lieber HTML Code in Epub ? | NASCARaddicted | Erste Hilfe | 14 | 06-16-2011 05:54 AM |
| Programming language code snippets in ebooks? | Connochaetes | Writers' Corner | 7 | 10-18-2010 02:43 PM |
| ebook-convert HTML to EPUB and problem with <pre><code> | mikegr | Calibre | 2 | 03-09-2010 02:27 PM |
| css override code for margins? | Amalthia | Calibre | 15 | 08-11-2009 07:20 PM |
| Problems generating ePub from HTML/CSS | AlexBell | Calibre | 3 | 07-17-2009 05:10 AM |