Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-19-2022, 05:18 PM   #736
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,773
Karma: 146617620
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by CubGeek View Post
So, if my learning how to properly show varying types of emphasis to help convey nuances for someone who's relying on a screen-reader or similar (on the very infinitesimal chance they access something that I put together) then it was time well-spent.


Sounds very much like why I now pay attention to accessibility features. It takes me very little time and may make life more enjoyable for those who are not able to read text for whatever reason.
DNSB is offline   Reply With Quote
Old 08-19-2022, 07:23 PM   #737
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by CubGeek View Post
So, if my learning how to properly show varying types of emphasis to help convey nuances for someone who's relying on a screen-reader or similar (on the very infinitesimal chance they access something that I put together) then it was time well-spent.
Fantastic.

You may also be very interested in the DAISY Consortium (they're one of the reasons why EPUB exists!).

I highly recommend checking out their Youtube channel where they have lots of webinars explaining:

Quote:
Originally Posted by DNSB View Post
Sounds very much like why I now pay attention to accessibility features. It takes me very little time and may make life more enjoyable for those who are not able to read text for whatever reason.


Well, most of the enhancements take very little time + add big benefits right away.

Many take up extra labor for smaller benefit, but better/faster workflows are coming out all the time.

And on the benefits front, new programs/tools are coming out all the time, taking advantage of those enhancements. (So if you baked it into your ebook already, you instantly get the extras! )

For more on that, see my posts from last month:

Quote:
Originally Posted by CubGeek View Post
Having spent 5 years working for a boss who was blind and who used a screen-reader, I hope that I now have a better empathy for the difficulties she encountered than before my time there. Not only with official communications, but with webpage navigation, with poorly-implemented accessibility "functions," and also with the simple pleasure of "reading" a book over her lunch break.
Fantastic.

I haven't had the pleasure of meeting a blind person yet (in-person), but I love digitizing all this stuff and writing about Accessibility.

If you want to find my 300+ posts about it, type this in your favorite search engine:

Code:
Accessibility Tex2002ans site:mobileread.com
Tex2002ans is offline   Reply With Quote
Advert
Old 03-01-2023, 11:16 AM   #738
CubGeek
Connoisseur
CubGeek began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Sep 2021
Location: Upstate NY, USA
Device: iPad Pro, Kindle basic
Quote:
Originally Posted by Tex2002ans View Post
Quote:
Originally Posted by CubGeek View Post
Oh, that's much simpler. Thank you! Since the stuff I'm working on has a combination of <i> for "internal monologue," and "named things" as well as <em> for word emphasis, this certainly has been a learning experience!

And I don't know if you caught this topic:

where I explained differences between <i> + <em> even further.
I'm replying here since this is where the conversation happened at the time, but if this makes more sense in that linked topic, lemme know and I'll delete and post it there.

I've run into a condundrum. The author of my current project has several characters who use an "internal monologue," so I've been using the <i> tag for those. For words that need emphasis it's the <em> tag. Simple so far.

However, the author also has words in the internal monologue that need emphasizing... For just visuals I'd take the emphasized word out of the <i> tags and restart the <i> tag after the word:

Quote:
Well, Dylan thought to himself, the very least they could do is drop the price of gas a bit.

However, if I use the <em> tag for emphasizing the word "least" to ensure that accessibility programs can convey the correct tone/meaning/nuance, the tag italicizes the visual:

Quote:
Well, Dylan thought to himself, the very least they could do is drop the price of gas a bit.
So, while the accessibility is correct, sighted readers may not have the emphasis conveyed visually.

Would nested <i> and <em> tags like this this be a case for the <strong> tag, instead? That way the sighted readers still get the emphasis (via boldface text) and accessibility readers can convey the audio emphasis?

Quote:
Code:
<i>Well</i>, Dylan thought to himself, <i>the very <strong>least</strong> they could do is drop the price of gas a bit</i>.
Well, Dylan thought to himself, the very least they could do is drop the price of gas a bit.
CubGeek is offline   Reply With Quote
Old 03-01-2023, 12:15 PM   #739
isarl
Addict
isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.
 
Posts: 287
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
Quote:
Originally Posted by CubGeek View Post
Would nested <i> and <em> tags like this this be a case for the <strong> tag, instead? That way the sighted readers still get the emphasis (via boldface text) and accessibility readers can convey the audio emphasis?
You are conflating semantics and style. If the meaning of the tag is that its contents are emphasized, then you use <em></em>.

What you can do is add a style rule in your CSS, like:

Code:
i em {
    font-style: normal;
}
This preserves the semantic meaning of the tags while allowing you to control the presentation/style.
isarl is offline   Reply With Quote
Old 03-01-2023, 12:18 PM   #740
CubGeek
Connoisseur
CubGeek began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Sep 2021
Location: Upstate NY, USA
Device: iPad Pro, Kindle basic
Thank you! I appreciate it!
CubGeek is offline   Reply With Quote
Advert
Old 03-01-2023, 12:48 PM   #741
isarl
Addict
isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.
 
Posts: 287
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
Quote:
Originally Posted by CubGeek View Post
Thank you! I appreciate it!
Happy styling and reading!
isarl is offline   Reply With Quote
Old 03-01-2023, 01:48 PM   #742
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by CubGeek View Post
I'm replying here since this is where the conversation happened at the time, but if this makes more sense in that linked topic, lemme know and I'll delete and post it there.
You can always create a separate thread, then reference the original topic/posts.

(This specific thread is mostly for Regex help.)

Quote:
Originally Posted by CubGeek View Post
I've run into a condundrum. The author of my current project has several characters who use an "internal monologue," so I've been using the <i> tag for those. For words that need emphasis it's the <em> tag. Simple so far.

However, the author also has words in the internal monologue that need emphasizing... For just visuals I'd take the emphasized word out of the <i> tags and restart the <i> tag after the word:
I agree with isarl's solution completely.

Italics-within-italics or emphasis-within-emphasis is like an ON/OFF switch. You just flip it to its opposite:

Code:
i i {
        font-style: normal;
}

em em {
        font-style: normal;
}

i em {
        font-style: normal;
}
- - -

The first one says:

"IF there's an italics inside an italics... make it normal."

Example:

Code:
<i class="monologue">That damn ship, the <i>USS Liberty</i>, was like a spooky ghost ship.<i>
Usually, ship names would be in italics... but since it's buried in a thought, the ship will become roman/normal/un-italic temporarily to distinguish it from the surrounding text.

Similar situation with the other 2 CSS rules.
Tex2002ans is offline   Reply With Quote
Old 05-30-2023, 01:14 PM   #743
Skydancer
Enthusiast
Skydancer began at the beginning.
 
Skydancer's Avatar
 
Posts: 30
Karma: 10
Join Date: Mar 2019
Location: Slovenia
Device: PocketBoot Inkpad 3
Greetings,
I would really appreciate all the help I can get on this problem. I have a lot of texts similar to the the example below that I need to edit from this:
Code:
བསོད་ནམས་འདི་ཡིས་ཐམས་ཅད་གཟིགས་པ་ཉིད། །

sö-nam di-ji tam-če zig-pa-nji

Z močjo teh vrlin naj dosežem vsevednost,

ཐོབ་ནས་ཉེས་པའི་དགྲ་རྣམས་ཕམ་བྱས་ནས། །

tob-ne nje-pe dra-nam pam-dže-ne

naj premagam sovražnike – negativna dejanja –
... into this:
Code:
བསོད་ནམས་འདི་ཡིས་ཐམས་ཅད་གཟིགས་པ་ཉིད། །  
sö-nam di-ji tam-če zig-pa-nji  
    Z močjo teh vrlin naj dosežem vsevednost,

ཐོབ་ནས་ཉེས་པའི་དགྲ་རྣམས་ཕམ་བྱས་ནས། །  
tob-ne nje-pe dra-nam pam-dže-ne  
    naj premagam sovražnike – negativna dejanja –
Each line has to end with a double space (see the example I provided), except the last line of each paragraph.

I need the text to be in plain text format, not in (x)HTML and CSS.
Skydancer is offline   Reply With Quote
Old 10-06-2023, 10:54 AM   #744
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,027
Karma: 11123121
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Maybe it's a beginner's request, but anyway...
My text has lots of <h1>...</h1> tags, followed by subtitles, only that they are tagged by <p> tags. I would like to maintain the <h1> headers and the following paragraph changed to <h2>, like this:
Code:
<h1>text, text</h1>
<p>text, text</p>
should move to:
Code:
<h1>text, text</h1>
<h2>text, text</h2>
The following regular paragraphs should remain untouched.
I tried:
Code:
(/h1>)\n^(\<p\>)(.*?)(\</p\>)$
but this returns the </h1> until the last occurrence of </p> in the whole section. I'm sure that there is a quite simple solution, but I can't find it.
Leonatus is offline   Reply With Quote
Old 10-06-2023, 11:14 AM   #745
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
Try checking the "Minimal Match" in Regex Options.

Also if the subtitle paragraph never has nested tags you can change things to look for anything but a tag begin. Then you will not need to check Minimal Match (greediness control)

Effectively all characters not a < and as many as you want to be followed by ending p tag

[^<]*</p>

Last edited by KevinH; 10-06-2023 at 03:06 PM.
KevinH is offline   Reply With Quote
Old 10-07-2023, 04:18 AM   #746
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,027
Karma: 11123121
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Minimal Match is checked.
As to the rest, sincerely, I do not quite understand what I have to do.
Leonatus is offline   Reply With Quote
Old 10-07-2023, 07:33 AM   #747
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,119
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
‘Greediness’ refers to how much of the string to be searched gets matched.

If you say you want </h1>(.*)</p> it would capture EVERYTHING from the end of the </h1> to the LAST </p> in your file …. very greedy.

You can specify a minimal capture that would only capture up to the FIRST occurrence of </p>. There are a couple ways of doing that: clicking minimal match like KevinH mentioned, my favorite is to add a question mark to the capture group. </h1>(.*?)</p>

If you want a minimal capture of the first line (paragraph) after your heading you could try this:
Code:
Find: </h1>\s*<p.*?>(.*?)</p>
Replace: </h1>\n<h2>\1</h2>
That looks for the closing header tag followed by any amount of white space followed by an opening paragraph tag with anything in it (classes, styles, etc.) then it captures anything within that paragraph up to the first paragraph closing tag. It then replaces all of that with the closing header tag, and it inserts what it captured, using the \1, into a new heading (level 2) tag.
Turtle91 is offline   Reply With Quote
Old 10-07-2023, 10:37 AM   #748
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,027
Karma: 11123121
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
I knew about the "greediness" you mentioned, and I was desperately looking for a method to make it "lazy", but I didn't find it. Well, thank you for your clarifying, that works!
Leonatus is offline   Reply With Quote
Old 10-07-2023, 11:35 AM   #749
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
But checking "Minimal Match" did not help? They should do the same thing except the ? approach can give you more fined grained control.
KevinH is offline   Reply With Quote
Old 10-07-2023, 04:19 PM   #750
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,027
Karma: 11123121
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
I cannot say any more. The "Minimal Match" was checked from the beginning. But it didn't help.
Leonatus 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:53 PM.


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