Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 02-10-2017, 12:44 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
Extended <head> chapter: NOT necessary?



You know what it is. For me it's the most extensive one I could lay my hands on.

Code:
<head>
  <title>Werke 1</title>
  <meta name="generator" content="pdftohtml 0.36"/>
  <meta name="author" content="Roth, Joseph"/>
  <meta name="keywords" content=""/>
  <meta name="date" content="2017-01-20T12:05:05+00:00"/>
  <meta name="subject" content="Das journalistische Werk"/>
  <link href="stylesheet.css" rel="stylesheet" type="text/css"/>
  <link href="page_styles.css" rel="stylesheet" type="text/css"/>
  <link href="font_styles.css" rel="stylesheet" type="text/css"/>
</head>
Necessary is only this (in an ePub), I think. What do you think?

Code:
<head>
  <title>Werke 1</title>
  <link href="stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
Sometimes instead of title e.g. Werke 1 is just put inside unknown. What's the difference?

Last edited by chaot; 02-10-2017 at 01:11 PM. Reason: add: (in an ePub)
chaot is offline   Reply With Quote
Advert
Old 02-10-2017, 01:02 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: 46,846
Karma: 35378405
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
This is what I use for the head in an ePub.

Code:
<head>
<title>Echoes in Death</title>
<link href="../styles/stylesheet.css" rel="stylesheet" type="text/css"/>
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/>
</head>
The last line makes sure the coding is defined as UTF-8 encoding. Not all programs/Readers force UTF-8 encoding. Kindle's do not default to UTF-8. ADE does force UTF-8.
JSWolf is offline   Reply With Quote
Old 02-10-2017, 01:15 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
Code:
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/>
is a link and only effective when connected to internet, or? I am most time off.

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="de"

<head> ...
I got that above the <head> section (as standard).

Last edited by chaot; 02-11-2017 at 06:17 AM. Reason: 99% = most
chaot is offline   Reply With Quote
Old 02-10-2017, 11:48 PM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 11,710
Karma: 17701195
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD
Quote:
Originally Posted by chaot View Post
Code:
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/>
is a link and only effective when connected to internet, or? I am 99% of time off.

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="de"

<head> ...
I got that above the <head> section (as standard).
No, it isn't a link. It is a definition of how to interpret the content in the file. If you use the URI, it will take you to the specs.

I've no idea of exactly what's needed, I trust calibre to get it right for me.
davidfor is offline   Reply With Quote
Old 02-11-2017, 12:16 AM   #5
Turtle91
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: 1,335
Karma: 11165622
Join Date: Dec 2012
Location: Altus, Oklahoma today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
I'm pretty sure the only thing that is required is that you have the <title></title> tags within the <head>. There doesn't even need to be anything within the title, just that it is there. The doctype goes before the <head>.

The link statement is only there when you have a linked stylesheet - but not required.

The meta statements are not required at all. Any meta information can go in the .opf file.
Turtle91 is offline   Reply With Quote
Advert
Old 02-12-2017, 06:12 PM   #6
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 10,593
Karma: 11012356
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2
Quote:
Originally Posted by Turtle91 View Post
I'm pretty sure the only thing that is required is that you have the <title></title> tags within the <head>. There doesn't even need to be anything within the title, just that it is there. The doctype goes before the <head>.

The link statement is only there when you have a linked stylesheet - but not required.

The meta statements are not required at all. Any meta information can go in the .opf file.
Great advice. All that extra head meta stuff is for web pages, not ePub. It is wasted on ePub where everything needs to be in the OPF file anyway.
DaleDe is offline   Reply With Quote
Old 02-13-2017, 07:13 AM   #7
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: 46,846
Karma: 35378405
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Here is the start of the XML file from the start of the file to the end of head.

Code:
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>Echoes in Death</title>
<link href="../styles/stylesheet.css" rel="stylesheet" type="text/css"/>
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/>
</head>
That's very simple and it works.
JSWolf is offline   Reply With Quote
Old 02-13-2017, 12:07 PM   #8
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 DaleDe View Post
Great advice. All that extra head meta stuff is for web pages, not ePub. It is wasted on ePub where everything needs to be in the OPF file anyway.
Yes, for web pages. May be, beside of other reasons, to order the stuff there.

But it's difficult to compare/find directly.
Code:
<head>
  <title>Werke 1</title>
  <meta name="generator" content="pdftohtml 0.36"/>
  <meta name="author" content="Roth, Joseph"/>
  <meta name="keywords" content=""/>
  <meta name="date" content="2017-01-20T12:05:05+00:00"/>
  <meta name="subject" content="Das journalistische Werk"/>
  <link href="stylesheet.css" rel="stylesheet" type="text/css"/>
  <link href="page_styles.css" rel="stylesheet" type="text/css"/>
</head>
as compared with the corresponding entries in content.opf

Code:
<?xml version='1.0' encoding='utf-8'?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="uuid_id" version="2.0">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <dc:title>Werke 1#orig</dc:title>
    <dc:creator opf:role="aut" opf:file-as="Roth, Joseph_x">Roth, Joseph_x</dc:creator>
    <dc:date>0101-01-01T00:00:00+00:00</dc:date>
    <dc:contributor opf:role="bkp">calibre (2.77.0) [https://calibre-ebook.com]</dc:contributor>
    <dc:identifier id="uuid_id" opf:scheme="uuid">dfed961f-f9bf-4c7d-9fad-406d68718bdd</dc:identifier>
    <dc:subject>#orig</dc:subject>
    <dc:subject>Juden</dc:subject>
    <dc:subject>Presse</dc:subject>
    <dc:subject>Zeitung/en</dc:subject>
    <dc:language>de</dc:language>
    <dc:identifier opf:scheme="calibre">dfed961f-f9bf-4c7d-9fad-406d68718bdd</dc:identifier>
    <meta name="calibre:timestamp" content="0101-01-01T00:00:00+00:00"/>
    <meta name="calibre:title_sort" content="Werke 1#orig"/>
    <meta name="cover" content="cover"/>
    <meta name="calibre:user_categories" content="{&quot;Favorites.Authors&quot;: [], &quot;Favorites&quot;: []}"/>
    <meta name="calibre:author_link_map" content="{&quot;Roth, Joseph_x&quot;: &quot;&quot;}"/>
E.g. the marked word journalistische doesn't appear in content.opf.

Quote:
Originally Posted by JSWolf View Post
Here is the start of the XML file from the start of the file [...].

Code:
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
That doesn't look usual (first time I see such entry). For what it is good for?
chaot is offline   Reply With Quote
Old 02-13-2017, 12:24 PM   #9
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: 46,846
Karma: 35378405
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Basically, get rid of the extra meta code that was generated by pdftohtml from your head. Leave in what needs to be there and you'll be good to go. What I posted was minimalist coding which is what you want. You don't want extra coding. But keep the meta content line I posted as it makes sure the code is rendered in UTF-8. It can be needed when converting to Mobi/KF8.

The code I posted that's before <head> is usual. It's just that Sigil uses different code to do the same thing. But you can use what I posted as it's valid code and it works.

Last edited by JSWolf; 02-13-2017 at 12:29 PM.
JSWolf is offline   Reply With Quote
Old 02-13-2017, 12:33 PM   #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: 15,704
Karma: 83282878
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It's a meta tag; they're supposed to be superfluous. But they often provide a historical trail of where a file has been, and/or what's been done to it. Delete them or don't. There's only a handful that might be relevant where making Kindlebooks is concerned (and of course the calibre ones that some devices/apps have adopted for library management ... but end users will just have calibre add those regardless).

My advice??? Don't stress over them one way or another.

Last edited by DiapDealer; 02-13-2017 at 02:10 PM.
DiapDealer is offline   Reply With Quote
Old 02-13-2017, 01:00 PM   #11
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 JSWolf View Post
Basically, get rid of the extra meta code that was generated by pdftohtml from your head. Leave in what needs to be there and you'll be good to go.
I am already one step ahead. Testing the minimum! What you refer to was meant as an example. Anyway!

Assuming we got a stylesheet (and want to have it reflected in our book). Because we can have a stylesheet not appearing in the head section, and therefore unreflected in the book (I test that).

Then this is the minimum and function!

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title></title>
  <link href="stylesheet.css" rel="stylesheet" type="text/css"/>
</head>

Last edited by chaot; 02-13-2017 at 01:06 PM. Reason: add: and therefore unreflected in the book
chaot is offline   Reply With Quote
Old 02-13-2017, 01:26 PM   #12
Turtle91
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: 1,335
Karma: 11165622
Join Date: Dec 2012
Location: Altus, Oklahoma today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
That is correct!
Turtle91 is offline   Reply With Quote
Old 02-13-2017, 02:13 PM   #13
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: 46,846
Karma: 35378405
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by chaot View Post
I am already one step ahead. Testing the minimum! What you refer to was meant as an example. Anyway!

Assuming we got a stylesheet (and want to have it reflected in our book). Because we can have a stylesheet not appearing in the head section, and therefore unreflected in the book (I test that).

Then this is the minimum and function!

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title></title>
  <link href="stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
You left out

Code:
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/>
I have seen plenty of ePub where the code is not going to be rendered correctly because it's the program doing the rendering is not forcing UTF-8. The meta content is needed to make sure the program renders the code as UTF-8. It's even sometimes needed for a Kindle. It is mostly quotes and apostrophes that won't be rendered correctly.
JSWolf is offline   Reply With Quote
Old 02-13-2017, 02:29 PM   #14
Turtle91
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: 1,335
Karma: 11165622
Join Date: Dec 2012
Location: Altus, Oklahoma today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
Quote:
Originally Posted by JSWolf View Post
You left out

Code:
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/>
I have seen plenty of ePub where the code is not going to be rendered correctly because it's the program doing the rendering is not forcing UTF-8. The meta content is needed to make sure the program renders the code as UTF-8. It's even sometimes needed for a Kindle. It is mostly quotes and apostrophes that won't be rendered correctly.
I'm pretty sure that an ePub reader would get that from the .opf file, thus making it redundant in the header, wouldn't it??
Turtle91 is offline   Reply With Quote
Old 02-13-2017, 03:45 PM   #15
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: 46,846
Karma: 35378405
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by Turtle91 View Post
I'm pretty sure that an ePub reader would get that from the .opf file, thus making it redundant in the header, wouldn't it??
I cannot say. I do know that ADE forces UTF-8. But I'm not up on all ePub readers. I know Kindles do not and if you convert such an ePub, you will get incorrect encoded characters.
JSWolf is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
xpath to insert chapter breaks - but chapter name cut off ? Rob557 Conversion 2 03-06-2014 06:59 AM
Troubleshooting Kindle K3 (keyboard) losing chapter head spacing. timecheck00 Amazon Kindle 5 11-30-2012 08:57 PM
Pocket eDGe and Full-size eDGe: Head to Head Comparison alefor enTourage Archive 28 12-01-2010 07:44 PM
Chapter Head Text Over Image theducks ePub 10 09-03-2010 03:32 PM
Video Head to Head of Kindle and Reader Kingston Which one should I buy? 30 01-24-2008 08:03 PM


All times are GMT -4. The time now is 01:18 PM.


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