Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-02-2019, 02:38 AM   #571
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
Quote:
Originally Posted by Klecks View Post
You can try the following expression:

search for:
Code:
(?<!St|Mr|Mrs|<|\d)(<p[^>]*>|\!|\?|\.|…|:)( ?)(»|«|“|”|„)?( ?)([A-ZÖÄÜ])
@ Klecks:
Ich hatte nicht gehofft, dass die Idee mit den fetten Anfangsbuchstaben so gut und schnell umgesetzte werden könnte. Aber das bis jetzt erreichte gefällt mich sehr gut. Es funktioniert sehr effektiv und ist dennoch flexibel und einfach anpassbar.
Hier noch ein Beispiel für eine Problemstelle:

… ist möglich.«76 Die Unterscheidung …

Vielleicht gibt es da (oder hast Du) eine Lösung?

in english:

I had not hoped that the idea with the bold initials could be implemented so well and quickly. But I like that so far. It works very effectively and yet is flexible and easily customizable.
Here is an example of a problem:

… ist möglich.«76 Die Unterscheidung …

Maybe there is (or you have) a solution?
famfam is offline   Reply With Quote
Old 05-02-2019, 05:29 PM   #572
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
Quote:
Originally Posted by Doitsu View Post
If your reading app supports pseudo elements, you don't need to use any regular expressions at all. Simply add the following code to your main style-sheet:

Code:
p::first-letter {font-size: 2em; font-weight: bold; }
@ Doitsu
I'm not sure if it works on my Kobo Clara HD or not, and if so, how? I think it worked once or twice, but most of my examples do not seem to work. But it works on Sigil and the Calibre Editor. Any idea?

@ Klecks
What you think about it? Your solution works nearly perfect for the most sentences within the texts, but not for the first letters [A-Z] or numbers [0-9] of paragraphs. Is that so?
If yes, what about a regex-solution for it? Any idea?

Last edited by famfam; 05-02-2019 at 05:33 PM.
famfam is offline   Reply With Quote
Advert
Old 05-03-2019, 03:26 AM   #573
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by famfam View Post
@ Doitsu
I'm not sure if it works on my Kobo Clara HD or not, and if so, how? I think it worked once or twice, but most of my examples do not seem to work. But it works on Sigil and the Calibre Editor. Any idea?
AFAIK, Kobo devices use an epub3-compatible reading app for rendering KEPUB books. Try converting your test case epub to a kepub book with Calibre.

If it still doesn't work, your stylesheet might contain errors and/or another selector overrides the pseudo selectors.

Did you use the Validate with W3C Sigil option to check your stylesheets?
Doitsu is offline   Reply With Quote
Old 05-03-2019, 07:19 AM   #574
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
Quote:
Originally Posted by Doitsu View Post
...Try converting your test case epub to a kepub book with Calibre.
... your stylesheet might contain errors and/or another selector overrides the pseudo selectors.
Did you use the Validate with W3C Sigil option to check your stylesheets?
kepub-converting hat no effect on it.
Here the check of stylesheet results and the errors:
Spoiler:

W3C CSS Validator results for TextArea (CSS level 3)
Sorry! We found the following errors (7)
URI : TextArea
6 body Value Error : orphans 0 is not valid, only values greater than 0 allowed. : 0
6 body Value Error : widows 0 is not valid, only values greater than 0 allowed. : 0
11 Parse Error } { line-height: 10.0pt; }
13 .BalloonText Value Error : orphans 0 is not valid, only values greater than 0 allowed. : 0
13 .BalloonText Value Error : widows 0 is not valid, only values greater than 0 allowed. : 0
14 .ListParagraph Value Error : orphans 0 is not valid, only values greater than 0 allowed. : 0
14 .ListParagraph Value Error : widows 0 is not valid, only values greater than 0 allowed. : 0

Valid CSS information
* {
padding : 0;
margin : 0;
}
body {
font-family : 'Arial Unicode MS', sans-serif;
font-size : 12pt;
}
p {
margin : 0;
}
li {
margin-bottom : 0;
margin-top : 0;
}
h1, h2, h3, h4, h5, h6 {
font-size : 1em;
line-height : 13.0pt;
}
.BalloonText {
color : #000000;
font-family : Tahoma, sans-serif;
font-size : 10pt;
}
.ListParagraph {
color : #000000;
font-size : 10pt;
margin-left : 36pt;
}
span.Hyperlink {
color : #0066cc;
text-decoration : underline;
}
span.SprechblasentextZchn {
color : #000000;
font-family : Tahoma, sans-serif;
font-size : 8pt;
}
img {
max-width : 100%;
}
p::first-letter {
font-weight : bold;
}
Congratulations! No Error Found.
This document validates as CSS level 3 !
To show your readers that you've taken the care to create an interoperable Web page, you may display this icon on any page that validates. Here is the XHTML you could use to add this icon to your Web page:

<p>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" />
</a>
</p>


<p>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
alt="Valid CSS!" />
</a>
</p>

(close the img tag with > instead of /> if using HTML <= 4.01)

Last edited by theducks; 05-03-2019 at 12:11 PM. Reason: Please use Spoilers for LOGS
famfam is offline   Reply With Quote
Old 05-03-2019, 07:57 AM   #575
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by famfam View Post
kepub-converting hat no effect on it.
Here the check of stylesheet results and the errors:
It looks like there's a syntax error in your stylesheet:

Code:
11 Parse Error } { line-height: 10.0pt; }
Please post the original selector that contains:

Code:
line-height: 10.0pt;
as well as the selectors before and after it. Most likely your stylesheet is missing a curly brace or contains a superfluous one.
Doitsu is offline   Reply With Quote
Advert
Old 05-04-2019, 03:18 AM   #576
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
Quote:
Originally Posted by Doitsu View Post
It looks like there's a syntax error in your stylesheet:

@Doitsu
Code:
11 Parse Error } { line-height: 10.0pt; }
Code:
line-height: 10.0pt;
I simply deleted that line and this error is away.
The other errors with orphans 0 and windows 0: I put the value to 1.

Now I have no errrors any more.
After that I converted to kepub and changed the file to a kepub.epub:
Now it works on my Kobo Clara.

With my Kindle Paperwhite - I just tried that - it works in azw3-Format.
Probably too in mobi and KFX Format. I will try that later.

@Klecks
As I still prefer epub-Format to kepub.epub:
So if we also find another solution in regex for the bold first letter of all paragraphs, I would be very happy.

@Doitsu
As I red the calibre kepub plugin is not perfect, because the original kepub is not fully known and understood.
famfam is offline   Reply With Quote
Old 05-05-2019, 03:44 AM   #577
Klecks
Enthusiast
Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.
 
Klecks's Avatar
 
Posts: 39
Karma: 59154
Join Date: May 2010
Location: Stuttgart, Germany
Device: Kobo H2O, PocketBook Touch HD, Tolino Vision 4
How does the styling around the problem area look like? Maybe there is a span involved or some kind of whitespace?
If so, you can adapt the search-expression to:


Code:
(?<!St|Mr|Mrs|Dr|<|\d)(<p[^>]*>\s*|\!|\?|\.|…|:)( ?|\s*</?span[^>]*>\s*?)(»|«|“|”|„)?( ?|\s*</?span[^>]*>\s*?)([A-ZÖÄÜ])
It doesn't catch everything though - especially if you have chains of spans or even nested spans or divs.
Klecks is offline   Reply With Quote
Old 05-06-2019, 07:25 AM   #578
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
Quote:
Originally Posted by Klecks View Post
How does the styling around the problem area look like? Maybe there is a span involved or some kind of whitespace?
If so, you can adapt the search-expression to:

Code:
(?<!St|Mr|Mrs|Dr|<|\d)(<p[^>]*>\s*|\!|\?|\.|…|:)( ?|\s*</?span[^>]*>\s*?)(»|«|“|”|„)?( ?|\s*</?span[^>]*>\s*?)([A-ZÖÄÜ])
It doesn't catch everything though - especially if you have chains of spans or even nested spans or divs.
That code didn't work for me, don't know why.
Ich will give you 2 examples of footnotes in source text and book-view.
famfam is offline   Reply With Quote
Old 05-06-2019, 07:27 AM   #579
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
References Problem with First Letter Bold: example 1

@Klecks
Here an example with references to endnotes. In this example the references are superscripted numbers
Sourcetext-view:
<p class="P_calibre2__And__Calibri__And__12pt__And__S pacing_After__And__Spacing_Before"><span style=" font-weight: bold; font-size: 1.00em;">D</span><span style=" font-size: 1.00em;">ie Wissenschaft und der Erkenntnisdrang sind hinter der </span><span style=" font-style: italic; font-size: 1.00em;">unwiderlegbaren</span><span style=" font-size: 1.00em;"> Wahrheit her, also hinter Aussagen, die Menschen einfach nicht ablehnen können - die stringent sind</span><span style=" font-weight: bold; font-size: 1.00em;">. D</span><span style=" font-size: 1.00em;">avon gibt es, wie man seit Leibniz weiß, zwei Arten: Vernunftwahrheiten und Tatsachenwahrheiten</span><span style=" font-weight: bold; font-size: 1.00em;">. I</span><span style=" font-size: 1.00em;">hr Hauptunterschied besteht darin, wie stringent sie sind: »Die Vernunftwahrheiten sind notwendig, und ihr Gegenteil ist unmöglich; die Tatsachenwahrheiten dagegen sind zufällig, und ihr Gegenteil ist möglich.«</span><span style=" font-size: 0.75em; vertical-align: super;">76</span><span style=" font-size: 1.00em;"> Die Unterscheidung ist sehr wichtig, wenn auch vielleicht nicht in dem Sinne, den Leibniz im Auge hatte</span><span style=" font-weight: bold; font-size: 1.00em;">. T</span><span style=" font-size: 1.00em;">atsachenwahrheiten sind trotz ihrer Zufälligkeit für jeden, der sie mit eigenen Augen beobachtet, ebenso stringent wie die Aussage, daß zwei und zwei vier ist, für jeden, der recht bei Verstände ist</span><span style=" font-weight: bold; font-size: 1.00em;">. E</span><span style=" font-size: 1.00em;">s ist nur so, daß eine Tatsache, ein Ereignis nie von allen beobachtet werden kann, die sie vielleicht kennen möchten, während sich die mathematische oder Vernunft Wahrheit jedem als völlig überzeugend darstellt, der über die gleichen Gehirnfunktionen verfügt; ihre Stringenz ist unbeschränkt, die der Tatsachenwahrheiten aber beschränkt</span><span style=" font-weight: bold; font-size: 1.00em;">. D</span><span style=" font-size: 1.00em;">iese besteht nicht für Menschen, die nicht Beobachter waren und sich auf das Zeugnis anderer verlassen müssen, denen sie nicht unbedingt zu glauben brauchen</span><span style=" font-weight: bold; font-size: 1.00em;">. D</span><span style=" font-size: 1.00em;">as eigentliche Gegenteil der Tatsachenwahr- heit (im Unterschied zur Vernunftwahrheit) ist nicht Irrtum oder Täuschung, sondern die absichtliche Lüge.</span></p>
Book-view:
Die Wissenschaft und der Erkenntnisdrang sind hinter der unwiderlegbaren Wahrheit her, also hinter Aussagen, die Menschen einfach nicht ablehnen können - die stringent sind. Davon gibt es, wie man seit Leibniz weiß, zwei Arten: Vernunftwahrheiten und Tatsachenwahrheiten. Ihr Hauptunterschied besteht darin, wie stringent sie sind: »Die Vernunftwahrheiten sind notwendig, und ihr Gegenteil ist unmöglich; die Tatsachenwahrheiten dagegen sind zufällig, und ihr Gegenteil ist möglich.«76 Die Unterscheidung ist sehr wichtig, wenn auch vielleicht nicht in dem Sinne, den Leibniz im Auge hatte. Tatsachenwahrheiten sind trotz ihrer Zufälligkeit für jeden, der sie mit eigenen Augen beobachtet, ebenso stringent wie die Aussage, daß zwei und zwei vier ist, für jeden, der recht bei Verstände ist. Es ist nur so, daß eine Tatsache, ein Ereignis nie von allen beobachtet werden kann, die sie vielleicht kennen möchten, während sich die mathematische oder Vernunft Wahrheit jedem als völlig überzeugend darstellt, der über die gleichen Gehirnfunktionen verfügt; ihre Stringenz ist unbeschränkt, die der Tatsachenwahrheiten aber beschränkt. Diese besteht nicht für Menschen, die nicht Beobachter waren und sich auf das Zeugnis anderer verlassen müssen, denen sie nicht unbedingt zu glauben brauchen. Das eigentliche Gegenteil der Tatsachenwahr- heit (im Unterschied zur Vernunftwahrheit) ist nicht Irrtum oder Täuschung, sondern die absichtliche Lüge.

I tried in regex this:

Search:
(\«|\.|\!|\?|\))(([0-9]{1,3})|(\[[0-9]{1,3}\])).[A-ZÄÖÜ0-9]

Replace: don’t know.

to find the numbers in brackets and numbers without bracket as well.

But Sigil does’nt like it so much. After five times search, it strikes and I have to start sigel again. Thats not a good solution. Because it works on the Book-view. We need a solution for sigil, to search and replace on the source-text, thats view what sigil is made for. And here it does a good job.
famfam is offline   Reply With Quote
Old 05-06-2019, 07:29 AM   #580
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
References Problem with First Letter Bold: example 2

@Klecks
Here an example with references to endnotes. In this example the references are regular numbers in sqare brackets. (regular; I mean: not superscripted or subscripted)
Quelltext-Ansicht (Source-text view)
<p style="line-height:&lt;b&gt;1&lt;/b&gt;2pt; text-align:justify"><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">Marx und Engels waren sich schon in der »Deutschen Ideologie« darüber im klaren, daß in einer Gesellschaft des Mangels, in der die Entwicklung der Produktivkräfte niedrig ist, es bei einer Revolution »nur« zu einer Verallgemeinerung des Mangels käme: »<b>A</b>lso mit der Notdurft auch der Streit um das Notwendige wieder beginnen und die ganze alte Scheiße sich hersteilen müßte.«</span><a href="../Text/untitled_0027.html#e514" id="v514">[514]</a><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">*Welche Gründe werden weiter angegeben? <b>D</b>ie Revolutionäre Marx und Engels sind davon überzeugt, daß »nur mit dieser universellen Entwicklung der Produktivkräfte ein </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif; font-style:italic">universeller</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif"> Verkehr der Menschen gesetzt ist, daher einerseits das Phänomen der eigentumslosem Masse in allen Völkern gleichzeitig erzeugt (allgemeine Konkurrenz), jedes derselben von den Umwälzungen der anderen abhängig macht, und endlich </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif; font-style:italic">weltgeschichtliche</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">, empirisch universelle Individuen an die Stelle der lokalen gesetzt hat.«</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif; font-size:&lt;b&gt;8&lt;/b&gt;pt; vertical-align:super"><a href="../Text/untitled_0027.html#e515" id="v515">[515]</a>*</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">Was ist die Konsequenz, wenn eine solche </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif; font-style:italic">weltgeschichtliche</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif"> Stufe noch nicht erreicht ist und dennoch gesellschaftliche Sprengungen vor sich gehen? <b>S</b>ie sagen: »<b>O</b>hne dies könnte 1. der Kommunismus nur als eine Lokalität existieren, 2. die </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif; font-style:italic">Mächte</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif"> des Verkehrs selbst hätten sich als </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif; font-style:italic">universelle</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">, drum unerträgliche Mächte, nicht entwickeln können, sie wären heimisch-abergläubige &gt;Umstände&lt; geblieben, und 3. würde jede Erweiterung des Verkehrs den lokalen Kommunismus aufheben.«</span><a href="../Text/untitled_0027.html#e516" id="v516">[516]</a><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">*Die allgemeine revolutionsstrategische Einschätzung der sozialen Emanzipation heißt bei Marx-Engels: »<b>D</b>er Kommunismus ist empirisch nur als die Tat der </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif; font-style:italic">herrschenden Völker</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif"> auf &gt;einmal&lt; oder gleichzeitig möglich, was die universelle </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">Entwicklung </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">der </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">Produktivkräfte und den mit ihm zusammenhän</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">genden Weltverkehr voraussetzt.«</span><a href="../Text/untitled_0027.html#e517" id="v517">[517]</a><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">*Was desgleichen die Durchbrechung der knechtenden, der »fremden Macht«, des kapitalistischen Weltmarktes beinhaltet. <b>D</b>iese Aussagen von Marx und Engels beziehen sich auf die Produktions-Zonen, in welchen die »herrschenden Völker« dominieren, d.h. die Zonen, in welchen der westeuropäische Konkurrenzkapitalismus sich als herrschende Produktionsweise durchgesetzt hat. <b>D</b>as war und ist </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif; font-style:italic">nicht</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif"> universell geschehen. <b>I</b>m Verlauf seiner weiteren Studien ist sich Marx dessen besonders am russischen, am halbasiatischen Lehrstück bewußt geworden.</span></p>
<p style="line-height:&lt;b&gt;1&lt;/b&gt;2pt; text-align:justify; text-indent: &lt;b&gt;6&lt;/b&gt;pt"><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">Wir wissen von ihm, der die Besonderheit der sozial-ökonomischen Genesis Rußlands nie außer acht ließ, daß die </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">»wirkliche</span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif"> </span><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">Geschichte«</span><a href="../Text/untitled_0027.html#e518" id="v518">[518]</a><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">*dieses Landes darin liegt, daß der Despot des kapitalistischen Weltmarktes in den 70er Jahren des 19. Jahrhunderts, also England, vom halb-orientalischen, halb-asiatischen Despotismus Rußlands, also der zaristischen Maschine und ihren Lakaien, Fraktionen usw. als »Werkzeug«</span><a href="../Text/untitled_0027.html#e519" id="v519">[519]</a><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">*behandelt wurde: <b>U</b>m im eigenen Lande die Knechtschaftsverhältnisse aufrechterhalten zu können. <b>G</b>erade durch das Studium der agrikolen Struktur Rußlands war Marx zu der Konsequenz gekommen, daß in dieser Gesellschaft mit ihrem sich oberflächlich herausbildenden Pseudo-Kapitalismus, was später ein spezifisch asiatischer Staats-Kapitalismus wurde, die kommunistische Umwälzung möglich ist und einen besonderen Charakter trägt. <b>D</b>aß Lenin, Plechanow usw. diesen Gang für unmöglich hielten, habe ich mehrfach nachgewiesen. <b>J</b>etzt will ich aber danach fragen, wie der Leninsche Begriff der »Weltrevolution« sich in der Zeit der Machtergreifung der Bolschewiki herausbildete. <b>M</b>arx hatte die Ungleichzeitigkeit von revolutionären Wellen, die Vermittlung und Beziehung von Revolutionsprozessen in verschiedenen Produktionszügen (Westeuropa-Rußland) im Brief an Vera Sassulitsch herausgearbeitet. <b>W</b>ie geht Lenin an die Gleichzeitigkeit der Revolutionen, die durch den imperialistischen Weltkrieg hervorgerufen wurden, heran? <b>U</b>nmittelbar vor dem Aufstand, der russischen Oktoberrevolution von 1917, bestimmte Lenin das unmittelbare Revolutionsziel der Bolschewiki. <b>E</b>s gelte, so meinte er, »die Macht bis zum Sieg der sozialistischen Weltrevolution zu behaupten«.</span><a style="font-size: &lt;b&gt;1&lt;/b&gt;2pt;" href="../Text/untitled_0027.html#e520" id="v520">[520]</a></p>
Buch-Ansicht (book-view):
Marx und Engels waren sich schon in der »Deutschen Ideologie« darüber im klaren, daß in einer Gesellschaft des Mangels, in der die Entwicklung der Produktivkräfte niedrig ist, es bei einer Revolution »nur« zu einer Verallgemeinerung des Mangels käme: »Also mit der Notdurft auch der Streit um das Notwendige wieder beginnen und die ganze alte Scheiße sich hersteilen müßte.«[514] Welche Gründe werden weiter angegeben? Die Revolutionäre Marx und Engels sind davon überzeugt, daß »nur mit dieser universellen Entwicklung der Produktivkräfte ein universeller Verkehr der Menschen gesetzt ist, daher einerseits das Phänomen der eigentumslosem Masse in allen Völkern gleichzeitig erzeugt (allgemeine Konkurrenz), jedes derselben von den Umwälzungen der anderen abhängig macht, und endlich weltgeschichtliche, empirisch universelle Individuen an die Stelle der lokalen gesetzt hat.«[515] Was ist die Konsequenz, wenn eine solche weltgeschichtliche Stufe noch nicht erreicht ist und dennoch gesellschaftliche Sprengungen vor sich gehen? Sie sagen: »Ohne dies könnte 1. der Kommunismus nur als eine Lokalität existieren, 2. die Mächte des Verkehrs selbst hätten sich als universelle, drum unerträgliche Mächte, nicht entwickeln können, sie wären heimisch-abergläubige >Umstände< geblieben, und 3. würde jede Erweiterung des Verkehrs den lokalen Kommunismus aufheben.«[516] Die allgemeine revolutionsstrategische Einschätzung der sozialen Emanzipation heißt bei Marx-Engels: »Der Kommunismus ist empirisch nur als die Tat der herrschenden Völker auf >einmal< oder gleichzeitig möglich, was die universelle Entwicklung der Produktivkräfte und den mit ihm zusammenhängenden Weltverkehr voraussetzt.«[517] Was desgleichen die Durchbrechung der knechtenden, der »fremden Macht«, des kapitalistischen Weltmarktes beinhaltet. Diese Aussagen von Marx und Engels beziehen sich auf die Produktions-Zonen, in welchen die »herrschenden Völker« dominieren, d.h. die Zonen, in welchen der westeuropäische Konkurrenzkapitalismus sich als herrschende Produktionsweise durchgesetzt hat. Das war und ist nicht universell geschehen. Im Verlauf seiner weiteren Studien ist sich Marx dessen besonders am russischen, am halbasiatischen Lehrstück bewußt geworden.
Wir wissen von ihm, der die Besonderheit der sozial-ökonomischen Genesis Rußlands nie außer acht ließ, daß die »wirkliche Geschichte«[518] dieses Landes darin liegt, daß der Despot des kapitalistischen Weltmarktes in den 70er Jahren des 19. Jahrhunderts, also England, vom halb-orientalischen, halb-asiatischen Despotismus Rußlands, also der zaristischen Maschine und ihren Lakaien, Fraktionen usw. als »Werkzeug«[519] behandelt wurde: Um im eigenen Lande die Knechtschaftsverhältnisse aufrechterhalten zu können. Gerade durch das Studium der agrikolen Struktur Rußlands war Marx zu der Konsequenz gekommen, daß in dieser Gesellschaft mit ihrem sich oberflächlich herausbildenden Pseudo-Kapitalismus, was später ein spezifisch asiatischer Staats-Kapitalismus wurde, die kommunistische Umwälzung möglich ist und einen besonderen Charakter trägt. Daß Lenin, Plechanow usw. diesen Gang für unmöglich hielten, habe ich mehrfach nachgewiesen. Jetzt will ich aber danach fragen, wie der Leninsche Begriff der »Weltrevolution« sich in der Zeit der Machtergreifung der Bolschewiki herausbildete. Marx hatte die Ungleichzeitigkeit von revolutionären Wellen, die Vermittlung und Beziehung von Revolutionsprozessen in verschiedenen Produktionszügen (Westeuropa-Rußland) im Brief an Vera Sassulitsch herausgearbeitet. Wie geht Lenin an die Gleichzeitigkeit der Revolutionen, die durch den imperialistischen Weltkrieg hervorgerufen wurden, heran? Unmittelbar vor dem Aufstand, der russischen Oktoberrevolution von 1917, bestimmte Lenin das unmittelbare Revolutionsziel der Bolschewiki. Es gelte, so meinte er, »die Macht bis zum Sieg der sozialistischen Weltrevolution zu behaupten«.[520]
famfam is offline   Reply With Quote
Old 05-07-2019, 01:27 PM   #581
Klecks
Enthusiast
Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.Klecks never is beset by a damp, drizzly November in his or her soul.
 
Klecks's Avatar
 
Posts: 39
Karma: 59154
Join Date: May 2010
Location: Stuttgart, Germany
Device: Kobo H2O, PocketBook Touch HD, Tolino Vision 4
Hey famfam,

you can't catch all possible variants of styling in one regex.

First you should try to get rid of all the inline-styling. Either that or leave out the colon from the search-expression:
Code:
(?<!St|Mr|Mrs|Dr|<|\d)(<p[^>]*>\s*|\!|\?|\.|…)( ?|\s*</?[^b|^>]*>\s*?)(»|«|“|”|„)?( ?|\s*</?[^>]*>\s*?)(?<!<b>)([A-ZÖÄÜ])
Otherwise the regex can break things as your example shows:

Code:
<p style="line-height:&lt;b&gt;1&lt;/b&gt;2pt; text-align:justify"><span style="font-family:&lt;b&gt;C&lt;/b&gt;alibri, sans-serif">
is broken. It should be:
Code:
<p style="line-height:12pt; text-align:justify"><span style="font-family:Calibri, sans-serif">
For catching the first letter of a sentence, following the footnote/endnote, given in your example, you need an extra Regex.
Try:
Search for:
Code:
(<p[^>]*>\s*|\!|\?|\.|…)(»|«|“|”|„)?((?:\s*</?[^>]*>\s*)*)(\[?\d+\]?)((?:</?[^>]*>)*)(\*)?((?:\s*</?[^>]*>\s*)*)(?<!<b>)([A-ZÖÄÜ])
Replace with:
Code:
\1\2\3\4\5\6\7<b>\8</b>
But in the next book the styling could be completely different ... and then the Regex has to be adjusted.



Good luck.
Klecks.
Klecks is offline   Reply With Quote
Old 07-11-2019, 01:11 PM   #582
1v4n0
Groupie
1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.
 
Posts: 171
Karma: 40000
Join Date: Oct 2013
Device: kindle
How do I search for all instances of "period space uppercase letter which is not a D"?
Would this work?
Code:
\. ([A-Z]^D)
1v4n0 is offline   Reply With Quote
Old 07-11-2019, 01:46 PM   #583
PenguinCEO
Member Retired
PenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipedia
 
Posts: 61
Karma: 47166
Join Date: Sep 2018
Device: a lot
故事主要描述當伐木

Last edited by PenguinCEO; 04-16-2020 at 12:27 PM.
PenguinCEO is offline   Reply With Quote
Old 07-11-2019, 02:34 PM   #584
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
9 times out of ten, @PenguinCEO's answer will work as good as any--provided only english-standard ascii letters are being used. But if there's any special accented uppercase characters that would fit the bill (or special unicode space characters after the period) it won't work.

Some flavors of regex offer "character class subtraction" but the PCRE regex that Sigil uses does not. The regex module included with its bundled Python for plugins, however, does. I won't get into the syntax needed to accomplish character class subtraction for the various regex engines, but I will mention that negative lookaheads can be used to achieve the same thing in all flavors of regex.

So in this specific case, if one wanted to match any unicode uppercase letter (\p{Lu}) except the letter D ((?!D)) following a period (\.) and any unicode space character (\p{Zs}). You could use something like the following:

Code:
\.\p{Zs}(?!D)\p{Lu}
It would work for all the following cases (even if the spaces in question were special non-breaking space characters or narrow-non-breaking space characters)

Code:
. Ö

. G

. F

. Ê
Too much, I know, but I couldn't help myself.

Using @PenguinCEO's much simpler solution, the negative lookahead workaround for character class subtraction would look something like like:
Code:
\. (?!D)[A-Z]

Last edited by DiapDealer; 07-11-2019 at 05:49 PM.
DiapDealer is offline   Reply With Quote
Old 07-19-2019, 03:49 PM   #585
Vroni
Banned
Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'
 
Posts: 168
Karma: 10010
Join Date: Oct 2018
Device: Tolino/PRS 650/Tablet
more then 9 groups

Hi,

i've a rather long regex having more then 9 groups. How do i refer to group number 10?

\10 will refer to group 1 and add a zero

vroni
Vroni is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:02 AM.


MobileRead.com is a privately owned, operated and funded community.