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 09-26-2013, 12:25 PM   #1
gknitz
Junior Member
gknitz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: Nook HD+
HTML Page to EPUB Named Anchor Problem

I am trying to convert an HTML page to EPUB using Calibre version 1.5.
The conversion works but all of the named anchors in the ebook Table of Contents link back to the web site.
How do I tell Calibre to convert the named anchors to go to the proper ebook page?
This is the HTML page I am trying to convert, http://www.w3.org/TR/html5/single-page.html.
TIA.
gknitz is offline   Reply With Quote
Old 09-26-2013, 01:13 PM   #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: 45,198
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Works for me, see attached.
Attached Files
File Type: epub single-page.epub (1.18 MB, 353 views)
kovidgoyal is offline   Reply With Quote
Old 09-27-2013, 01:37 AM   #3
gknitz
Junior Member
gknitz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: Nook HD+
Interesting ....
On my Nook HD+, when I try to view pages 9-24 the Reader crashes.
On the PC using Nook for PC the program crashes when I try to view the book?
gknitz is offline   Reply With Quote
Old 09-27-2013, 09:28 AM   #4
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
Downloading Kovid's linked file directly to my Nexus 7 2013:
  • I paged through the first couple of sections (Introduction through to the end of A Quick Introduction to HTML) without problem.
  • Using the internal ToC (not Moon's) I was able to use the links to go directly to various sections.
  • I also tapped on a few of the inline links and those took me elsewheres in the ebook.
These tests were done using Moon+ Reader Pro.


Gknitz,
Perhaps the issue is with the Nook reader in the hardware/software? I would suggest trying the book in another reader to see if the same thing happens on both the Nook and PC - if possible.

Oh, and were you trying Kovid's linked file or your own? You would need to try both - just in case there is a difference in the conversion settings used.

Last edited by Sabardeyn; 09-27-2013 at 09:39 AM.
Sabardeyn is offline   Reply With Quote
Old 09-27-2013, 12:39 PM   #5
gknitz
Junior Member
gknitz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: Nook HD+
The Nook HD+ software is up todate but I purchased several PDF readers which may have modified the Reader App. Thanks, I'll do some research!!!
gknitz is offline   Reply With Quote
Old 09-30-2013, 01:32 PM   #6
gknitz
Junior Member
gknitz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: Nook HD+
Is there something I need to set in the configuration to get the named anchors to link within the file?
I have attached a copy of the file I generated on a PC and the links in the HTML TOC still go to the live website???
TIA.

Gary.
Attached Files
File Type: epub HTML5 - W3C.epub (2.14 MB, 301 views)
gknitz is offline   Reply With Quote
Old 09-30-2013, 10:45 PM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by gknitz View Post
Is there something I need to set in the configuration to get the named anchors to link within the file?
I have attached a copy of the file I generated on a PC and the links in the HTML TOC still go to the live website???
It has nothing to do with the conversion and everything to do with how you saved the web page. Using Firefox if you save page as Web Page, complete you get links to the web. If you save page as Web Page, HTML only you get local drive links within the document.

Last edited by DoctorOhh; 09-30-2013 at 10:47 PM.
DoctorOhh is offline   Reply With Quote
Old 10-01-2013, 02:07 AM   #8
gknitz
Junior Member
gknitz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: Nook HD+
Then you would lose all of the images and any other links (such as styles) which could be important in a specification or any HTML page. So you need to save it as a Web Page, Complete and then tell Calibre to remove the fully qualified URLs. Maybe through the "search and replace" ???
gknitz is offline   Reply With Quote
Old 10-01-2013, 03:28 AM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by gknitz View Post
Then you would lose all of the images and any other links (such as styles) which could be important in a specification or any HTML page. So you need to save it as a Web Page, Complete and then tell Calibre to remove the fully qualified URLs. Maybe through the "search and replace" ???
I was wrong. Web Page, Complete or Web Page, HTML Only still saves the file with local disk links in the TOC.

So this is not a conversion issue.

I just did a Save page as Web Page, Complete and all of the links in the TOC were local disk links. I then converted the book and the resultant epub has external links in it because they are meant to point to external web sites, but everything in the TOC points to locations in the epub itself.

How are you managing to save the page without the TOC being local disk links?
Attached Files
File Type: epub HTML5 - Unknown.epub (2.29 MB, 317 views)

Last edited by DoctorOhh; 10-01-2013 at 03:52 AM.
DoctorOhh is offline   Reply With Quote
Old 10-01-2013, 12:21 PM   #10
gknitz
Junior Member
gknitz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: Nook HD+
Interesting ....
Turns out I use Chrome most of the time, so I saved it in Chrome


This is the Introduction link in FireFox for Web Page, Complete
<a href="#introduction"><span class="secno">1 </span>Introduction</a>

This is the Introduction link in Chrome for Web Page, Complete
<a href="http://www.w3.org/TR/html5/introduction.html#introduction"><span class="secno">1 </span>Introduction</a>

So, it looks like it's a Browser issue, WOW!
Thanks for your help

Also, how did you setup the configuration so the EPUB TOC has the expanding arrow ">" that opens up to more TOC selections.
Thanks again.

Gary.

Last edited by gknitz; 10-01-2013 at 06:25 PM.
gknitz is offline   Reply With Quote
Old 10-01-2013, 11:46 PM   #11
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by gknitz View Post
So, it looks like it's a Browser issue, WOW!
Thanks for your help
You're Welcome.

Quote:
Originally Posted by gknitz View Post
Also, how did you setup the configuration so the EPUB TOC has the expanding arrow ">" that opens up to more TOC selections.
The easiest way (which is not what I did) is to convert the book then use the Edit TOC tool built into calibre. Select the book entry, right click and select Edit TOC and choose Create TOC from all headings.
DoctorOhh is offline   Reply With Quote
Old 10-02-2013, 11:00 PM   #12
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: 45,198
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
To get a multi-level ToC just use the level 1-3 toc xpath settings in the conversion section:

Level 1:
//h:h2

Level 2:
//h:h3

Level 3:
//h:h4
kovidgoyal is offline   Reply With Quote
Reply

Tags
anchor, calibre, epub, html, named anchor


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html to Epub problem: PRS950 resets on 2nd page. xtracto Conversion 8 10-05-2011 08:54 AM
HTML Anchor in XHTML arreke Sigil 3 12-27-2010 01:28 PM
Problem with html->epub: reader can't page through file horseflesh Calibre 5 10-20-2009 12:22 AM
multi-page HTML with images to ePub or LRF Nvidiot Workshop 19 07-13-2009 07:20 PM
Problem converting a webpage html to LRF, what program should I use? Long page turns seajewel Workshop 1 08-01-2008 06:32 AM


All times are GMT -4. The time now is 02:39 PM.


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