Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > Bookeen

Notices

Reply
 
Thread Tools Search this Thread
Old 04-26-2008, 10:41 AM   #1
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Supported HTML/CSS tags and properties

Hi all,

I've been playing a bit with HTML files, and converting them to mobipocket format with html2mobi. I've been disappointed by realizing that the Cybook reader (and the PC mobipocket reader) does not support many formatting instructions in HTML and CSS.

I've found this page, that apparently gives a list of the tags supported by the mobipocket reader, but I wonder if it's really applicable to the Cybook, and to HTML files not converted into mobipocket format. So the question is, is there any resource about which tags and properties are supported by the Cybook?

For instance, I wanted to have some space above headings (H1, H2, etc.), but it seems the Cybook won't recognize STYLE or CLASS attributes, so I'd be left with introducing empty lines, which is generally bad style. Also, can I have an horizontal rule that takes only half of the screen and is not centered? What about a paragraph or DIV with larger margins?
Jellby is offline   Reply With Quote
Old 04-26-2008, 11:15 AM   #2
cmbs
non-believer
cmbs will become famous soon enoughcmbs will become famous soon enoughcmbs will become famous soon enoughcmbs will become famous soon enoughcmbs will become famous soon enoughcmbs will become famous soon enoughcmbs will become famous soon enough
 
Posts: 384
Karma: 713
Join Date: Dec 2007
Location: USA
Device: Cybook Gen 3, JetBook Lite
.....

Last edited by cmbs; 04-27-2008 at 09:08 AM.
cmbs is offline   Reply With Quote
Old 04-28-2008, 05:56 AM   #3
IceHand
Linux User
IceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavens
 
IceHand's Avatar
 
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
Quote:
Originally Posted by Jellby View Post
For instance, I wanted to have some space above headings (H1, H2, etc.), but it seems the Cybook won't recognize STYLE or CLASS attributes, so I'd be left with introducing empty lines, which is generally bad style. Also, can I have an horizontal rule that takes only half of the screen and is not centered? What about a paragraph or DIV with larger margins?
No, the Cybook and Mobipocket do support style and class attributes to some extent, e.g. <h1 style="margin-top:2em;">Header</h1> works fine. How did you try to make margins?

Horizontal rules seem to be always centered, yes.
Paragraph with larger margins: <p style="margin:5%">Text</p> but for some reason this does not affect the right margin.

I don't know if there's a list of all the supported CSS attributes, I always did it with trial and error.
IceHand is offline   Reply With Quote
Old 04-28-2008, 09:55 AM   #4
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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
Quote:
Originally Posted by IceHand View Post
No, the Cybook and Mobipocket do support style and class attributes to some extent, e.g. <h1 style="margin-top:2em;">Header</h1> works fine. How did you try to make margins?

Horizontal rules seem to be always centered, yes.
Paragraph with larger margins: <p style="margin:5%">Text</p> but for some reason this does not affect the right margin.

I don't know if there's a list of all the supported CSS attributes, I always did it with trial and error.
Mobipocket has a tutorial and reference section on their site. For example:
http://www.mobipocket.com/dev/articl...TagRef_OEB.htm
defines the html stuff the format understands and shows where the Style tag works. The tutorial starts at: http://www.mobipocket.com/dev/articl...eFolder=prcgen

Dale
DaleDe is offline   Reply With Quote
Old 05-01-2008, 05:19 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by IceHand View Post
No, the Cybook and Mobipocket do support style and class attributes to some extent, e.g. <h1 style="margin-top:2em;">Header</h1> works fine. How did you try to make margins?
Really? It doesn't seem to work for me:

<H2 ALIGN="center"><B>Header 1</B></H2>
<H3 STYLE="margin-top: 1em; page-break-after: avoid">Header 2</H3>

and still the space between both headers is minimal. I tried with padding too, no luck.

Quote:
Originally Posted by DaleDe View Post
Mobipocket has a tutorial and reference section on their site. For example:
http://www.mobipocket.com/dev/articl...TagRef_OEB.htm
defines the html stuff the format understands and shows where the Style tag works. The tutorial starts at: http://www.mobipocket.com/dev/articl...eFolder=prcgen
That's the same page I gave in my first post. Yes, it gives some information, but I think it is incomplete (it says nothing about CSS, for instance).
Jellby is offline   Reply With Quote
Old 05-01-2008, 06:27 AM   #6
IceHand
Linux User
IceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavens
 
IceHand's Avatar
 
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
Quote:
Originally Posted by Jellby View Post
Really? It doesn't seem to work for me:

<H2 ALIGN="center"><B>Header 1</B></H2>
<H3 STYLE="margin-top: 1em; page-break-after: avoid">Header 2</H3>

and still the space between both headers is minimal. I tried with padding too, no luck.
I found the cause of your problem: html2mobi. I normally use Mobigen to create the Mobipocket file, but I just tried html2mobi and had the same problem as you. If you're using Linux: Mobigen works fine with Wine.
IceHand is offline   Reply With Quote
Old 05-01-2008, 11:48 AM   #7
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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
Quote:
Originally Posted by Jellby View Post
Really? It doesn't seem to work for me:

<H2 ALIGN="center"><B>Header 1</B></H2>
<H3 STYLE="margin-top: 1em; page-break-after: avoid">Header 2</H3>

and still the space between both headers is minimal. I tried with padding too, no luck.



That's the same page I gave in my first post. Yes, it gives some information, but I think it is incomplete (it says nothing about CSS, for instance).
that is because CSS is not supported in mobipocket at all. many of the items normally found in CSS is supported but the word style usually is not. Mobipocket is a bit of a kludge if you look at the internals of how they do things but it is marketed well. XSL is supported in source files used to conver xml.

Dale
DaleDe is offline   Reply With Quote
Old 05-02-2008, 11:38 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by IceHand View Post
I found the cause of your problem: html2mobi. I normally use Mobigen to create the Mobipocket file, but I just tried html2mobi and had the same problem as you. If you're using Linux: Mobigen works fine with Wine.
I see... Well, I found that, for this particular problem, I could use:

<H1 HEIGHT="2em">Header</H1>

to have some space above the header, it also works with <DIV> and <P> elements. Could you extract the HTML code from the file generated by Mobigen, with mobi2html, for instance? Maybe Mobigen makes some changes in the code, and we could see which attributes actually work...
Jellby is offline   Reply With Quote
Old 05-02-2008, 12:45 PM   #9
IceHand
Linux User
IceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavens
 
IceHand's Avatar
 
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
Quote:
Originally Posted by Jellby View Post
Could you extract the HTML code from the file generated by Mobigen, with mobi2html, for instance? Maybe Mobigen makes some changes in the code, and we could see which attributes actually work...
Hah, yes, you're absolutely right! The code -
Code:
<H2 ALIGN="center"><B>Header 1</B></H2>
<H3 STYLE="margin-top: 1em; page-break-after: avoid">Header 2</H3>
- will be converted to:
Code:
<h2 align="center"><b>Header 1</b></h2>
<h3 height="2em">Header 2</h3> �
IceHand is offline   Reply With Quote
Old 05-04-2008, 04:55 PM   #10
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
I wonder what the algorithm for these kind of conversions are? I have added a ticket to the MobiPerl trac for this so I can add some transformations sometime.
tompe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some CSS properties not transferring when converting ePub to LRF megacoupe Calibre 2 10-15-2010 05:35 PM
FBReader (Pocketbook) und CSS Tags beluavracus PocketBook 5 10-14-2010 08:39 AM
HTML tags and parameters supported by Mobi hkdorama Kindle Formats 1 07-26-2010 05:48 AM
Unsetting properties in CSS Jellby ePub 2 06-03-2009 04:29 AM
css override code for <h2> and <h1> tags Amalthia Calibre 2 03-29-2009 06:51 PM


All times are GMT -4. The time now is 09:56 AM.


MobileRead.com is a privately owned, operated and funded community.