Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 02-06-2017, 04:37 PM   #1
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Some files.html & toc.xhtml (also Cover.xhtml)



I create via Tools->Table of Contents->Insert inline Table of Contents such one. It came as .xhtml-file. My other files are all .html, apart from Cover.xhtml (I don't know why this one is also .xhtml).

Click image for larger version

Name:	toc.xhtml.png
Views:	321
Size:	9.1 KB
ID:	154817
toc.xhtml

What is this all about?

Edit:
And why it came with such a CSS, which doesn't function in ereaders, at least not in my one!?

Code:
<head>
  <title>Inhaltsverzeichnis</title>
  <style type="text/css">
  li {
    list-style-type: none;
    padding-left: 2em;
    margin-left: 0;
  }
  a {
    text-decoration: none;
  }
  a:hover {
    color: red;
  }
  </style>
</head>

Last edited by chaot; 02-06-2017 at 04:50 PM.
chaot is offline   Reply With Quote
Old 02-06-2017, 04:43 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
It doesn't actually matter which file extension is used. Just pick one and rename so they are all the same. They don't have to be the same, it just looks better.
JSWolf is offline   Reply With Quote
Advert
Old 02-06-2017, 04:59 PM   #3
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Click image for larger version

Name:	Are you sure?.png
Views:	522
Size:	16.5 KB
ID:	154819
Are you sure?

Check Book is after the change to toc.html unchanged. For what kind of changes is the message meant?
chaot is offline   Reply With Quote
Old 02-06-2017, 05:42 PM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
There is no problem with changing .xhtml to .html, or vice versa.
Turtle91 is offline   Reply With Quote
Old 02-06-2017, 06:31 PM   #5
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
The file extension is unimportant. What actually matters is the mime type declared in the OPF. It should be application/xhtml+xml for XHTML files.
jhowell is offline   Reply With Quote
Advert
Old 02-07-2017, 02:12 AM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by chaot View Post
And why it came with such a CSS, which doesn't function in ereaders, at least not in my one!?

Code:
<head>
  <title>Inhaltsverzeichnis</title>
  <style type="text/css">
  li {
    list-style-type: none;
    padding-left: 2em;
    margin-left: 0;
  }
  a {
    text-decoration: none;
  }
  a:hover {
    color: red;
  }
  </style>
</head>
Well, not all CSS elements are supported in the ePUB2 specifications. That being said, alternative colors for anchors have been known to be supported badly in the various readers.
Now, the hover selector might work on a tablet or PC, but not on a standalone reader for sure.
Toxaris is offline   Reply With Quote
Old 02-07-2017, 10:49 AM   #7
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
The message say:
Quote:
You are changing the file type of toc.xhtml to toc.html. Doing so can cause problems, are you sure?
That means: The OS/calibre has recognized what's going on. Yes!? And you all say, there is no problem about changing file extensions, OK. Then the message is redundant and should be removed for such file extension changes.

I specify my question from #3: For what kind of changes is the message box created at all?

@jhowell - that's alright, as you see:
Code:
<manifest>
    <item href="toc.html" id="id8" media-type="application/xhtml+xml"/> 
... and at end ...
    <reference type="toc" title="Inhaltsverzeichnis" href="toc.html#calibre_generated_inline_toc"/>
Inhaltsverzeichnis is German (means content list): From where/why calibre knows, it's a German book?

Not from here:
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="de">
I changed all files from lang="de" to lang="en" and 'refresh' the toc.xhtml, but still it's named Inhaltsverzeichnis.

Quote:
Originally Posted by Toxaris View Post
Now, the hover selector might work on a tablet or PC, but not on a standalone reader for sure.
Yes, that was, what I meant: HOVER doesn't function in ereaders.
So, it shouldn't come as integrated CSS here!

Last edited by chaot; 02-07-2017 at 10:53 AM.
chaot is offline   Reply With Quote
Old 02-07-2017, 11:12 AM   #8
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: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
EPUB3 recommends .xhtml extensions. EpubCheck will actually issue a warning for files that are .htm, or .html (in an epub3). Better safe than sorry, in my opinion (even though warnings are not errors). I make them all .xhtml (regardless of the epub version).
DiapDealer is offline   Reply With Quote
Old 02-07-2017, 12:35 PM   #9
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
All .xhtml to be safe for future: Piece of good advice!
chaot is offline   Reply With Quote
Old 02-07-2017, 03:08 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,559
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaot View Post
Attachment 154819
Are you sure?

Check Book is after the change to toc.html unchanged. For what kind of changes is the message meant?
That calibre book editor message is not file type specific, if you inadvertently rename myimage.jpg to justanotherimage.jng you'll get a similar message -- and in that case it probably will matter. Which is a good reason not to blithely uncheck "Show this message again:"

FWIW Sigil doesn't issue similar warnings.

I don't know if any of the epub validators would object to the presence of a .jng file, or if any ereader devices would know what to do with one.

I do same as DD - make all the text files .xhtml.

BR
BetterRed is online now   Reply With Quote
Old 02-07-2017, 04:15 PM   #11
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,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by chaot View Post
@jhowell - that's alright, as you see:
Code:
<manifest>
    <item href="toc.html" id="id8" media-type="application/xhtml+xml"/> 
... and at end ...
    <reference type="toc" title="Inhaltsverzeichnis" href="toc.html#calibre_generated_inline_toc"/>
Inhaltsverzeichnis is German (means content list): From where/why calibre knows, it's a German book?

Not from here:
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="de">
I changed all files from lang="de" to lang="en" and 'refresh' the toc.xhtml, but still it's named Inhaltsverzeichnis.
If you use the German Calibre user interface and/or create a new German language book in Calibre Editor, Calibre will use the German translation of Table of Contents = Inhaltsverzeichnis whenever you generate an inline (HTML) TOC. It'll also add a opf guide item with an Inhaltsverzeichnis title attribute.

Make sure to select Englisch from the Sprache (Language) dropdown list box in the Neues Buch erstellen (Create new book) dialog box when you create a new English epub.
Doitsu is offline   Reply With Quote
Old 02-08-2017, 01:00 PM   #12
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Quote:
Originally Posted by BetterRed View Post
I do same as DD - make all the text files .xhtml.
You still learn something about it.

Quote:
Originally Posted by Doitsu View Post
If you use the German Calibre user interface
I use English interface!

Quote:
... and/or create a new German language book in Calibre Editor, Calibre will use the German translation of Table of Contents = Inhaltsverzeichnis whenever you generate an inline (HTML) TOC. It'll also add a opf guide item with an Inhaltsverzeichnis title attribute.
The book is German. But how detect calibre that it is a German book?

Quote:
Make sure to select Englisch from the Sprache (Language) dropdown list box in the Neues Buch erstellen (Create new book) dialog box when you create a new English epub.
It isn't a new created book.

Last edited by chaot; 02-08-2017 at 01:03 PM.
chaot is offline   Reply With Quote
Old 02-08-2017, 01:15 PM   #13
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,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by chaot View Post
The book is German. But how detect calibre that it is a German book?
It either uses an advanced heuristics algorithm or it simply checks the value of the following metadata entry in the .opf file:

Code:
<dc:language>de</dc:language>
If you're really curious about it, you might want to ask this question in the Calibre Editor forum.

BTW, if it's a German book, why do you want to change the value of the TOC guide item title attribute?
Doitsu is offline   Reply With Quote
Old 02-09-2017, 10:49 AM   #14
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
@Doitsu: Quit simple! Sometimes we can't see the wood for the trees.

In Edit Metadata there is a dropdown box Language: German (in my case).
E.g. I test with French: then inline TOC comes as Table des Matières

Tested with Yoruba (a westafrican language): Table of Contents. Kovid made a mistake here. Correct is: Tabili ti awọn akoonu ti (Google translate).

Quote:
BTW, if it's a German book, why do you want to change the value of the TOC guide item title attribute?
I didn't want to change anything (here) - only to understand better!

Anyway, I know now: there is no mystery! all!
chaot is offline   Reply With Quote
Old 02-09-2017, 05:16 PM   #15
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,559
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaot View Post
Tested with Yoruba (a westafrican language): Table of Contents. Kovid made a mistake here. Correct is: Tabili ti awọn akoonu ti (Google translate).
I'd be more inclined to believe Kovid than Google.

My Google English to Yoruba translator yields "Atọka akoonu" for "Table of Contents", as does a Nigerian Yoruba dictionary site.

I think Google translates differently if your Google language is set to other than the source language - perhaps by translating source to user's google language and then to target language. I've experienced this when translating FX Italian to Swedish when my Google language is set to English, if I set my google language to Italian I sometimes get a different result - which is almost invariably 'better' according to my Swedish interlocutor

BR
BetterRed is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
InDesign - ePub export html files instead of xhtml csavory ePub 5 02-06-2015 01:47 AM
MOBI without TOC.xhtml Oxford-eBooks Kindle Formats 13 10-04-2014 11:40 PM
Creating TOC and splitting into several xhtml files Julius Caesar Kindle Formats 1 08-31-2013 09:26 AM
TOC xhtml giosa Sigil 3 01-17-2012 09:12 PM
XHTML files not listed, only one HTML file SmartyGuy Sigil 6 06-21-2011 12:32 PM


All times are GMT -4. The time now is 12:10 AM.


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