![]() |
#1 | |
Connoisseur
![]() Posts: 51
Karma: 10
Join Date: Feb 2012
Device: none
|
How to export indexes from indesign to epub
Hi all,
I am involved in a project that involves exporting to epub 15-20 books of about 500 pages each. All these books have large and essential indexes that need to make it into the epub, preferably linked. As the indexes were created by hand, and outside of indesign, that program does not know how to make them active. It would be really nice if indesign knew how to link page numbers, which it self-creates, to a list of page numbers in the same document. Sadly, it does not. As one of the source files was not in indesign, but in QuarkXpress, and in a version which I do not have, I have experimented with loading the PDF into Acrobat and exporting it to a Word file. This gives me the page numbers, which are carried with all the other header and footer stuff into the word file. I then did the following:
It is definitely a half-way solution, but one that can be simplified to some extent within Sigil, by using the Saved Searches functionality. The whole index thing took me about two hours, from start to finish, for a 4k entry index. One book down, fourteen (or more) to go. I am posting this as a hack, but in this community it is likely there are minds that can spot weaknesses in my approach. Feel free to shoot holes, and help me out for the remainder of the series. ------ As an edit: for those who come after, looking for a solution, there are valuable comments in the thread. Outstanding ones from my perspective have been the realization that there are indesign plugins that export the page numbers into epub, here: Quote:
https://www.id-extras.com/products/liveindex/ Last edited by Ryn; 12-05-2020 at 01:22 PM. Reason: Added links to indesign scripts |
|
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Before you get impatient, Jon, and unilaterally declare this as irrelevant to Sigil... don't. I've chosen to leave it here, as there could be Sigil-specific ideas presented for improvement.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
FootnoteLinker PageList Incremental IDs Also check out all other Sigil plugins. |
|
![]() |
![]() |
![]() |
#4 | ||||||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
And Linked Indexes, to do them properly, requires a massive amount of manual intervention/cleanup. Over the years, Me + Hitch have written an enormous amount on these two topics. See some of the latest discussion from earlier this year:
(And if you want to know more about RPNs + Indexes in ebooks, read/follow all those links to all the other threads where we cover every pro/con from every angle.) Quote:
Back in 2016, David Kudler asked a similar question in "Getting InDesign to export pagelists to ePub3 (reflowable)". I pointed to a 2015 article written by Joshua Tallent "How to Add a page-list to an EPUB" (now dead, so here's an Archive.org backup) + a 2015 article from EPUBSecrets, "Page List: All the Cool Ebook Developers Are Doing It". To my knowledge, not much has really changed since. Many of those methods require you to put some sort of tag/character at the end of each page, then convert that using some outside tool, then manually link all the Index links. Just a few months ago, I wrote one such method in "Create index on epub from printed book". Quote:
Quote:
Then you could potentially use the method I pointed out above in "Create index on epub from printed book", then use Doitsu's "Incremental IDs plugin": Chapter01: Code:
<h1>Chapter 1</h1> <p>This is the beginning.</p> <p class="pagenum">1</p> <--- Footer exported from the original document. Code:
<h1>Chapter 1</h1> <p>This is the beginning.</p> <span epub:type="pagebreak" id="page1" title="1"/> Code:
<span epub:type="pagebreak" id="page1" title="1"/> <h1>Chapter 1</h1> <p>This is the beginning.</p> Quote:
Although that's usually a lot of extra cruft you usually have to clean up and sift through. Depending on the document, it may be best to trash all the header/footers (or not export them at all), then renumber from scratch using some other tools. Quote:
1. You merge the entire book into one or two monolithic XHTML file/s. Let's call them:
2. You can then add your <a>s around all your page numbers in your Index: Index (Before): Code:
<p>Dogs, 1</p> Code:
<p>Dogs, <a id="index-dog-1" href="../Text/merged.xhtml#page1">1</a></p> Code:
<p>Dogs, <a id="index-dog-1" href="../Text/Chapter01.xhtml#page1">1</a></p> Quote:
Forms like "381–385" vs. "381–5" OR "385n10". Indexes are extremely information dense and come in many variations, and usually it's not just a simple page number. I went into some details in the "Create Index [...]" topic above. (Plus definitely in the famous "Real Page Numbers" topics.) Quote:
![]() And once you linkify the Index, just be careful of the ~300KB soft filesize limit for EPUB. Sometimes the Indexes get so large, you have to split them into 2 or more files. Quote:
I discussed a lot of that back in 2019, "Workflow for simultaneous EPUB and PDF production?" Quote:
![]() It would require the Indexer to have access to the actual source files + the perfect mix of skills that very few are even equipped for. Page numbers and/or Chap.Subchap are about as good as you're going to get. Side Note: For just a piece of that discussion, look at my 2016 Post #129 from "Sick of Amazon Kindle books without Page Numbers...". I came up with this concept of "Format-Specific" and "Format-Neutral", and I still think it's a genius analysis. ![]() Last edited by Tex2002ans; 11-20-2020 at 01:18 PM. |
||||||||||
![]() |
![]() |
![]() |
#5 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
INDEXES!
"Niagara Falls, slowly I turn, step-by-step..." OH, NEVER MIND. I was trying to put the Abbott & Costello Niagra Falls video in here. If you want to see it, go here: https://www.youtube.com/watch?v=8KpsUlvzbkk Hitch, frequent Index Victim Last edited by Hitch; 11-20-2020 at 02:05 PM. Reason: Fixed the video. I'm a vidiot. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,586
Karma: 168431235
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,000
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
Connoisseur
![]() Posts: 51
Karma: 10
Join Date: Feb 2012
Device: none
|
Quote:
First of all, thanks for your extensive reply. Second, I'm not at all interested in having parity between book page numbers and e-book page numbers - RPNs as you call them. I have tried implementing such things from time to time, but have found reader implementation spotty, and can see little added value for either reader or publisher. You mention some alternatives to the steps I have used; I will investigate them further when I have occasion to do so - it's always good to have multiple paths home ![]() As the rest of this project consists of indesign files, and I generally don't export those to epub page-by-page, I was considering working from the PDFs that indesign outputs. Converting them to word docs with acrobat, and then exporting those to epub using oowriter seems the way to go to easily get the page numbers. It remains a hassle to clean all the cruft out, though. I's welcome a way to do things more easily through indesign, perhaps using the method you mention where each page gets a special character which Sigil can replace with page-break tags, and then to use the Sigil plugin for serialized ids you mention. As I never use indesign for anything except making epub exports, I would welcome some input as to how to go about this in indesign. It's not my favorite program, although my limited experiences with quark have managed to knock the adobe product off the utmost bottom rank. |
|
![]() |
![]() |
![]() |
#10 | ||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
No problem. (I'm slightly famous around here for that.
![]() Quote:
Remember, a book isn't just pure text, the underlying formatting is just as important. ![]() PDF is one of the worst input formats there is, and you'll lose much of the original markup + introduce errors and other junk while converting to any other formats. It's almost always better to always go from: Source -> EPUB (Directly) than to do: Source -> PDF -> Word -> EPUB where each step in the chain may introduce more issues. * * * If InDesign File Is Using Styles Great. You're going to have an easier job. In InDesign, there's such a thing as Style Mapping:
If InDesign File Is NOT Using Styles Prepare for pain... ![]() (This is the more likely scenario, since 99%+ of people who use InDesign/Word/LibreOffice don't know or use Styles when designing documents.) You'll have to manually clean up all the code, and every single book is going to generate wildly different cruft. And boy, oh boy, does InDesign love to generate iBooks-friendly bloat in their CSS. Side Note: On Styles... I've also written about Why/How Styles are so important, most recently:
I think this is #1 the most important step there can be. Clean input helps EVERY single step down the line. If people designed their documents with Styles+Accessibility in mind first, it would make everyone's life much easier. ![]() (While steps between programs are different, the Styles concept is similar across all.) Quote:
~100% of the InDesign work I get is... directly formatted... so it's a mess. I've only met one designer who actually used InDesign with proper Styles. Quote:
If not using RPNs, then what's the clickable links you're trying to accomplish in the Index? Are you trying to do a: Code:
Cats, [1], [2], [3] Dogs, [1], [2], [3] * * * But RPNs do serve some purpose, especially for Accessibility reasons (blind readers) + citations, book clubs, etc. And for Linked Indexes, page #s seem to make a lot more sense. Quote:
In your favorite search engine, type: Code:
many-to-one Hitch site:mobileread.com Last edited by Tex2002ans; 11-22-2020 at 01:28 AM. |
||||
![]() |
![]() |
![]() |
#11 |
Connoisseur
![]() Posts: 51
Karma: 10
Join Date: Feb 2012
Device: none
|
Hi Tex. Apologies for my late answer. Somehow, I didn't get notified of your reply, and as I do not visit MR every day, here we are.
I do use indesign for limited things like exporting files to epub, and am familiar with the mechanics and best practices of that route. Of course, it is often way easier to go the direct route than through PDF. Perhaps my question was not as clear as it could have been. What I really wanted to know was: how do you export the page numbers in an indesign export to epub? It's not an option in the export dialogue box, nor is it something I can easily put together using indesign's byzantine search module. Is there another way? It would be nice, seeing as most of the volumes in this project are in indesign. The reason I went the PDF route in the OP was bc that particular volume was created in some quark version I do not possess. |
![]() |
![]() |
![]() |
#12 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
![]() |
![]() |
![]() |
#13 | |
Connoisseur
![]() Posts: 51
Karma: 10
Join Date: Feb 2012
Device: none
|
Quote:
Edit: not one index in fact but dozens, in a big project. |
|
![]() |
![]() |
![]() |
#14 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 808
Karma: 2416112
Join Date: Jan 2017
Location: Poland
Device: Various
|
I'm not sure if this is exactly what you need, but I will post a few links that may lead you to come up with your own solution.
http://epubsecrets.com/why-i-use-page-list-and-how.php http://epubsecrets.com/page-list-all...e-doing-it.php The link to the script is dead, so I'm listing it from web archive: http://web.archive.org/web/201912181...orohikoscripts You can write directly to Laura, but I have a feeling you'd better check out the "EPUB Accessibility Using InDesign" video tutorial (available from Lynda.com or Linkedin), which AFAIK includes the PageStaker and EPUBOgrify script. The latter is not so important anyway, because it is a simple change that can be done in Sigil. |
![]() |
![]() |
![]() |
#15 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
You don't. There isn't any easy or magic or automatic way to export the RPNs (Real Page Numbers). You create them manually. You open up the ePUB; you open up the PDF. You find the first page-end. You search for that bit of text--typically, 5-10 characters will do. When you find it, you create the anchor, like P01, P02, etc. Then, after all the anchors are done: then you write a script if you're lucky--or do it manually if you aren't--that links all the index entries that go to page 1, to P01, all the index entries that go to P02, to 2 and so forth. That's it. Knowing Tex, he has some mad coding that will do some of this more easily than I've described, but that's the fundamental process, right there. And it's entirely possible that there are Sigil or Calibre addins that already do the 2nd part, the linking part, that I don't know about, as my band of Merry Minions use our internal, proprietary clips/programs to do that. That's the basic procedure. Hitch |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
InDesign CC 2017 epub export question | ralphiedee | ePub | 5 | 11-24-2016 09:02 PM |
Export to ePub from InDesign CS5 | gardefjord | ePub | 42 | 10-29-2011 10:42 AM |
InDesign CS 5.5 Epub Export Problems | SamL | ePub | 1 | 09-16-2011 07:06 PM |
InDesign export as ePub? | Alda | General Discussions | 3 | 01-24-2011 12:59 PM |
EPUB Expert Needed: Cant properly export epub from InDesign | crottmann | ePub | 17 | 08-27-2010 10:23 AM |