Besides using a real ebook editor like Sigil, there is an easier way to do it.
Calibre has a very useful additional plugin called EpubSplit, that with a simple interface let's you select the single .html files inside the .epub and create a new ebook just from them; after the process is also possible to edit the metadata of the newly created ebook.
Is it possible to use a full fledged editor like Sigil. It works with .epub files, but if needed, before the editing, it's possible to use Calibre to convert the source ebook into .epub, then reconvert it after the job.
Anyway, for a faster and easier solution, Calibre has a very useful additional plugin called EpubMerge, that, as the name imply, can merge ...
Well, it turned out that Insert->Link works even across files contained in the epub (and if it was really necessary I could use Insert->Anchor for inserting an anchor which I may use later). It is also possible to select some text, so that the link corresponds to the section selected.
Assuming all files and only those files are in one directory.
For PDF files:
pdftk *.pdf cat output ../combined.pdf
djvm -create *.djvu ../combined.djvu
Of course you would have to resolve metadata (author of a combined document) yourself.
There is some hope on the horizon for the many users of EPUB3 files¹
masayoshi takahashi has presented a relatively small pull request with changes for the Sigil source base that does prevent Sigil from breaking the OPF file when saving EPUB 3.
Hopefully the next Sigil release will incorporate these. In the mean time you can of course compile your own Sigil ...
Assuming that new chapters/sections begin on a new page:
For a PDF files:
pdftk in.pdf cat 1 2 5-8 output out.pdf
gives you page 1,2,5,6,7,8.
For a DjVu file, for each page with number N do:
djvused in.djvu -e "select N; save-page-with part-N.pdf"
and then combine with:
djvm part-*.djvu out.djvu
assuming you have padded N with leading zeros to the ...
Personally, I stay away from Sigil and Calibre precisely because they break files and don't show you exactly what they're doing—unless a tool lets me modify all the navigational files directly, I'm not going to trust that it's doing things correctly. I use Notepad++ or Geany for epub editing. If you must use an editor, try the Blue Griffon Epub Edition ...
After doing more research, I've learned that Calibre allows subfolders in the Images folder but Sigil doesn't. There are some suggestions that you can tweak Sigil to allow subfolders, but I haven't verified that it can be done.
SIGIL is probably not your best tool for creating static HTML files although it's not impossible.
The main goal of sigil is to produce an epub file, and to read an epub in the browser, you'd need to install a special extension (Readium).
If you get down to it, epubs solve a navigation problem -- of flipping between chapters and of creating a TOC.
Sigil's regex engine is kind of fussy; I'm not sure that the anonymous answer above would work.
I answered this on Quora, but I'll post the answer again here, because it seems like that would be helpful:
Ah. Let me guess. You're converting from a PDF. You have my sympathy. :-)
I've done this. Here's the search expression I used:
I don't know a lot about sigil, but I have made a book with footnotes, and I have been using an xml editor with docbook to generate an epub with footnotes. Works well.
Unless you're already fluent in docbook, I suspect you wouldn't want to learn that.
Adobe InDesign already has a functionality to convert footnotes into epub http://helpx.adobe.com/...
Reposting an edit from above.
Ah, I managed to figure out the solution. So basically, the opf referenced the font as Fonts/GoudyOldstyle-Regular.otf, but my @font-face referenced ../Fonts/GoudyOldStyle-Regular.otf. So basically the name was syntactically correct enough for the font to appear, but the capitalization confused the validator. As soon as I ...