Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-22-2015, 12:05 PM   #1
UncleIvor
Enthusiast
UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.
 
Posts: 36
Karma: 1510058
Join Date: Dec 2008
Device: Various Kobo readers, Sony readers from the past.
Underlining

I needed to underline a section of text, so I selected it, and clicked on the underline icon. The tags "<u>" and /u duly appeared.

When I run F7, this throws up two errors:
'no declaration found for element 'u' '
and
'element 'u' is not allowed for content model '(a|br|span|bdo|map|object|img|svg|tt|i|b|big|smal l|em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acro nym|sub|sup|input|select|textarea|label|button|ins |del|script)'

The paragraph in question is simply:

Quote:
<p><u> ... text ... </u></p>
Anyone know why?
UncleIvor is offline   Reply With Quote
Old 11-22-2015, 12:25 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,488
Karma: 5703586
Join Date: Nov 2009
Device: many
Is this with the latest Sigil-0.9.0? If not, which version? Also, did you add the underline in BookView mode? If so, if you look in CodeView, were "u" beginning and end tags inserted anyplace else but inside the p tag?

KevinH

Last edited by KevinH; 11-22-2015 at 12:28 PM.
KevinH is offline   Reply With Quote
Advert
Old 11-22-2015, 12:32 PM   #3
UncleIvor
Enthusiast
UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.
 
Posts: 36
Karma: 1510058
Join Date: Dec 2008
Device: Various Kobo readers, Sony readers from the past.
Version 0.7.4.

It was added in codeview, and the appearance in code view is as above.
UncleIvor is offline   Reply With Quote
Old 11-22-2015, 12:34 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Well, <u> is supposed to be deprecated in favor of styles. I don't think Epubcheck will accept it, so it makes sense that Flightcrew will complain too...
eschwartz is offline   Reply With Quote
Old 11-22-2015, 12:37 PM   #5
UncleIvor
Enthusiast
UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.
 
Posts: 36
Karma: 1510058
Join Date: Dec 2008
Device: Various Kobo readers, Sony readers from the past.
Removed 0.7.4 and installed 0.9.

Problem disappeared.

Any way of scrubbing this thread?
UncleIvor is offline   Reply With Quote
Advert
Old 11-22-2015, 01:08 PM   #6
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,488
Karma: 5703586
Join Date: Nov 2009
Device: many
No,

Actually you did not run Flightcrew in Sigil-0.9.0, Your ran sanitycheck. If you want to run FlightCrew you must load its plugin and launch it. Sanitycheck just checks if the source is parseable, it is **not** an epub2 validator. If you want to validate in Sigil-0.9.0 you must load either the epubcheck plugin or the flightcrew plugin.

As for the u tag, it exists in html4 but is deprecated, it exists in xhtml 1.0, it does not exist in xhtml 1.1, but now it is back in html5, xhtml5 but with a more restricted meaning and use.

Flightcrew uses the official xhtml 1.1.dtd when validating the epub and it does not allow the u tag.

Hope this explains things.

KevinH

Last edited by KevinH; 11-22-2015 at 01:24 PM.
KevinH is offline   Reply With Quote
Old 11-22-2015, 05:27 PM   #7
UncleIvor
Enthusiast
UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.UncleIvor ought to be getting tired of karma fortunes by now.
 
Posts: 36
Karma: 1510058
Join Date: Dec 2008
Device: Various Kobo readers, Sony readers from the past.
Thanks. Flightcrew now installed.

I'll use a <span style=""> for underlining.
UncleIvor is offline   Reply With Quote
Old 11-23-2015, 06:15 AM   #8
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by UncleIvor View Post
I'll use a <span style=""> for underlining.
The logic of such rules escapes me. Occam's razor tells us that <u> is a much better solution than <span style="">, never mind having to include another style!
Notjohn is offline   Reply With Quote
Old 11-23-2015, 07:08 AM   #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,686
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Notjohn View Post
The logic of such rules escapes me. Occam's razor tells us that <u> is a much better solution than <span style="">, never mind having to include another style!
Unfortunately, if you use <u> in ePub2 books, it'll fail epubcheck, however, you can use it in ePub3 books.
Doitsu is offline   Reply With Quote
Old 11-23-2015, 07:43 AM   #10
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,365
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I honestly don't think there will ever be a browser/renderer/reader that doesn't honor <u></u> ... regardless of whether the document claims to be (x)html4|5. But specs are specs.
DiapDealer is offline   Reply With Quote
Old 11-23-2015, 08:57 AM   #11
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,208
Karma: 34984330
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
Can't you declare "u" in your css? I often do that for "em" and "strong"

u {text-decoration: underline}
GrannyGrump is offline   Reply With Quote
Old 11-23-2015, 09:20 AM   #12
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Notjohn View Post
The logic of such rules escapes me. Occam's razor tells us that <u> is a much better solution than <span style="">, never mind having to include another style!
A silly rule is still a rule.

And as DiapDealer said, the chances of any browser or ereader or any piece of code designed to render HTML NOT supporting it is... unlikely.

But if you want to conform to the spec and thus pass Epubcheck, you need to follow the silly rule. And if you want to submit an ebook to a store that demands you pass Epubcheck, you gotta conform to the spec...

Quote:
Originally Posted by GrannyGrump View Post
Can't you declare "u" in your css? I often do that for "em" and "strong"

u {text-decoration: underline}
That just forces the renderer to use the right styling for em/strong/u/b (in case it had a different default for some odd reason) -- but the element itself is still going to get noticed and trip a silly error.
eschwartz is offline   Reply With Quote
Old 11-23-2015, 09:40 AM   #13
Arios
A curiosus lector!
Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.
 
Arios's Avatar
 
Posts: 463
Karma: 2015140
Join Date: Jun 2012
Device: Sony PRS-T1, Kobo Touch
The funny thing is that Sigil insert the codes <u></u>, the less funny thing is, as Doitsu and eschwartz said, epubcheck as well as FlightCrew do not like those codes... And specs are specs
Arios is offline   Reply With Quote
Old 11-23-2015, 11:02 AM   #14
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,365
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Arios View Post
The funny thing is that Sigil insert the codes <u></u>, the less funny thing is, as Doitsu and eschwartz said, epubcheck as well as FlightCrew do not like those codes... And specs are specs
True. But the button is there because there was a wysiwyg cry for such a thing. And making the button underline text in a spec-compliant AND sane method would be nothing but trouble: do we create inline styles; do we create a new class in the css file for each occurrance (do we create/link a css file if one doesn't already exist)? Do we parse existing css (both inline and external) to see if a suitable class to be used already exists? What if inheritance from a pre-existing class clobbers Sigil's efforts to create the underline? It's a nightmare any way you look at it.

My personal preference would be to give U tags a free pass in Sigil's well-formed check, if at all possible. Let the epub validators do all the barking about them. Short of that, I guess I'd like to see it (the button) made unavailable in documents where Sigil/gumbo deems them un-spec-worthy.

Good stuff!
DiapDealer is offline   Reply With Quote
Old 11-23-2015, 11:05 AM   #15
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,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by GrannyGrump View Post
Can't you declare "u" in your css? I often do that for "em" and "strong"

u {text-decoration: underline}
No, you can't create new elements in CSS, you can only define the formatting for existing ones. And <u> is not an existing element in XHTML.

But you can re-define <em>, for example (if you are underlining, it is probably because you want to emphasize), or give it a class:

Code:
em {text-decoration: underline; font-style: normal}

em.u {text-decoration: underline; font-style: normal}
In the second case, you'd use <em class="u">like this</em>.
Jellby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura HD How to view all underlining and annotations n3xtITA Kobo Reader 9 02-27-2014 01:54 PM
underlining question gumalcan Onyx Boox 3 10-28-2012 02:38 PM
Review from the point of heavy underlining jjonas Sony Reader 3 03-12-2010 01:46 PM
Underlining in pdf files - problem nhimclc iRex 4 05-03-2009 04:45 AM
underlining text in LRF? curiouser Sony Reader 2 03-31-2007 09:09 PM


All times are GMT -4. The time now is 01:19 AM.


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