04-08-2012, 07:25 AM | #46 |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
|
04-08-2012, 07:29 AM | #47 |
Guru
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Until the css is sorted, you can just use mmat1's solution with(out) the combined let1/2 styles.
Code:
<p class="let">([A-Z])(\w{0,20}\s)((\w{0,20}\s){3}) <p class="let"><span class="let1"><span class="let2">\1</span></span><span class="smcpTypeV">\2\3</span> |
Advert | |
|
04-08-2012, 07:43 AM | #48 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
Code:
<p class="let">([A-Z])([^ ]{0,20}\s)(([^ ]{0,20}\s){3}) |
|
04-08-2012, 07:51 AM | #49 |
Guru
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
And I've noticed that if/because the spans are combined, the measurements are now from the new fontsize, which is 4.6em rather from default fontsize
|
04-08-2012, 08:04 AM | #50 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
First thanks to the three of you for your quick and efficient help.
Quote:
I will study it and check Perkin's measurements. Have some of you any idea how to execute one after another, in automatic mode, several regex? (not related to each other like these two) Is there a tool that can do it? |
|
Advert | |
|
04-08-2012, 08:10 AM | #51 |
Guru
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Right, create a new style in the css (or adapt your existing one)
Code:
.let3{ display : block; float : left; margin-left : 0.28em; margin-top : -0.18em; /* essayer -0.20em pour deux lignes */ margin-right : 0.0em; font-family : 'Times New Roman'; font-size : 4.6em; /* essayer 3.33em pour deux lignes */ height : 1em; } Then using Code:
<p class="let">([A-Z])([^ ]{0,20}\s)(([^ ]{0,20}\s){3}) Code:
<p class="let"><span class="let3">\1</span><span class="smcpTypeV">\2\3</span> Last edited by Perkin; 04-08-2012 at 08:15 AM. |
04-08-2012, 08:33 AM | #52 | |
Guru
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Quote:
It's not as complicated as it first looks, once you get to using it. If you do a sequence, that runs multiple s&r's over any files etc. They also do a few other brilliant regex products (testing/building/explaining) and a texteditor (which is my preferred editor). |
|
04-08-2012, 09:46 AM | #53 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
@Perkin
After successive refinements, this looks better indeed. I will try this to morrow. I go straight from odt to EPUB. I just tweak the EPUB a little after converting, but most of the work is done without touching directly any html file. I am a Linux user, but I see now which kind of tool can do it. My idea was to add to our existing EPUB converting program a kind of editable super macro (the user could insert or modify any Regex inside). But, if the user needs Power Grep to use it, it would be a self-defeating purpose. On the other hand, if Power Grep can help me prepare this kind of super macro which later could be used without it, as a kind of program, yes it would be worthwhile. Last edited by roger64; 04-08-2012 at 09:49 AM. |
04-08-2012, 09:56 AM | #54 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
So I may mention the command-line oriented unix-tools sed or awk, which are available for windows as well. With awk you can do nearly anything, but you'll have to build some skills first... |
|
04-08-2012, 10:12 AM | #55 | |
Guru
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Quote:
|
|
04-08-2012, 12:02 PM | #56 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
And it was not stated in any context of your skills, if it was understood this way i must apologize. |
|
04-08-2012, 12:56 PM | #57 | |
Guru
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Quote:
Not having used awk I just thought it was another grep style prog using regex - again my fault. (My brain is only half working at moment 'cause of medicaton - at least that's what I'm blaming it on - I think I've used today's lucidity quota up earlier, on the actual regex problem and css adjustment.) |
|
04-08-2012, 04:12 PM | #58 |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
|
04-09-2012, 12:42 AM | #59 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I tried your solutions: both are working.
I have rather stay with mmat's though because with the second one I found it a little more tricky to finetune the dropcap position. BTW, a good part of my short science on dropcaps come from here. Thanks again and take care. NB: I'll have a look at "awk". Last edited by roger64; 04-09-2012 at 01:06 AM. |
04-17-2012, 10:39 AM | #60 |
Wanderer
Posts: 106
Karma: 472218
Join Date: Jan 2011
Device: Kindle 3, PaperWhite 2
|
I have a few documents in MS Word that I'm going to convert to ebooks. The documents have a lot of endnotes, and as usual, Word puts out a lot of junk when saved a html. I am very new to regex, and was wondering if I could get help. I want to search on:
Code:
<a href="#_edn1" name="_ednref1" title=""><span class="MsoEndnoteReference"><span class="MsoEndnoteReference"><b><span style="font-size:8.0pt;font-family:"Times New Roman","serif";color:black">[1]</span></b></span></span></a> Code:
<a href="#_edn1" name="_ednref1" title=""><sup>[1]</sup></a> Thanks in advance. Last edited by mncowboy; 04-17-2012 at 10:53 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Examples of Subgroups | emonti8384 | Lounge | 32 | 02-26-2011 07:00 PM |
Accessories Pen examples | Gunnerp245 | enTourage Archive | 15 | 02-21-2011 04:23 PM |
Stylesheet examples? | Skitzman69 | Sigil | 15 | 09-24-2010 09:24 PM |
Examples | kafkaesque1978 | iRiver Story | 1 | 07-26-2010 04:49 PM |
Looking for examples of typos in eBooks | Tonycole | General Discussions | 1 | 05-05-2010 05:23 AM |