Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-14-2020, 10:13 AM   #61
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Sarmat89 View Post
The default style for headings includes some unwanted properties which you had to explicitly disable, making CSS more complex than necessary.
Defaults for <p> and <div> don't work. So you'd need CSS in either case. What is it you have against CSS? Is it that you've chosen to use one of the many Android apps that don;t respect the CSS?
JSWolf is offline   Reply With Quote
Old 06-14-2020, 02:04 PM   #62
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Sarmat89 View Post
I asked a simple question: in my example, which text should be deemed worthy of the h# block element, and which just p; and more importantly, why?
Yes, but you're asking the bookmaker a question about a book that s/he can't answer, because it's not simply X. If you're asking me, if the graphic page element (heading) has a chapter number, a chapter title and an epigram, for example, then clearly, you'd choose the most-informative element--the chapter title, rather than the number and the epigram is obviously NOT the heading.

Quote:
The default style for headings includes some unwanted properties which you had to explicitly disable, making CSS more complex than necessary.
I'm sorry, what "default styling" and unwanted properties are you talking about? From what to what? From what app or program, to what, Sigil? With an example, please.

Hitch
Hitch is offline   Reply With Quote
Advert
Old 06-14-2020, 04:06 PM   #63
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,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
For Sarmat89 to complain that the default <h?> styling is not to their liking and requires too complex CSS to make it look right, while ignoring the fact that the same CSS would be required for a <div> or <p> is, well, rather ludicrous.

Methinks Sarmat89 is arguing just for the sake of argument, rather than looking at the issue from a logical standpoint. If that is not the case, then Sarmat89 is woefully under-educated about the purposes and uses of CSS. I can't see anyone with a basic knowledge of CSS thinking that this is too complex:

Spoiler:
Code:
body {font-size:100%; margin:0; padding:0; font-weight:normal}
p    {text-indent:1.2em; margin:0; line-height:1}

/* Headers */
h1, h2, h3 {
   display:block; 
   text-align:center; 
   text-indent:0; 
   margin:1em 0; 
   page-break-after:avoid; 
   font-style:normal; 
   font-weight:bold; 
   font-family:serif}

h1 {font-size:1.7em}
h2 {font-size:1.4em}
h3 {font-size:1.4em; font-variant:small-caps}

div {
   margin:2em;
   text-indent:0}
Turtle91 is offline   Reply With Quote
Old 06-15-2020, 02:41 PM   #64
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Turtle91 View Post
For Sarmat89 to complain that the default <h?> styling is not to their liking and requires too complex CSS to make it look right, while ignoring the fact that the same CSS would be required for a <div> or <p> is, well, rather ludicrous.

Methinks Sarmat89 is arguing just for the sake of argument, rather than looking at the issue from a logical standpoint. If that is not the case, then Sarmat89 is woefully under-educated about the purposes and uses of CSS. I can't see anyone with a basic knowledge of CSS thinking that this is too complex:

Spoiler:
Code:
body {font-size:100%; margin:0; padding:0; font-weight:normal}
p    {text-indent:1.2em; margin:0; line-height:1}

/* Headers */
h1, h2, h3 {
   display:block; 
   text-align:center; 
   text-indent:0; 
   margin:1em 0; 
   page-break-after:avoid; 
   font-style:normal; 
   font-weight:bold; 
   font-family:serif}

h1 {font-size:1.7em}
h2 {font-size:1.4em}
h3 {font-size:1.4em; font-variant:small-caps}

div {
   margin:2em;
   text-indent:0}
That CSS does look a bit overly complicated with excess lines.

Code:
body {
  widows: 1;
  orphans: 1;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  text-align: justify;
}
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}
h1, h2, h3 {
  font-family: sans-serif;
  text-align: center;
  text-indent: 0;
  margin: 1em 0;
  font-weight: bold;
}
h1 {
  font-size: 1.7em;
}
h2 {
  font-size: 1.4em;
}
h3 {
  font-size: 1.12em;
}
div {
  margin: 2em;
  text-indent: 0;
}
The <div> at a margin of 2em makes no sense. I had to fix <h3> as the font-varient doesn't work in all cases so you need to set a font size for small caps.

As for the margins, I dislike the margins shorthand. I much prefer the long form and if I recall correctly, some nooks don't like the margins shorthand. Also, CSS all on one line is no as easy to read.
JSWolf is offline   Reply With Quote
Old 06-15-2020, 04:29 PM   #65
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by Turtle91 View Post
...
I'm guessing that what Sarmat89 is talking about is chapters where there's heading stuff besides just the chapter title and/or chapter number. For example, Scott's Ivanhoe where there's a poem after the chapter number.



I'd like to see how he formats one of those chapters, with both his html and css.
hobnail is offline   Reply With Quote
Advert
Old 06-15-2020, 04:42 PM   #66
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,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
That CSS does look a bit overly complicated with excess lines.

Code:
mine looks better
The <div> at a margin of 2em makes no sense. I had to fix <h3> as the font-varient doesn't work in all cases so you need to set a font size for small caps.

As for the margins, I dislike the margins shorthand. I much prefer the long form and if I recall correctly, some nooks don't like the margins shorthand. Also, CSS all on one line is no as easy to read.

Yes, we are aware that you think your design opinions are the end-all rule for everything. Just remember that opinions are like...

The <div> margin of 2em makes sense if you want a 2em margin around your divs.

font-varient will never work...it's spelled font-variant - that's very sloppy coding by the way . font-variant works in all cases that I use...so...you just choosing not to use a modern, cabable, device is your choice.

Ditto for short-hand margins. So sorry you choose to use a device that has issues...

CSS all on one line is easy enough to read...or do you have problems reading?

You see, Jon, this asinine behavior of yours picking apart other peoples code because you don't agree with their technique is very childish....especially when the code is put up for illustrative purposes and NOT meant to be copy/pasted without a basic idea of what CSS is or how to use it.


Grow up.
Turtle91 is offline   Reply With Quote
Old 06-18-2020, 07:11 PM   #67
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 coneheadZombie View Post
I often see ebooks with all three of the mentioned mode to italicize text in ebooks.

Is there no standard way to do this or can we use any of these modes ?
Long story short:

Don't use <span class="italics">. Stick with proper <i> or <em> throughout (or mix of both):

Code:
<p>In <i>Book Title</i>, the character screamed: “Not in <em>my</em> neighborhood!”</p>
For technical details, reasoning, and examples, see my Post #43 in "Extended <head> chapter: NOT necessary?", plus the surrounding discussion by other users (my Post #52 also gave nuances between <i> and <em>).

This was all "settled" and discussed to death back in that 2017 thread.

Side Note: And if you want to easily flip between <i> <-> <em>, or change all <span class="italics"> -> <i>, then you can follow the instructions I posted for DiapDealer's fantastic TagMechanic plugin.

Last edited by Tex2002ans; 06-18-2020 at 07:51 PM.
Tex2002ans is offline   Reply With Quote
Old 06-20-2020, 05:02 AM   #68
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Tex2002ans View Post
Long story short:

Don't use <span class="italics">. Stick with proper <i> or <em> throughout (or mix of both):
If all you are doing it italicizing, why would you mix <i> and <em>? For that matter, why use <em>? I would just go with <i>. Two reasons for <i>. Less code and all programs to display the eBook should know exactly what's meant by <i>.
JSWolf is offline   Reply With Quote
Old 06-20-2020, 06:51 AM   #69
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Because even though <em> and <i> may look the same when rendered as text, they have different semantics and may be interpreted differently, for example, by a text-to-speech system.
Jellby is offline   Reply With Quote
Old 06-20-2020, 08:07 AM   #70
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,158
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by Jellby View Post
Because even though <em> and <i> may look the same when rendered as text, they have different semantics and may be interpreted differently, for example, by a text-to-speech system.
Yes, that is the official and logical explanation. I've yet to find ANYTHING that does treat them differently, unless there is specific CSS added by ebook "publisher" or webpage designer. Nor do I know how to create an <em> in source text other than editing HTML directly.

I've created audiobooks (even 30 years ago on cassette). Obviously being a human and then using printed material the source would only have normal, bold, italic, bold italic, all caps and occasionally smaller text (as well as a whisper speech tag). You'd decide from context, not the print style, if you needed to talk faster, slower, louder, softer, whisper, shout, raise pitch, speak with flat intonation, rise pitch at the end of a sentence, speak excitedly. The —, …, ! or ? at the end of dialogue or the speech tag or tag action would be more of a guide than print style.

Computer software is rubbish at context. I've not heard text to speech improve much in thirty five years, it does sound a bit more human. But compared to even an inexperienced human it's rubbish.

So I'm sceptical. I suspect the <em> is something some HTML guru thought up and it's not really important. How would I decide to use <i> or <em>. The italics in printed works, like the comma or quotes, is overloaded with different uses. It might be used for a title, product name, section of verse, indication of a handwritten letter, emphasis (not common), character's thoughts or actual telepathy. We also have the Bang (Exclamation mark or Shriek) for a certain kind of emphasis as well as the Query, which is not always a straight question, could be followed by 'she exclaimed'. The Interobang never caught on.
Using italics for actual semantic emphasis is rare.
The double quote and single quote in straight versions come from the typewriter.
Different languages even have differing conventions for these things and for indicating dialogue, quotes, meta-usage (the '*' can be a wild card is using ' to indicate meta), titles etc.

So being lazy and not wishing to edit HTML at all (though I used to for websites) or edit CSS, I can't find a use for <em>. Perhaps there is some style in my wordprocessor that generates the <em> in HTML+CSS conversion, but I don't know it. Normal, Bold, Italic, Bold Italic, styled indents, kinds of justification, inter-paragraph spacing, superscript, subscript, etc all automatically generate the expected HTML.

All four common dashes (hyphen, minus, en and em) and the non-breaking space can be typed easily in the wordprocessor and show up differently (the minus and hyphen do look similar and I never use the minus as I only edit fiction). The non-binding space is typed by Shft-Cnrl-space and is shown as greyed space.

Last edited by Quoth; 06-20-2020 at 08:09 AM.
Quoth is offline   Reply With Quote
Old 06-20-2020, 09:10 AM   #71
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I'm not saying <i> and <em> will make any actual difference in the real world, but since they are intended for different things, that could be a reason for keeping them separate. Who knows, maybe tomorrow you'd like to mark emphasis with a bold font, but leave italics as italic.

The same would apply, by the way, to apostrophe vs right single quote. They are one and the same character and glyph, but O how I wish there were two characters, so changing from double quotes to single quotes would be less painful (if correctly coded). I actually used to code one as &#8217; and the other as &rsquo;.

Wordprocessor bells, whistles, features and bugs are irrelevant for discussing how XHTML+CSS in ebooks should/could look like.
Jellby is offline   Reply With Quote
Old 06-20-2020, 11:31 AM   #72
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Jellby View Post
Because even though <em> and <i> may look the same when rendered as text, they have different semantics and may be interpreted differently, for example, by a text-to-speech system.
As was said by jackie_w, the TTS systems do not differentiate styled text from plain text.
JSWolf is offline   Reply With Quote
Old 06-20-2020, 11:36 AM   #73
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Jellby View Post
I'm not saying <i> and <em> will make any actual difference in the real world, but since they are intended for different things, that could be a reason for keeping them separate. Who knows, maybe tomorrow you'd like to mark emphasis with a bold font, but leave italics as italic.

The same would apply, by the way, to apostrophe vs right single quote. They are one and the same character and glyph, but O how I wish there were two characters, so changing from double quotes to single quotes would be less painful (if correctly coded). I actually used to code one as &#8217; and the other as &rsquo;.

Wordprocessor bells, whistles, features and bugs are irrelevant for discussing how XHTML+CSS in ebooks should/could look like.
Nobody has given a proper explanation of what <em> and <strong> are vs <i> and <b>. The default for <em> is italic and the default or <strong> is bold. Yes you can change what <em> and <strong> do is CSs but you can also change what <i> and<b> do. So I see no difference other them <em> and <strong> take up more space and make the ePub larger.
JSWolf is offline   Reply With Quote
Old 06-20-2020, 12:14 PM   #74
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
<i> just means "this is italic". You can change it, but that is still what it means. It is direct formatting, like clicking the "I" button in Word.

<em> means "this is emphasized". It's usually rendered by default in italics, and you can change it. It still means it's emphasized. You can make it look like the surrounding text. It still means it's emphasized, even if you can't see it. It is like applying a style in Word (with the italics property enabled by default).

Tex2002ans had a very good example of how they can be used differently:

Code:
<p>In <i>Book Title</i>, the character screamed: “Not in <em>my</em> neighborhood!”</p>
"Book Title" is in italics because it's a book title, it's not used for any kind of emphasis. One could also have used <span class="book_title">Book Title</span>. Animal and ship names are often set in italics, without any emphasis being implied.

"my" is in italics because it's emphasized. If you read it aloud you'd give it a special intonation.

They are two different things that by default look the same, but it doesn't mean they always have to look the same.
Jellby is offline   Reply With Quote
Old 06-20-2020, 12:38 PM   #75
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 JSWolf View Post
If all you are doing it italicizing, why would you mix <i> and <em>? For that matter, why use <em>? I would just go with <i>. Two reasons for <i>. Less code and all programs to display the eBook should know exactly what's meant by <i>.
Read the 2017 thread. You even posted in there.

Quote:
Originally Posted by Jellby View Post
I'm not saying <i> and <em> will make any actual difference in the real world, but since they are intended for different things, that could be a reason for keeping them separate. Who knows, maybe tomorrow you'd like to mark emphasis with a bold font, but leave italics as italic.


The 2017 thread covers most of these cases too.

Another case of <b>/<strong>:

For example, in Maths/Physics, vectors can be displayed in three ways:
  • bold
  • arrow
  • hat

usually bold, but different fields and schools of thought display them differently.

Code:
<strong>Note:</strong> The vector <b>v</b> goes from point A to C.
Of course, it's best to go even further and markup with classes:

Code:
<strong>Note:</strong> The vector <b class="vector">v</b> goes from point A to C.
this allows you to easily manipulate it later if needed, but you're not reliant purely on CSS.

* * *

In certain citation styles, bold is used for "Volume #":

Code:
F. Last, <i>Journal of Examples</i> <b>84</b>(2), 449–495 (2012).
Of course, classes further help:

Code:
F. Last, <i class="journaltitle">Journal of Examples</i> <b class="volumenum">84</b>(2), 449–495 (2012).
If switching citation styles, you may not want bold volume #... but it's definitely not <strong>.

Side Note: Also highly recommend watching one of my favorite talks from ebookcraft 2019, "Building Ebooks that Last"... especially around 19 minutes where she shows a poorly marked-up recipe book (using code like <p class="heading2"> instead of <h2>) "separated from its CSS".

Quote:
Originally Posted by Quoth View Post
I've yet to find ANYTHING that does treat them differently [...].
Text-to-Speech (JAWS, NVDA).

Quote:
Originally Posted by Quoth View Post
Nor do I know how to create an <em> in source text other than editing HTML directly.
Most tools probably default to all <i> or all <em> (similarly all <b> or all <strong>).

For example, Reddit changes **markup** -> HTML <em>markup</em>. Or if you post into a CMS (Content Management System), it may "helpfully" change every <i> to <em> (grumble, grumble, ask me how I know. :P).

But if you use Styles properly in your documents, you may generate code that can easily be manipulated into more semantic meanings. And if you do mark things up properly, you'll be better off in the long-run.

Side Note: Similarly, see my recent thread "Should Chinese Fonts be Embedded in Ebooks?". Proper markup for HTML lang is very important. Do most mark lang properly? No. Should they? Yes*.

Quote:
Originally Posted by Quoth View Post
Computer software is rubbish at context. I've not heard text to speech improve much in thirty five years, it does sound a bit more human. But compared to even an inexperienced human it's rubbish.
You haven't been looking closely.

And TTS is currently one of the fastest growing fields, especially with the *shudder* "Personal Assistants".

Quote:
Originally Posted by Quoth View Post
So I'm sceptical. I suspect the <em> is something some HTML guru thought up and it's not really important.
There was a little speedbump there in HTML4 where they deprecated <i>+<b>, but I think they made a step back in the right direction in HTML5.

Quote:
Originally Posted by Quoth View Post
How would I decide to use <i> or <em>.
See 2017 thread.

Quote:
Originally Posted by Quoth View Post
The Interobang never caught on.
Side Note: Seriously‽ You may be interested in some links in my Reddit post from a few days ago:

https://www.reddit.com/r/writing/com...bangs/fuyl3jp/

Last edited by Tex2002ans; 06-20-2020 at 03:07 PM.
Tex2002ans is offline   Reply With Quote
Reply

Tags
semantic markup


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Span Span Span Sigil cleaning up indesign blackest Sigil 31 12-06-2017 10:16 AM
Span Span Span Span MULTIVAC ePub 7 12-06-2014 08:58 AM
Nested Span? Turtle91 ePub 4 05-20-2013 02:47 PM
span in span: is this problematic? tbuyus ePub 8 03-31-2013 08:01 AM
Remove <br /> together with span, and only span Razzia Recipes 3 05-30-2011 06:55 PM


All times are GMT -4. The time now is 04:46 PM.


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