![]() |
#61 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,137
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
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?
|
![]() |
![]() |
![]() |
#62 | ||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Hitch |
||
![]() |
![]() |
Advert | |
|
![]() |
#63 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
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
|
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:
|
![]() |
![]() |
![]() |
#64 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,137
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
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; } 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. |
|
![]() |
![]() |
![]() |
#65 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,582
Karma: 14328510
Join Date: Nov 2019
Device: none
|
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. |
![]() |
![]() |
Advert | |
|
![]() |
#66 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
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:
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 ![]() 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. |
|
![]() |
![]() |
![]() |
#67 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
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> 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. |
|
![]() |
![]() |
![]() |
#68 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,137
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
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>.
|
![]() |
![]() |
![]() |
#69 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
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.
|
![]() |
![]() |
![]() |
#70 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,705
Karma: 103837201
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#71 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
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 ’ and the other as ’. Wordprocessor bells, whistles, features and bugs are irrelevant for discussing how XHTML+CSS in ebooks should/could look like. |
![]() |
![]() |
![]() |
#72 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,137
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
As was said by jackie_w, the TTS systems do not differentiate styled text from plain text.
|
![]() |
![]() |
![]() |
#73 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,137
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#74 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
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> "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. |
![]() |
![]() |
![]() |
#75 | |||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
![]() 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:
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. Code:
<strong>Note:</strong> The vector <b class="vector">v</b> goes from point A to C. * * * In certain citation styles, bold is used for "Volume #": Code:
F. Last, <i>Journal of Examples</i> <b>84</b>(2), 449–495 (2012). Code:
F. Last, <i class="journaltitle">Journal of Examples</i> <b class="volumenum">84</b>(2), 449–495 (2012). 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". Text-to-Speech (JAWS, NVDA). Quote:
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:
And TTS is currently one of the fastest growing fields, especially with the *shudder* "Personal Assistants". Quote:
See 2017 thread. Side Note: Seriously‽ ![]() https://www.reddit.com/r/writing/com...bangs/fuyl3jp/ Last edited by Tex2002ans; 06-20-2020 at 03:07 PM. |
|||||
![]() |
![]() |
![]() |
Tags |
semantic markup |
Thread Tools | Search this Thread |
|
![]() |
||||
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 |