![]() |
How about a plugin to hyphenate?
Calibre has a plugin, "Hyphenate This!", that will insert soft hyphens into a document using a Libre Office foundation hyphenation dictionary. It would be very nice to have a similar capability in Sigil.
I don't know if the two plugin approaches are similar enough for this to be helpful, but in case here is the thread about the Calibre plugin: https://www.mobileread.com/forums/sho...d.php?t=208534 Dave |
There is a pure python hyphennate.py that uses the standard tex based hyphenation dictionary (like Libre/Open Office, Sigil, etc). So yes a hyphenation dictionary would be a very easy to do and nice edit plugin for Sigil.
See this link: https://pypi.python.org/pypi/hyphenator/0.5.1 That code can be unpacked and hyphenator.py can easily be added to a plugin. It is LGPL so it is license compatible with Sigil. |
Which for the record is the same module the calibre plugin uses.
|
Unless building a Sigil plugin is a very simple exercise I suspect someone other than me will need to do it. I am glad you agree that it would be a useful feature to add to Sigil.
Dave |
Have you asked the calibre plugin author if they would like to modify their plugin to run with Sigil? If not, I am sure someone here could throw one together using the calibre one as a base since only the gui would be different, where-as both support html5lib, lxml, etc and of course python and parsing of xhtml is easily achieved in both. So unless it uses some special interfaces specific to calibre, most if it should be re-usable. What license does the calibre plugin use?
|
The last Calibre plugin update was in August, 2014 leading me to wonder if the author is still active at this point. His last post here was in May, 2015 giving me further doubts about contacting him.
Given this perhaps one of the developers here could take a look at his work and the tool it is based on. Dave |
There is another point that someone brought to my attention over in the Kindle Developer's forum. Perhaps this is not the greatest idea for an edit plugin, unless the intent is to use it immediately before a KindleGen and then discarding the changes. You can see the full post here:
https://www.mobileread.com/forums/sho...99#post3256199 Quoting his main point "Most ePub rederers (such as ADE/RMDSK) will not properly display the hyphens and if you need to make changes to the ePub, the hyphens will get in the way. Also searching breaks with the hyphens." Dave |
I would never recommend mass soft-hyphen insertion (pollution) for anything other than personal use. It doesn't make sense to use it for books you plan to disseminate to others. It should be reserved as an end-user option, rather than a creation option in my opinion.
|
Perhaps as pre-plugin for the kindlegen plugin?
|
Quote:
Of course if Amazon were to add proper hyphenation support into the Kindle this would not be a problem. They however seem uninterested in doing so. Dave |
Not everyone likes hyphenation. Why force it on them (and take away their ability to search the text as a consequence)? Just make books and allow the readers to use the apps/devices/formats whose features they're most comfortable with (or that offer the customization options they value most). Hyphenation, line-height, letter-spacing, font-sizes, font-faces: these are all things that should be left up to the reader to tweak if they're so inclined (when speaking of standard body text). If hyphenation is important enough to them, they'll already be using a device/app/format that offers them the choice of enabling it (or disabling it).
|
Quote:
|
Quote:
http://www.amazon.com/b?_encoding=UTF8&node=11516960011 And speaking by me, I like hyphens. Regards Rubén |
Quote:
So now we have a reason to want to get the kfx format opened up. I wonder how long that will take? Dave |
Quote:
|
| All times are GMT -4. The time now is 08:30 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.