![]() |
Two questions
1 Attachment(s)
1) How come some of the chapters in my novels in Sigil have the book title in the title tags on every file and others don't? (I've made them identically and not manually added anything to the title tags.) Does it matter if the title is in those chapter files?
2) I have removed the language ending of that tag that begins <html xmlns... and I have also removed the language stuff from the <body> tag. Is this okay the way I have it? Thanks.https://i.postimg.cc/bw62VRSC/Selection-048.png |
First, I wanted to point out KevinH's Sigil Plugin, "Access-Aide".
It helps fill blank <title>s (using the first heading in the document) + add lang + xml:lang to your <html>. Quote:
Sometimes the tools put gibberish in the <title> (like InDesign puts the filenames... you can safely delete those): Code:
<title>Chapter_1.xhtml</title>Code:
<title>Gregg Bell - Dupes-A-Navy: Chapter 1</title>Quote:
Something like: Code:
<head>
Technical Side Note: WCAG has a few articles on how to create good <title>s: G88: Providing descriptive titles for Web pages H25: Providing a title using the title element Understanding SC 2.4.2 For example, G88 gives this reasoning/recommendation for good <title>s: Spoiler:
Quote:
An EPUB Reader should be able to still pull the book's language from the EPUB's Metadata (Tools > Metadata Editor), and grab your dc:language (in your case, "en" (English) or "en-US" (English (United States)). BUT, again, think screen reader or someone converting to a different format. They may pull the HTML out separately and read it elsewhere. So you may want to add the lang + xml:lang to your HTML as well. This doesn't hurt: Code:
<html xmlns="http://www.w3.org/1999/xhtml">Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">(Imagine there could be a US English book, but it has a British English chapter within it.) Technical Side Note: H57: Using language attributes on the html element H57 explains why lang + xml:lang on <html> are important: Spoiler:
So it could help:
Again, an EPUB Reader SHOULD still be able to pull it from the EPUB Metadata... but not all tools will be reading your EPUB in EPUB. :P |
Quote:
|
Quote:
|
One reason not to use both 'lang' and 'xml:lang' is that FlightCrew will flag 'lang' as an error.
|
Quote:
|
Has someone told Lulu? (I think it was Lulu who bounced epubs that didn't pass FlightCrew?)
|
As this relates to FlightCrew, it is the xml schema that determines if an attribute is allowed or not. The vast part of validating an epub2 is done against that schema. As far as I know these schema in Flightcrew are the most recent published for epub2. So the spec for epub2 has evolved but without a proper updated schema, there is not much I can do. I will look again to see if there are newer xml schemas for epub2 that are old enough to not add or allow epub3 only language features.
|
Quote:
Quote:
|
I'm using 0.9.9 Sigil. I got confused re-reading this post. (There were just too many details and it seemed contradictory information.) If somebody can please make this very simple for me I'd really appreciate it. I just want to know what's the best way to do this for an ebook that is a novel (to go on Amazon).
I'm analyzing two ebooks. The first screenshot is of my last book, which I'll post here. Both books passed Epubchek with no issues. Flightcrew has issues with both. (And I'm not concerned about the first warning about the OPF not being reachable. That's just because the cover isn't there.) https://i.postimg.cc/zffF8BZT/DupeA.png This next one is the book I just formatted. Now this is just the default that Sigil provided. (I of course chose US english as the language in the metadata editor.) https://i.postimg.cc/m22DdFQ3/OneSlip.png So in the first screenshot I used <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-US"> instead of <html xmlns="http://www.w3.org/1999/xhtml"> And I deleted lang="en-US" dir="ltr" from the <body> tag. I can do either or something different. What's the best way to go? This is a simple ebook. No video or anything like that. A cover, some backmatter images and text. If it matters, this is the way the plugins look. (I'm running xubuntu 18.04LTS.) https://i.postimg.cc/j5BjC8WR/preferences.png Thanks! |
Flightcrew doesn't like the 'lang' item. Use just 'xml:lang'.
|
Quote:
Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">Code:
<body>Because when I used Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">Code:
<body lang="en-US" dir="ltr"> |
Yes, you seem to have correctly worked out how to satisfy Flightcrew!
Of course, if the book is heading for Amazon, the errors that matter are any thrown up when converting to mobi format in Kindle Previewer. You could also install the KPD Validator plugin for a quick pre-check while still working in Sigil. |
1 Attachment(s)
Quote:
This is what you'll want: Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">Quote:
Epubcheck is THE important one (it's what the storefronts use for sale). If epubcheck says the book is fine, the book is fine. Flightcrew is older/outdated, and was really only there as an easy GUI in Sigil to quickly check some basic code issues. It squaks at some things that are correct because it hasn't been updated to handle such cases. Quote:
Attachment 171572 Also has the advantage of not disappearing if those external image sites die. So many older topics have busted images, and the information gets lost. |
Quote:
|
| All times are GMT -4. The time now is 07:12 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.