06-08-2013, 04:01 AM | #241 | |
eBook DIYer
Posts: 111
Karma: 10
Join Date: Oct 2012
Location: Europe
Device: K4, KF HD 8.9, Readium
|
Quote:
Last edited by abeonis; 06-08-2013 at 04:19 AM. Reason: I speak english as a spanish cow |
|
06-11-2013, 05:22 AM | #242 | |
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
Quote:
a question for anyone who might know: my main tool is a text editor with a python regex interpreter. regular-expressions.info says that "The only significant features missing from Python's regex syntax are atomic grouping, possessive quantifiers and Unicode properties." am i right to understand that this pattern \p{L} falls under the category of unicode properties, and is not supported by python interpreters? as an aside, i realize it's been mentioned in other threads, but it really would be great to have a forum for regex on MR, or a place to organize regex snippets to avoid having to look through this monster thread. |
|
Advert | |
|
06-11-2013, 07:01 AM | #243 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
For example the following regex, which works in Sigil, will find Greek text (due to its simple design, it'll also find double spaces). [\p{Greek}| ]{2,} To test it, just copy any Greek text (e.g. μὴ μοῦ τοὺς κύκλους τάραττε.) in a text file and use the above regex. If the regex engine of your Editor supports \p{L}, it should find the complete phrase (and the space before it). |
|
06-11-2013, 08:51 AM | #244 |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
A special problem of which I don't really know if it's to be solved with regex:
Due to justified setting in Sigil, there appear - more or less ugly - white spaces between some words in a paragraph. As I nevertheless like this setting, I would accept this. But is it possible to keep at least some characters together that really should not be separated, such as the simple quote signs, represented here: › verrückt ‹ - in relation to the ensuing/preceding word? The problem is that the spaces don't appear as such in code view/book view, and also the preview shows the text correctly. Only on the device signs and words become - sometimes - separated. As far as I can see, "find/replace" doesn't recognize this issue, because it is not "set" by style or such, but the consequence of justifying the text. Thankful for any suggestions. |
06-11-2013, 09:01 AM | #245 | |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
you are saying your device is breaking (padding) between characters? Code:
"Nice to know becomes " Nice to know |
|
Advert | |
|
06-11-2013, 09:11 AM | #246 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
You might also occasionally see extra spaces if the value of the paragraph's text-align property is set to justify. Try changing it to left to see if it makes a difference. E.g. Code:
<p style="text-align: left;">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> Code:
p { text-align: left; } Last edited by Doitsu; 06-11-2013 at 09:31 AM. |
|
06-11-2013, 02:47 PM | #247 | |||
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Quote:
Quote:
Quote:
I have a Kobo Touch, and I'm always trying to format the text alignment with Sigil, and not so by the internal options of the reader. Perhapsd, I should look if there are any changes. BTW: I'm using the Kobo Touch Extended plugin, but not the "Soft Hyphenate"-option, for it dissolves, in my case, any kind of text justification. Anyway, thanks a lot! I appreciate! Last edited by Leonatus; 06-11-2013 at 02:51 PM. |
|||
06-11-2013, 02:57 PM | #248 |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
I just see that in the stylesheet the text justification does not appear as: text-align:, but as "display: block;". Does this matter?
|
06-11-2013, 06:12 PM | #249 | |
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
Quote:
anyway, did some research, turns out i was wrong about the interpreter (i'm using sublime text 2 which, by the way, is really, really great, and it uses Boost, which i guess is a 'flavour'(?) of Perl). boost does support this kind of expression but the syntax is slightly different. linking to the docs in case anyone else uses ST and wants the reference: http://www.boost.org/doc/libs/1_47_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html |
|
06-11-2013, 09:26 PM | #250 | |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
If you don't want big spaces then you can't use 'Justify' PERIOD as spaces is how it makes it fill the line (there is letter spacing, but many readers don't support that, so AVOID.) & NBSP; is typically used to keep ONE Word pair from splitting (forces the spaces elsewhere). You can't just say DON'T Split between ALL words and expect Justify not to barf all over |
|
06-12-2013, 03:44 AM | #251 | |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Quote:
I see. Spaces seem to be almost inevitable with the 'justify' setting (and without 'busy' hyphenation). I would accept that in relation to spaces between words. But punctuatiion marks should be close to the relative word. So, my question was only about the strange behaviour concerning the ›...‹ marks. However, I fetched the book completely new, formatted it again in Sigil, loaded it up in Calibre and sent it to the device, and the result was that there are still some of these issues, but pretty much fewer, and where the spaces appear, they are much smaller than before. Don't know what it was. Remaining problems I hope to resolve with & NBSP;. But, I admit, there are also spaces missing after punctuation marks. |
|
06-12-2013, 08:39 AM | #252 |
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
@Leonatus: I see your device is Kobo. Which calibre driver ARE you using? Kobo OR Kobo Extended?
If Kobo Extended, I'd suggest you try sending it with the basic Kobo driver and see if that makes a difference. |
06-12-2013, 11:00 AM | #253 | |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Quote:
With the newly converted book I am so far happy, but out of curiosity, I'll obey to your suggestion. |
|
06-12-2013, 11:51 AM | #254 |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Hm, just coming from testing, but even more odd:
After switching on the standard driver (of course switching off the extended), I first fetched the book again, converted it and - just to try - applied the Hyphenate-This!-Plugin. Then sent to device. Result: Issues showed above vanished, but instead, there are many, many punctuation marks of any kind (.,.,;,!, even quotation marks) that don't rest immediately after the last word of a line, but stand alone in the new line. Very ugly! Removed the book, either from device as from bibliotheque. Fetched and converted the book again, now without using the Hyphenate-This!-Plugin. Result: The same! My God! What is this? Until now, I considered the basic driver as 'asset of the last resort' (please don't mind!) in the case that the Extended driver wouldn't work properly. But this time, the Extended works more consistent. Nevertheless, my impression is that's me who did something wrong. |
06-12-2013, 03:31 PM | #255 |
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
But what happens wiith the standard driver and NO hyphenate-this?
Each and every plugin is adding an extra degree of complexity. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Examples of Subgroups | emonti8384 | Lounge | 32 | 02-26-2011 06:00 PM |
Accessories Pen examples | Gunnerp245 | enTourage Archive | 15 | 02-21-2011 03:23 PM |
Stylesheet examples? | Skitzman69 | Sigil | 15 | 09-24-2010 08:24 PM |
Examples | kafkaesque1978 | iRiver Story | 1 | 07-26-2010 03:49 PM |
Looking for examples of typos in eBooks | Tonycole | General Discussions | 1 | 05-05-2010 04:23 AM |