-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline links seem broken when converting de-drm epub to org file #8470
Comments
I think the issue is really in the EPUB reader and it can be shown with this simple example:
Here we get things like a reference to
in your org output to
and changing
to
and see if that fixes the link. That would be good for me to know. |
I made the changes to the example output but when clicking on the link I get this error: `No match for custom ID: hcp-nrsvuebib-0005.xhtml_otbooks`. In case it's relevant, I also re-generated the org from the original epub, made the changes you suggested, and still got the same error :( For a sanity check, I've pasted the changed example output just in case I've done it wrong somehow
```org
[[#hcp-nrsvuebib-0005.xhtml_otbooks][Old Testament Table of Contents]]
…--------------
[[#hcp-nrsvuebib-0010.xhtml_otpt][OLD TESTAMENT]]
--------------
[[#hcp-nrsvuebib-0011.xhtml_bk01][Genesis]]
[[#hcp-nrsvuebib-0011.xhtml_ch01001][1]] |
[[#hcp-nrsvuebib-0010.xhtml_ot][The Old Testament]]
| [[#hcp-nrsvuebib-0011.xhtml_bk01][Genesis]] | [[#hcp-nrsvuebib-0011.xhtml_bk01][Gen]] |
<<hcp-nrsvuebib-0010.xhtml>>
<<hcp-nrsvuebib-0010.xhtml_otpt>>
<<hcp-nrsvuebib-0010.xhtml_ot>>
[[#hcp-nrsvuebib-0005.xhtml_otbooks][The Old Testament]]
<<hcp-nrsvuebib-0011.xhtml>>
<<hcp-nrsvuebib-0011.xhtml_bk01>>
<<hcp-nrsvuebib-0011.xhtml_ch01001>>
[[#hcp-nrsvuebib-0005.xhtml_rbk01][Genesis]]
[[#hcp-nrsvuebib-0005.xhtml_rbk01][Genesis 1]]
Six Days of Creation and the Sabbath
1When God began to create[[#hcp-nrsvuebib-0013.xhtml_fn01001001-1][a]] the heavens and the earth, 2the earth was complete
<<hcp-nrsvuebib-0011.xhtml_ch01002>>
```
|
I'm copying the code from above since replies from email don't render as markdown:
|
The problem is that |
I did two naive find-replaces
|
I believe the issues here have been fixed by now (esp. the misplaced |
First off, I love pandoc, and every time I read its documentation I learn new tricks it can do :D Thank you for all your hard work!
Explain the problem
I realize this may not be a pandoc issue, there are several pieces of software involved in going from DRMed epub file to org file, and any one of them may be causing this problem. But the reason I suspect pandoc may be causing the problem is that the epub file looks and works fine in Apple Books, Emacs, and Calibre, so I believe the input file is fine. The org file also looks fine, but does not work fine, ie clicking on links doesn't work. So it seems to me, perhaps naively, that pandoc isn't quite creating the org file correctly.
I may be missing a command line flag or something obvious, but I spent a couple of hours reading the docs and trying to figure it out so it isn't obvious to me 😅
What Happened
In Emacs, when pressing RET on a link, I get this error output
No match for custom ID: hcp-nrsvuebib-0010.xhtml#otpt
.What Did I Expect to Happen
I expected to jump to the link
Inputs
My input file is NRSVue, Holy Bible. If you need a copy to reproduce this let me know and I can provide. I used Calibre with DeACSM and DeDRM plugins to remove DRM.
Command Line Inputs
Below are various commands I used, all producing the same issue, copied and pasted from my terminal. I was grasping at straws to try to solve the problem, and read through nearly all of the man pages but didn't see anything that might help.
$ pandoc -s NRSVue,\ Holy\ Bible\ -\ Zondervan,.epub --from=epub --to=org --output=nrsvue.org
$ pandoc -s NRSVue,\ Holy\ Bible\ -\ Zondervan,.epub --from=epub --to=org --output=nrsvue.org --file-scope
$ pandoc -s NRSVue,\ Holy\ Bible\ -\ Zondervan,.epub --from=epub --to=org --output=nrsvue.org --file-scope --normalize
$ pandoc -s NRSVue,\ Holy\ Bible\ -\ Zondervan,.epub --from=epub --to=org --output=nrsvue.org --file-scope --extract-media=./
$ pandoc -s NRSVue,\ Holy\ Bible\ -\ Zondervan,.epub --from=epub --to=org --output=nrsvue.org --toc
$ pandoc -s NRSVue,\ Holy\ Bible\ -\ Zondervan,.epub --from=epub --to=org --output=nrsvue.org --reference-links
Minimal Output Example
Details
Software versions
The text was updated successfully, but these errors were encountered: