12-11-2018, 05:51 PM | #556 | |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Quotations that extend over more than one paragraph must have an opening quotation mark at the beginning of each paragraph and a closing quotation mark at the end of the final paragraph. BR Last edited by BetterRed; 12-11-2018 at 06:04 PM. |
|
12-11-2018, 09:32 PM | #557 | |||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
There was a similar thread in the Calibre Editor subforum discussing guillemets: Regex Function about «» and “” where I posted a very basic Regex I use. senhal posted his in Post #9. You may just have to flip around some of the inner/outer »« directions, and substitute in some ›‹, but the logic should all be the same. Note: And I still stand by Toxaris's EPUBTools Dialogue Checker being the best tool for this job. This problem really requires something a bit smarter than just Regex. Quote:
Quote:
Last edited by Tex2002ans; 12-11-2018 at 09:43 PM. |
|||
12-12-2018, 12:06 AM | #558 |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
12-12-2018, 01:54 AM | #559 |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Thank you both, BetterRed and Tex2002ans! The text is in german. And yes, I also find that Toxaris' tool is excellent for this task, but the book has come as epub already; I have to do some modifications (transform in modern spelling and so on). Only that there are quite a lot of mistakes of the reported sort that I wished to mend.
I'll have a look to the recommended threads. Fyi: In older german books, you'll frequently find the same way of formatting direct speech across multiple paragraghs, i. e. beginning with an opening quote at each paragraph, but ending with the closing one only at the end of the direct speech. This is no longer the case in modern books. the book I'm working on shows this as well, and I changed this. This is not the problem. There are some erroneously missing quotes. Last edited by Leonatus; 12-12-2018 at 01:58 AM. |
12-12-2018, 11:45 AM | #560 |
Wizard
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Your "simple" check:
Code:
(»[^«]*)</p> Code:
»([^«]*)» That's indeed very helpful! |
12-30-2018, 01:57 PM | #561 |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2018
Device: Android/MoonReader
|
New to Regex - not sure where I went wrong
I've got a PDF that I used Calibre to convert to ePUB but at the top of each page in the PDF was a piece of page bling next to the page number that is now mixed in with the text of the doc.
Code:
file:///K|/eMule/Incoming/88%20sci-fi%20aWizard.html (77 of 309)16-8-2007 23:50:31 Code:
\A file if I use: Code:
\A file:///K|/eMule/Incoming/88 I've tried adding \ to each of the escape required characters above, but that breaks the search back to where I was when I started. My goal is to setup a search and replace for everything starting with file up to and including the first following <p> |
04-19-2019, 04:48 AM | #562 |
Connoisseur
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
|
Better text structuring with regex
Better text structuring with regex:
Better text structuring allows better orientation in reading and thus better understanding of the texts. Of course this applies in particular to extensive and complicated texts. That's why I came up with the idea. To emphasize sentence beginnings by increasing the first letter of each sentence two degrees and bold. This can be easily implemented in Word with regex. But since I also want to do that with Sigil in finished epubs, I'm looking for the right regex solution for Sigil. Here is my approach: Search: [.?!] [A-Z] Replace: ^ & At this point I do not know, because I do not know if and how you can achieve the character formatting on fat when replacing. With Word, as I said, that's no problem. But how can I do that in Sigil with the finished epub? Does anyone have a suggestion? In german: Bessere Textstrukturierung mit Regex: Bessere Textstrukturierung ermöglicht bessere Orientierung beim Lesen und dadurch besseres Verstehen der Texte. Das gilt natürlich insbesondere für umfangreiche und komplizierte Texte. Daher bin ich auf die Idee gekommen. Satzanfänge herforzuheben, indem ich den ersten Buchstaben jedes Satzes zwei Grad vergrößere und fett markieren. Dies läßt sich in Word problemlos mit regex realisieren. Da ich aber das auch mit Sigil in fertigen epubs machen möchte, suche ich nach der passenden regex-Lösung für Sigil. Hier mein Ansatz: Suchen: [.?!] [A-Z] Ersetzen: ^& An dieser Stelle weiß ich nicht weiter, weil ich nicht weiß, ob bzw. wie man beim Ersetzen die Zeichenformatierung auf Fett erreichen kann. Mit Word, wie gesagt, ist das kein Problem. Aber wie kann ich das in Sigil mit dem fertigen epub hinkriegen? Hat jemand einen Vorschlag? |
04-19-2019, 05:44 AM | #563 | |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Code:
p::first-letter {font-size: 2em; font-weight: bold; } |
|
04-19-2019, 06:22 AM | #564 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm curious what the replace expression is that makes this "easily implemented in Word with regex"?
Last edited by DiapDealer; 04-19-2019 at 08:31 AM. |
04-19-2019, 07:52 AM | #565 | |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
That Find will not find all sentences, e.g. those following speech where writer's style is to punctuate inside the quotes. For that reason alone I would use a VBA macro. BR |
|
04-19-2019, 08:36 AM | #566 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Ahhh... that makes sense. Thanks. So not actually regex, then. An additional F&R feature. I thought maybe Word had some sort proprietary regular expression syntax that allowed text formatting to be specified in the replace expression.
|
04-19-2019, 08:47 AM | #567 |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
If you're looking for something to do you could reverse engineer it into Sigil
|
04-19-2019, 09:28 AM | #568 | |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Though regardless of how it was handled (plugin or inherent Sigil feature), it would very hard to ensure that no pre-existing styling would ever get stomped on in the process. |
|
04-20-2019, 05:09 AM | #569 | |
Enthusiast
Posts: 39
Karma: 59154
Join Date: May 2010
Location: Stuttgart, Germany
Device: Kobo H2O, PocketBook Touch HD, Tolino Vision 4
|
Quote:
You can try the following expression: search for: Code:
(?<!St|Mr|Mrs|<|\d)(<p[^>]*>|\!|\?|\.|…|:)( ?)(»|«|“|”|„)?( ?)([A-ZÖÄÜ]) Code:
\1\2\3\4<b>\5</b> Code:
b {font-weight: bold; font-size:1.2em; line-height:0.7em;} Klecks. |
|
04-22-2019, 02:12 PM | #570 |
Connoisseur
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
|
@Doitsu
Yes, the code works, but only for the first character od paragraphe. Thanks a lot. @Klecks Yes, that seems to work very good. I just tried it and will prove it more and mor the next day. My reading of long and complicated ebooks will be better with this new orientationsystem, and better understandig will be the result of that. Thank you so much. |
|
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 |