Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

add hyphenation toggle for crereader #710

Open
houqp opened this issue Jan 13, 2013 · 10 comments
Open

add hyphenation toggle for crereader #710

houqp opened this issue Jan 13, 2013 · 10 comments
Labels

Comments

@houqp
Copy link
Member

houqp commented Jan 13, 2013

No description provided.

@dracodoc
Copy link

I think maybe just modify the css to disable hyphenation will be a more general method. I modified my epub.css and saw the difference. So this request is not needed anymore if the css selection is implemented.

@houqp
Copy link
Member Author

houqp commented Jan 13, 2013

Yes, BTW, how did you managed to disable hyphenation in CSS?

@dracodoc
Copy link

The original epub.css


body { 
    text-indent: 0px; 
    margin: 0; 
    text-align: justify; 
}

My modified epub.css


body { 
    text-indent: 40px; 
    margin: 0; 
    text-align: justify; 
    hyphenate: none; 
}

@tigran123
Copy link
Member

Implementing a simple toggle for hyphenation is easier than requiring the users to edit their css files or having to supply a bunch of different css files to suit every possible user's wish.

@dracodoc
Copy link

I don't understand why you would call adding a toggle in KPV easier than adding one line in css.

The css already defined hyphenation, use an application toggle break css definitions, this is definitely not the right way.

Besides, what if user want to toggle justify, indent and every possible user preference for every different made ebook? Do you have enough time to do all those in toggles? Even you do, user have to remember shortcut key for every feature, or customize for every single ebook, is that good?

Just supporting load custom css is an obvious useful feature, and it's very easy to implement in KPV. KPV already load different css for different extensions, I knew I can do what I wanted by reusing the extensions with current KPV, but supporting custom css is the better way.

And it's not kpv developer's burden to provide all kinds of css files. If user have the need, he can modify css very easily or ask somebody else who can edit css.

@tigran123
Copy link
Member

I completely agree that loading a custom css file (and remembering the choice in the settings) is a very useful feature.

What I meant was that users shouldn't expect the KPV distribution to ship all different combinations of possible css styles.

@dracodoc
Copy link

Of course, I didn't suggest KPV to provide all kinds of css, that will be an impossible task. Every user have different preferences, and there are many ebooks made by all kinds of people. The current css can be a very good starting point, user can modify them or learn from other css files. And current KPV always use its own css to replace the css in ebook, I personally like this approach, but maybe some users may want to use their css or the css in ebook, the load custom css feature will solve everybody's problem.

@kai771
Copy link
Contributor

kai771 commented Jan 16, 2013

If anyone is interested, you can choose if you want hyphenation on or off by editing defaults.lua in Librerator. You can also specify which style sheet to use with each book, so that trick would work too.

@tigran123
Copy link
Member

Editing defaults.lua is not a solution because it is not easier than editing the css file.

@kai771
Copy link
Contributor

kai771 commented Jan 16, 2013

It might be a simpler solution for people that don't want hyphenation at all (simpler as in all settings in one file). For those that don't want hyphenation on some books, the solution is to make a copy of epub.css called e.g. epub-no-hyph.css and edit that file as suggested above. Then they can select that css for the books that they don't want to be hyphenated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants