05-26-2009, 04:53 AM | #31 |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Yes, "font-variant: smallcaps" is the property to use. ADE, however does not display it (it displays a normal text font).
There is also "text-transform: uppercase", but that's only the caps part, not small. This is unsupported by ePUB and, of course, by ADE. |
05-26-2009, 05:41 AM | #32 |
The Grand Mouse 高貴的老鼠
Posts: 72,276
Karma: 309002296
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Goodness me - so there is.
|
Advert | |
|
05-26-2009, 08:53 AM | #33 |
book creator
Posts: 9,656
Karma: 3856660
Join Date: Oct 2008
Location: Luxembourg
Device: Kindle Scribe
|
You could use the "text-transform: uppercase" and "font-size: small" to create a simile. Bit complicated but it LOOKS quite a bit like small caps.
|
05-26-2009, 09:59 AM | #34 | |
Lector minore
Posts: 655
Karma: 1738720
Join Date: Jan 2008
Device: Aura One, Paperwhite Signature
|
Quote:
However I just tried both that and text-transform: uppercase and they don't seem to work on the Sony Reader. I *does* look like a slightly different font but that might be a stroke weight thing from adjusting the size slightly. |
|
05-26-2009, 11:28 AM | #35 | |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Smallcaps: SMALLCAPS! Uppercase+small: SMALLCAPS! (note the S and ! sizes) Unless you do what I did here and apply different styles to different parts of the words. (By the way, I've seen not all browsers know to treat punctuation correctly with smallcaps.) But... as I said, "font-variant: smallcaps" is at least recognized in the ePUB spec, whereas "text-transform: uppercase" isn't. |
|
Advert | |
|
05-26-2009, 11:30 AM | #36 |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
No. The Sony uses ADE engine (afaIk), and ADE doesn't support either. But other readers might!
|
08-02-2009, 03:03 PM | #37 | |
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
|
I found that ADE was making huge margins around my eBooks even though I had them set to zero. The source file came from word and I found the following in the html file that I saved from word.
Quote:
Dale |
|
08-06-2009, 03:39 AM | #38 | |
book creator
Posts: 9,656
Karma: 3856660
Join Date: Oct 2008
Location: Luxembourg
Device: Kindle Scribe
|
Quote:
|
|
08-06-2009, 06:15 AM | #39 |
Resident Curmudgeon
Posts: 76,049
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
08-23-2009, 02:59 PM | #40 |
Captain Penguin
Posts: 2,948
Karma: 2079199569
Join Date: May 2009
Location: Vancouver, BC
Device: Kobo Libra 2, Nook Glowlight
|
Hi,
this code will display a solid horizontal line before and after some text, which can be used for chapters. Code:
h1 {text-align:center;} .solid-line { padding-left: 6em; font-size: .4em; vertical-align: middle; line-height: 1em; margin-left: 1em; margin-right: 1em; position: relative; bottom: .25em; background-color: black; } Code:
<h1><span class="solid-line"> </span>Chapter One<span class="solid-line"> </span></h1> padding-left: 6em; This controls the separation between the line and the text: margin-left: 1em; margin-right: 1em; |
08-23-2009, 05:18 PM | #41 |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Could you use "display: inline-block" and "width: 6em; height: 3pt" or something like that? That would make "position", "line-height", "font-size", and unneeded...
|
08-23-2009, 05:57 PM | #42 |
Captain Penguin
Posts: 2,948
Karma: 2079199569
Join Date: May 2009
Location: Vancouver, BC
Device: Kobo Libra 2, Nook Glowlight
|
I am no expert on CSS by any means, this is the best I could come up with - other people may have different, more efficient solutions than the one I proposed.
Last edited by afv011; 08-23-2009 at 10:53 PM. |
08-24-2009, 08:50 AM | #43 |
Resident Curmudgeon
Posts: 76,049
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
if the solid line is supposed to be out to the already existing margins, then you do not need the margin settings.
|
09-13-2009, 05:44 AM | #44 |
The Grand Mouse 高貴的老鼠
Posts: 72,276
Karma: 309002296
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Allowing images to resize to fit page width/height
By using XHTML and putting images in an svg wrapper, it's possible to get the images to resize to fill an entire page of the ebook reader, in proportion and centred. Here's the full xhtml file for my cover image.
The trick that made it work compared to my previous tries seems to be explicitly giving the picture width and height in the image object, to match the size of the viewBox. Previously I'd used 100% in there. <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="../styles/style001.css" type="text/css" /> <title></title> </head> <body> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 573 800" preserveAspectRatio="xMidYMid meet"> <image width="573" height="800" xlink:href="../images/img0032.png" /> </svg> </body> </html> |
09-29-2009, 11:24 PM | #45 |
Connoisseur
Posts: 79
Karma: 42
Join Date: Sep 2009
Device: sony reader touch (prs-600)
|
i posted this in the forum, but am pasting it here in the 'repository'.
--- using the definition list <dl></dl> works really well for plays. it's also better xhtml, since it defines the relationship between the speaker's name and his or her dialog in a way that using simple paragraphs does not. of course, you can further customize these tags with CSS. definition list is used as such: Code:
<dl> <dt>term</dt><dd>definition</dd> <dt>term</dt><dd>definition</dd> </dl> for example: Code:
<p><em>JobberA and JobberB enter</em></p> <dl> <dt>JobberA</dt> <dd>Wow, I really love e-books!</dd> <dt>JobberB</dt> <dd>Indeed! I do declare they are good. In fact, I will sing their praises! <p><em>JobberB sings.</em></p> <blockquote> e-books are really great<br/> ded-tree books i now do hate. </blockquote> </dd> </dl> <p><em>Exit all.</em></p> I also like to make the speaker names bold, because sony reader doesn't automatically format the <dt> to be bold, as most web browsers do (i think). anyway, just thought i'd throw this tidbit out there. i used it in some books i published on feedbooks. As GRiker said, <dl> might also be nice for a table of contents, where <dt> holds the link and <dd> holds a description. |
|
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 |