Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 10-01-2016, 06:41 AM   #1
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Converting EPUB to AZW3: TOC loses CSS

Using Calibre 2.69, I convert an EPUB with a Calibre-generated TOC to AZW3, and the TOC styles go missing. EPUB before:
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>
  <title>Table of Contents</title>
  <style type="text/css">
      ... standard inline TOC styles
  </style>
</head>
<body id="calibre_generated_inline_toc">
  <h2>Table of Contents</h2>
  <ul>
    <li><a href="OEBPS/Text/ch01.html">Chapter One</a></li>
    <li><a href="OEBPS/Text/ch02.html">Chapter Two</a></li>
and so on. When converted, the AZW3 TOC looks like this:
Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head><meta charset="UTF-8"/>
    <title>Table of Contents</title>
    <link href="" rel="stylesheet" type="text/css"/>
    <link href="" rel="stylesheet" type="text/css"/>
</head>
  <body class="calibre1" id="calibre_generated_inline_toc">
  <h2 class="calibre2" id="UGI1-34fd63a1177c41c0ae1fdcf173149086">Table of Contents</h2>
  <ul class="calibre3">
    <li class="calibre4"><a class="calibre5" href="part0002.html#1T141-34fd63a1177c41c0ae1fdcf173149086">Chapter One</a></li>
    <li class="calibre4"><a class="calibre5" href="part0003.html#2RHM1-34fd63a1177c41c0ae1fdcf173149086">Chapter Two</a></li>
and so on.

Notice the stylesheet links have href="".

This seems to be a new bug since about 2.66...
Phssthpok is offline   Reply With Quote
Old 10-01-2016, 07:04 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://www.mobileread.com/forums/sho...d.php?t=186697
kovidgoyal is offline   Reply With Quote
Old 10-01-2016, 11:20 AM   #3
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by kovidgoyal View Post
OK... zip file here: https://www.dropbox.com/s/t9qu63m8o7...ample.zip?dl=0

Contains EPUB sample and result of converting to AZW3. No custom conversion settings. Conversion log just says "Convert book 1 of 1 (Sample), Finished, 100%, time taken 0m 2s".

EPUB TOC:
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Table of Contents</title>
<style type="text/css">
 li {
 list-style-type: none;
 padding-left: 0;
 text-indent: -2em;
 margin-left: 1em;
 margin-bottom: 0.2em;
 text-align: left;
 }
 a {
 text-decoration: none;
 }
 h2 {
 font-size: 1.2em;
 text-align: center;
 margin: 2em;
 }
</style>

</head>

<body id="calibre_generated_inline_toc">
<h2>Table of Contents</h2>

<ul>
<li><a href="OEBPS/Text/ch01.html">Chapter One</a></li>
<li><a href="OEBPS/Text/ch02.html">Chapter Two</a></li></ul>
</body>
</html>
Converted AZW3 TOC:
Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head><meta charset="UTF-8"/>
    <title>Table of Contents</title>
    
  <link href="" rel="stylesheet" type="text/css"/>
<link href="" rel="stylesheet" type="text/css"/>
</head>
  <body class="calibre" id="calibre_generated_inline_toc">
<h2 class="calibre3" id="UGI1-242b96fe68744506ab7fa88a1fee4602">Table of Contents</h2>

<ul class="calibre4">
<li class="calibre5"><a class="calibre6" href="part0002.html#1T141-242b96fe68744506ab7fa88a1fee4602">Chapter One</a></li>
<li class="calibre5"><a class="calibre6" href="part0003.html#2RHM1-242b96fe68744506ab7fa88a1fee4602">Chapter Two</a></li></ul>
</body>
</html>
Changing this line in the generated AZW3:
Code:
<link href="" rel="stylesheet" type="text/css"/>
to this:
Code:
<link href="../styles/0001.css" rel="stylesheet" type="text/css"/>
fixes the problem.
Phssthpok is offline   Reply With Quote
Old 10-01-2016, 01:25 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...316433a2127115
kovidgoyal is offline   Reply With Quote
Old 10-02-2016, 06:14 AM   #5
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by kovidgoyal View Post
Thanks.
Phssthpok is offline   Reply With Quote
Reply

Tags
azw3, css error, toc creation


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub 3 loses TOC when published to Kindle wmike Sigil 3 09-16-2016 05:25 AM
EPUB to MOBI/AZW3 loses formatting Siavahda Conversion 2 02-12-2014 03:35 PM
MOBI to EPUB Loses metadata TOC A. Bender Conversion 8 01-18-2013 05:10 AM
Epub to Epub loses TOC edbro Calibre 6 10-12-2010 04:24 PM
Opening ePub in Sigil breaks TOC and loses italics PatNY Sigil 15 08-25-2010 07:05 PM


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


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