View Single Post
Old 10-03-2019, 08:13 PM   #3
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,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Gregg Bell View Post
Can I just use the template (Sigil's defaults) and be okay? Thanks.
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".

Quote:
Originally Posted by Gregg Bell View Post
instead of this:

Code:
<body lang="en-US" dir="ltr">
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, [...]).

Quote:
Originally Posted by Gregg Bell View Post
I'm tired of having to tweak all this minutia, so when Turtle91 suggested an epub template, I was like, Yeah, I'm in.
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.

Last edited by Tex2002ans; 10-03-2019 at 08:19 PM.
Tex2002ans is offline   Reply With Quote