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

Go Back   MobileRead Forums > E-Book Software > Writer2ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-20-2010, 04:53 AM   #1
Bertrand
Connoisseur
Bertrand began at the beginning.
 
Posts: 65
Karma: 10
Join Date: Dec 2008
Location: Paris, France
Device: Nexus 7
Feature request : using a custom css file

Hi

First, big thanks to eBookLuke.
I use your 2 extensions a lot, My TXT Cleaner and W2E.

I know that your goal with the latter is to provide perfect and easy-to-do epub files.

But here's a request :

In the Options dialog box, an option to use our own stylesheet.
For example :

If the option is checked, a Browse button that will allow to choose a css file and your extension will copy it in the style folder of the epub file, instead of the current default stylesheet.

If not checked, use the default stylesheet as usual.

It seems simple when said like that :-)
Dont' know how hard it would be to implement.
I don't know anything about programming in openOffice.

Thanks for reading.
Bertrand is offline   Reply With Quote
Old 12-20-2010, 05:41 AM   #2
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 341
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
No, it is quite simple, but there is just a problem to solve.
The proposed CSS in the current version is "dinamic". This means that some values in the CSS can change depending of the user choice ( font dimension and font face)
I can easily allow to choose an alternative CSS but this will be "static" and you cannot anymore change that parameters by preference window.
To enable parameter change even in external CSS I have to rewrite a lot of code.
Let me know if the first option is enought for you.

Quote:
I don't know anything about programming in openOffice.
I too

Luke

Last edited by eBookLuke; 12-20-2010 at 08:57 AM.
eBookLuke is offline   Reply With Quote
Old 12-20-2010, 05:48 AM   #3
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 341
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
I like your idea… Can you post your favorite CSS in this thread? I try to experiment with it…

The W2E CSS is just one of some "good Tyoographer" choice. Other country can have different rules to well formatting a book… We can provide a set of good CSS, and leaving to the user to create his own…

Luke
eBookLuke is offline   Reply With Quote
Old 12-20-2010, 11:57 AM   #4
Bertrand
Connoisseur
Bertrand began at the beginning.
 
Posts: 65
Karma: 10
Join Date: Dec 2008
Location: Paris, France
Device: Nexus 7
Ok, here's my css code.

This is the file that I use to replace the default stylesheet.

In this file I kept all your classes.
I change the selectors h1 to h6, p.
I add two custom classes.

(Sometimes I add more classes, it depends on the content of the book, but those are the main styles)

I have to say that in openOffice, before creating the epub, I reset all predefined styles, load my own styles and apply them. After that, my css file works nicely in my reader.
Attached Files
File Type: txt style001.txt (2.6 KB, 139 views)
Bertrand is offline   Reply With Quote
Old 12-20-2010, 01:00 PM   #5
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 341
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
Quote:
Originally Posted by Bertrand View Post
Ok, here's my css code.

This is the file that I use to replace the default stylesheet.

In this file I kept all your classes.
I change the selectors h1 to h6, p.
I add two custom classes.

(Sometimes I add more classes, it depends on the content of the book, but those are the main styles)

I have to say that in openOffice, before creating the epub, I reset all predefined styles, load my own styles and apply them. After that, my css file works nicely in my reader.
Nice!

If you change:
Code:
font: 1em Georgia, "Times New Roman", Times, serif;
with:
Code:
font: 1em Georgia, "Times New Roman", Times, serif, sansserif, monospace;
you can change all font faces "on the fly" in almost every reader.
By remove sansserif and monospace the user cannot set the font to "Arial" or "Courier"

Luke
eBookLuke is offline   Reply With Quote
Old 12-21-2010, 03:46 AM   #6
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,436
Karma: 846401
Join Date: Jan 2009
Device: KoboGlo
Epub validation test

I tried to check our last produced epub with Valloric's new FlightCrew 0.7.1. epub validator.

You'll find the result below.

Of course, I guessed it beforehand

PS/ of course "Gabriel" would have been better, but this is MY mistake.

Next time, I'll open a new thread. Sorry for this.
Attached Thumbnails
Click image for larger version

Name:	No Problem.png
Views:	302
Size:	78.2 KB
ID:	63207  

Last edited by roger64; 12-21-2010 at 03:49 AM.
roger64 is offline   Reply With Quote
Old 12-21-2010, 05:09 AM   #7
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 341
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
Quote:
Originally Posted by roger64 View Post
Epub validation test
I tried to check our last produced epub with Valloric's new FlightCrew 0.7.1. epub validator.
NO VALIDATION ERRORS?
Maybe I wrong something!
eBookLuke is offline   Reply With Quote
Old 12-22-2010, 02:55 AM   #8
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,436
Karma: 846401
Join Date: Jan 2009
Device: KoboGlo
My purpose was to check something I was sure of, which was working on my Sony to see if I could trust this validation tool and not he other way around.

My previous trials at W3C for validation software had been a little disappointing because they brought me back lots of clueless details that I could'nt exploit.

So, FlightCrew seems to be an exploitable no-nonsense tool and of course, do not misunderstand me, W2E is a very good epub software producer.
roger64 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
Custom CSS for output deckoff Calibre 1 08-28-2010 11:55 PM
Feature request: CSS style application Fitz Sigil 4 07-25-2010 06:36 AM
Feature Request - Edit File Option fcoulter Calibre 10 07-22-2010 12:56 AM
Feature request: make two or more files into one big file spikebrennan Calibre 4 07-19-2010 09:24 PM
Feature request: Select what file format to save RSS into haridasi Calibre 2 08-23-2008 10:03 AM


All times are GMT -4. The time now is 12:59 PM.


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