02-10-2017, 12:44 PM | #1 |
Head of lunatic asylum
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> Code:
<head> <title>Werke 1</title> <link href="stylesheet.css" rel="stylesheet" type="text/css"/> </head> Last edited by chaot; 02-10-2017 at 01:11 PM. Reason: add: (in an ePub) |
02-10-2017, 01:02 PM | #2 |
Resident Curmudgeon
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
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> |
02-10-2017, 01:15 PM | #3 |
Head of lunatic asylum
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"/>
Code:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" lang="de" <head> ... Last edited by chaot; 02-11-2017 at 06:17 AM. Reason: 99% = most |
02-10-2017, 11:48 PM | #4 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
I've no idea of exactly what's needed, I trust calibre to get it right for me. |
|
02-11-2017, 12:16 AM | #5 |
A Hairy Wizard
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
|
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. |
02-12-2017, 06:12 PM | #6 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
|
|
02-13-2017, 07:13 AM | #7 |
Resident Curmudgeon
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
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> |
02-13-2017, 12:07 PM | #8 | |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Quote:
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>
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="{"Favorites.Authors": [], "Favorites": []}"/> <meta name="calibre:author_link_map" content="{"Roth, Joseph_x": ""}"/> That doesn't look usual (first time I see such entry). For what it is good for? |
|
02-13-2017, 12:24 PM | #9 |
Resident Curmudgeon
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
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. |
02-13-2017, 12:33 PM | #10 |
Grand Sorcerer
Posts: 27,545
Karma: 193191846
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. |
02-13-2017, 01:00 PM | #11 | |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Quote:
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 |
|
02-13-2017, 01:26 PM | #12 |
A Hairy Wizard
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
|
That is correct!
|
02-13-2017, 02:13 PM | #13 | |
Resident Curmudgeon
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/> |
|
02-13-2017, 02:29 PM | #14 | |
A Hairy Wizard
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
|
Quote:
|
|
02-13-2017, 03:45 PM | #15 |
Resident Curmudgeon
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
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.
|
Thread Tools | Search this Thread |
|
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 |