Mobileread
Feature request : using a custom css file
#1  Bertrand 12-20-2010, 05:53 AM
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.
Reply 

#2  eBookLuke 12-20-2010, 06:41 AM
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
Reply 

#3  eBookLuke 12-20-2010, 06:48 AM
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
Reply 

#4  Bertrand 12-20-2010, 12:57 PM
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.
[txt] style001.txt (2.6 KB, 534 views)
Reply 

#5  eBookLuke 12-20-2010, 02:00 PM
Quote Bertrand
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
Reply 

#6  roger64 12-21-2010, 04:46 AM
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.
No Problem.png 
Reply 

#7  eBookLuke 12-21-2010, 06:09 AM
Quote roger64
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!
Reply 

#8  roger64 12-22-2010, 03:55 AM
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.
Reply 

#9  Sam Sahara 12-28-2019, 12:46 PM
Quote Bertrand
Hi

First,...
...
Thanks for reading.
So what would you do with the ducks?
Reply 

Today's Posts | Search this Thread | Login | Register