-
Notifications
You must be signed in to change notification settings - Fork 1.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
Links in epub and epubcheck #766
Comments
I finally had opportunity to look closer into that. We indeed to not add the id when resolving the reference for epub using our 'no so great' md resolution. Here is what happens internally (FYI @yihui as you may have thoughts) We resolve reference for epub in
Part of the resolving, we correctly create a Lines 717 to 727 in e8dfa70
and this is used in HTML to create the anchor for link associated to the reference that we create in Lines 139 to 142 in feca9bc
However, for epub we never used the Lines 599 to 601 in e8dfa70
So indeed we don't add the Anyhow, I see several solutions :
Probably the first one will solve it and be the easiest - the two other would be better on the long run probably but they would be best done with a big rewrite of the processing (and not sure that will happen). We'll see. |
Additional note: It seems the issues is the same with table and figure - hence the several So it seems the first fix mentioned is the easiest for now. I think we have last one error of id due to section reference. It seems something related to pandoc as we generate <a href="javascript:void(0)" data-xuv2xq4gdswhm4kgz2zkee="{"name": "EPUB/text/ch002.xhtml", "frag": "methods"}">4</a> when inspecting the epub in calibre ebook viewer and obviously there is no element with This is an issue to fix differently probably (tracked in #890) |
@muschellij2 @N0rbert @tstratopoulos @jasonmosborne I believe PR #1426 should fix the issue of If you want to try it... On my side it remove the error from |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
By filing an issue to this repo, I promise that
xfun::session_info('bookdown')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/bookdown')
.I understand that my issue may be closed if I don't fulfill my promises.
This has been posted at rstudio/bookdown-demo#42, but probably better here. I will look into
pandoc
andbookdown
to see if I can diagnoseClone the Repo
This is a function to fix one simple
id
, which is hard coded.Simple epub checker function
The
epubcheck
R function will get the output fromepubcheck
.Then
num_errors
will count the number of errorsTest output
Here we see we get 5 errors from the result
Here we see we get only 4 errors (one fixed) after adding an
id
.Created on 2019-08-28 by the reprex package (v0.3.0)
Session info
The text was updated successfully, but these errors were encountered: