Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 08-12-2021, 04:19 PM   #1
fdwojo
Member
fdwojo began at the beginning.
 
fdwojo's Avatar
 
Posts: 23
Karma: 10
Join Date: Jun 2012
Device: Samsung Note20 Ultra, Kindle Fire HD10
Question Why, Sigil, Why? And can I change you?

Does anyone know why Sigil uses <b> for bold/strong and <i> for italics/emphasis?

<b> is identical to <strong> and <i> is identical to <em>, and everything I read indicates that <strong> and <em> are the preferred way to do it. And so, I try to be consistent with the recommended way.

Why does Sigil do it the older, original way? Or are all the HTML publishing guides wrong and we should use <b> and <i> instead of the longer variants? (and if it DOESN"T matter, why are all the style guides wrong?)

And lastly, if I wanted to, can I modify Sigil to use <strong> and <em> when I bold or italicize text?

P.S. Granted, with all the posts here on the forum, I suppose it's possible to look through them all, or search them all, but I didn't find anything addressing this issue. (Sorry if I missed an existing question about this!)

Frank
~~~~~~~~~~~~~~~~~~~~~~~~
Using Win10 Pro and Samsung Note20

Last edited by fdwojo; 08-13-2021 at 02:53 PM.
fdwojo is offline  
Old 08-12-2021, 04:45 PM   #2
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: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
Semantic meaning is what differentiates when to use one or the other of them and it has waffled back and forth repeatedly given changes in the living html spec. Some tags like u have even gone away and then brought back.

Quote:
(From the Mozilla Development Network)
It is often confusing to new developers why there are so many ways to express the same thing on a rendered website. <b> and <strong> are perhaps one of the most common sources of confusion, causing developers to ask "Should I use <b> or <strong>? Don't they both do the same thing?"

Not exactly. The <strong> element is for content that is of greater importance, while the <b> element is used to draw attention to text without indicating that it's more important.

It may help to realize that both are valid and semantic elements in HTML5 and that it's a coincidence that they both have the same default styling (boldface) in most browsers (although some older browsers actually underline <strong>). Each element is meant to be used in certain types of scenarios...
Since Sigil can not guess what semantic you want it defaults to the more generic tags.
Sigil will not be changing the tags based on current "fashion" once again.

You can do either of:

- Use Find and replace to swap those tags to anything you want

- Set up Clips to create the tags you prefer and assign them to clip icons so they can used just as easily as italic and bold icons now.

Last edited by KevinH; 08-12-2021 at 06:36 PM.
KevinH is online now  
Advert
Old 08-12-2021, 04:46 PM   #3
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: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Why, oh why, do people who don't want to bother writing their own html code get so overly dramatic about the way valid html code gets generated for them?

And to answer your second question: of course you can change it. You're welcome to write your own html with whatever tags you prefer.

Last edited by DiapDealer; 08-12-2021 at 04:49 PM.
DiapDealer is online now  
Old 08-12-2021, 07:36 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,056
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Because we are the Dog being wagged by the HTML spec writers?

How about all the render engines that choose to ignore one way or another? Why o Why
theducks is offline  
Old 08-12-2021, 07:57 PM   #5
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: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
All browser based versions handle both so what render engine/e-reader requires strong and does not recognize b?
KevinH is online now  
Advert
Old 08-12-2021, 08:31 PM   #6
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,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by fdwojo View Post
Does anyone know why Sigil uses <b> for bold/strong and <i> for italics/emphasis?

<b> is identical to <strong> and <i> is identical to <em>, and everything I read indicates that <strong> and <em> are the preferred way to do it. And so, I try to be consistent with the recommended way.

Why does Sigil do it the older, original way? Or are all the HTML publishing guides wrong and we should use <b> and <i> instead of the longer variants? (and if it DOESN"T matter, why are all the style guides wrong?)
Do I have the topic for you:

2020: "<i>, <em> or <span> for italics ?"

Especially see my Posts #67+.

<i> vs. <em> + <strong> vs. <b> was discussed to death, with detailed examples.

Quote:
Originally Posted by fdwojo View Post
And lastly, if I wanted to, can I modify Sigil to use <strong> and <em> when I bold or italicize text?
You can easily swap between <span class="italics">/<i>/<em> + <b>/<strong> using Diap's "TagMechanic" Sigil plugin (or "Diap's Editing Toolbag" if Calibre).

Again, see 2020: "How do I change italic <i> shortcut to use <em> instead?" where I give instructions how.
Tex2002ans is offline  
Old 08-13-2021, 02:34 PM   #7
fdwojo
Member
fdwojo began at the beginning.
 
fdwojo's Avatar
 
Posts: 23
Karma: 10
Join Date: Jun 2012
Device: Samsung Note20 Ultra, Kindle Fire HD10
Well, I thank you all for the quick response. Because I create my own eBooks, I want them to be as compatible and consistent as possible. (as if that's even possible). For that reason, (as I mentioned before), since I keep hearing about using <em> instead of <i> and <strong> instead of <b>, I had (mistakenly) thought that SIGIL would go with what was the presumed standard (if it really even is a standard).

With regards to "can I change it", I was referring to the way that SIGIL responds when you choose to BOLD, ITALICS, or UNDERLINE with just a click of the mouse or a keypress of CTRL-B or CTRL-I or CTRL-U. Granted, if I was a programmer I'm sure I could edit the source code, and generate my own custom version of SIGIL, but sadly, I can't and I'm guessing the source code isn't available even if I could.

So, I'll keep using SIGIL as I have been, (and wishing...)

Again, thank you all for your help!

;-)

Frank
~~~~~~~~~~~~~~~~~~~~~~~~
Using Win10 Pro and Samsung Note20

Last edited by fdwojo; 08-13-2021 at 02:53 PM.
fdwojo is offline  
Old 08-13-2021, 03:18 PM   #8
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: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
Or do as I said and create an "em" and "strong" clips, view the clips toolbar and highlight what you want have one click set them.

Try reading the clips.xhtml chapter of the latest Sigil User Guide which will show you how to create them.

Last edited by KevinH; 08-13-2021 at 03:22 PM.
KevinH is online now  
Old 08-13-2021, 04:26 PM   #9
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,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by fdwojo View Post
With regards to "can I change it", I was referring to the way that SIGIL responds when you choose to BOLD, ITALICS, or UNDERLINE with just a click of the mouse or a keypress of CTRL-B or CTRL-I or CTRL-U. Granted, if I was a programmer I'm sure I could edit the source code, and generate my own custom version of SIGIL, but sadly, I can't and I'm guessing the source code isn't available even if I could.
As KevinH has already mentioned, you could easily change the behavior of CTRL+B and CTRL+I by creating two clips. This'll take less than 5 minutes.

1. Right-click the toolbar and check Clip Bar, if it isn't already checked.
2. In the Clip Editor, create two clips with the following contents
<strong>\1</strong>
<em>\1</em>

(They must be the first two clips.)



3. Change the keyboard shortcuts for clips 1 & 2 to CTRL+B and CTRL+I

Doitsu is offline  
Old 08-13-2021, 05:01 PM   #10
Sarmat89
Fanatic
Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.
 
Posts: 518
Karma: 2268308
Join Date: Nov 2015
Device: none
<em> is a logical tag, so it can be used with foreign scripts to make text bold, or smaller, or add a line or accent dots.
Sarmat89 is offline  
Old 08-15-2021, 05:41 PM   #11
fdwojo
Member
fdwojo began at the beginning.
 
fdwojo's Avatar
 
Posts: 23
Karma: 10
Join Date: Jun 2012
Device: Samsung Note20 Ultra, Kindle Fire HD10
Thanks, Doitsu. I've used Clips the older way (right-click, choose CLIPS, and choose my desired Clip), but I wasn't aware you could associate them with a hotkey. That might do the trick for me.

Perfect answer!
fdwojo is offline  
Old 08-16-2021, 01:55 AM   #12
Binchen
Connoisseur
Binchen began at the beginning.
 
Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
<em> and <i> is something completly different. <i> sets the fontstyle to italic. <em> is emphasized is a semantic thing. Most browserstylesheet are displaying the emphasized text in italics, but thats just a usual representation.
<em> is neither better. nor more modern, nor more compatible than <i>. Exactly the same with <b> and <strong>.
Binchen is offline  
Old 08-16-2021, 07:26 AM   #13
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,351
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Binchen View Post
<em> and <i> is something completly different. <i> sets the fontstyle to italic. <em> is emphasized is a semantic thing. Most browserstylesheet are displaying the emphasized text in italics, but thats just a usual representation.
<em> is neither better. nor more modern, nor more compatible than <i>. Exactly the same with <b> and <strong>.
True - as the thread linked by Tex mentions, there are many reasons why you might want <em> instead of <i>. Aside from the visual styling, because you can use identical css with either tag to make the look the same, the <em> is used by accessibility programs to treat the word/phrase differently - eg. different stress on a word in tts.

So… if you only need a visual italic (like in a list of references) then <i> works fine. But if it is supposed to mean something then you want the semantically correct <em>.
Turtle91 is online now  
Old 08-17-2021, 11:55 AM   #14
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by Sarmat89 View Post
<em> is a logical tag, so it can be used with foreign scripts to make text bold, or smaller, or add a line or accent dots.
<em> is no more “logical” than <i>.
You can redefine either or both to be expressed however you like in css.
Anyway, I don’t see <i> or <b> not working anytime soon, so I will keep using them. One of the first things I do when I check over a book is convert em and strong to i and b. I hate longwinded code that clutters up text. The same reason we use figures to do maths and not words. Simpler notation makes for more clarity.

When I use <i> it’s because I want italics. So <i>is more logical for me. If someone wants to convert that to flashing green or whatever, that’s fine. They can add a line to the css.
AlanHK is offline  
Old 08-17-2021, 12:20 PM   #15
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,351
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Sorry, I thought I had linked to the Accessibility Publishing Database website in my previous post. Here it is for anyone who cares.

They have a nice explanation on what the differences are between i/b/em/strong and when each should be used...they also talk about the html5 specs briefly.

Quote:
The CSS properties for bolding and italics should be used whenever the use of bolding and italics is presentational (for example, on headings and lead-in words). CSS formatting carries no semantics, so the emphasis will not be noted by assistive technologies.
(emphasis added)
Turtle91 is online now  
Closed Thread

Tags
editing, format text


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating e-pub with Sigil, cannot change font in Sony PRS-T2 The_Bookworm Sigil 4 03-24-2020 08:46 PM
Automatic change of coded HTML Entities into special chars in Sigil 0.9.9 upon saving Barto Sigil 20 12-01-2018 05:56 AM
How to change the Sigil Images folder name to images davidspring Sigil 29 02-12-2018 05:00 AM
how to change Sigil's heading Echeban Sigil 4 10-30-2015 02:52 PM
font change sigil to mobi with kindlegen wyatt650 Sigil 4 09-05-2013 10:49 AM


All times are GMT -4. The time now is 05:24 PM.


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