View Single Post
Old 10-04-2019, 01:05 PM   #7
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
Quote:
Originally Posted by Tex2002ans View Post
The defaults are perfectly fine/adequate... but with the extra lang + xml:lang in the <html>, they're "more right".

Sigil's default:

Code:
<html xmlns="http://www.w3.org/1999/xhtml">
you just add the little:

Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
and you're good to go.

Sigil's default code is saying: "This is HTML... but I don't know which language this is."

All lang + xml:lang are doing is saying: "This is HTML AND it's in US English".



you don't need dir="ltr". That's already the defaults. The only time you would ever need to specify a dir is when you're working in right-to-left languages (like Hebrew, Arabic, [...]).



You already have the same EPUB template you used for years and years... we've just updated it with a few chunks of slightly better (and admittedly slightly more confusing) code.

But once you understand what each little piece is doing, it becomes easier to "read through the Matrix". Kind of like when you learned the basics of Regex!

And once we get this new lang stuff drilled into your head, all you have to do is just remember to copy/paste it into your future books.
Thanks Tex. All right, this is the stuff that was confusing me. Here's the flow you're suggesting, right?

1) Open the html in Sigil
2) Set it up with all the html files (including AboutTheAuthor etc)
3) Do a Find (and Replace) with
Code:
<html xmlns="http://www.w3.org/1999/xhtml">
and Replace with
Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-US">
4)Do a Find (and Replace) with
Code:
<body lang="en-US" dir="ltr">
and Replace with
Code:
<body>
And that's, it, right?
Gregg Bell is offline   Reply With Quote