Skip to content
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

Markdown Cross Reference links work in gitbook but NOT in ePub book #1399

Closed
tstratopoulos opened this issue Jan 7, 2023 · 12 comments
Closed
Labels
bug an unexpected problem or unintended behavior

Comments

@tstratopoulos
Copy link

tstratopoulos commented Jan 7, 2023

I am writing a book using markdown and I have been using cross reference links to other chapters, figures, sections, etc. All the cross reference links work fine in the gitbook version, but they do NOT work with the ePub_book. In the ePub version all links redirect to the beginning of each chapter. Interestingly, links to citations work fine on both versions.
I have reviewed/replaced the links multiple times and I can't find anything wrong. I have been searching the web and been reading available manuals and I have not been able to find a solution to this problem. I have looked carefully for error messages and there is nothing that I can see. My R/Rstudio/packages are all updated.

I have posted my question on StackOverflow but I did not get answers. I submitted my question to the RStudio community and the suggestion that I received was to create a minimal example and open an issue.

You can access my minimal example (a couple of chapters) from the following dropbox link: minimalExample

Thanks!

TCS

@cderv
Copy link
Collaborator

cderv commented Jan 9, 2023

Thanks for the example. I'll have a look.

Is this related somehow to #766 maybe ? It seems we have (or Pandoc) issues with some links

@cderv cderv added the bug an unexpected problem or unintended behavior label Jan 9, 2023
@tstratopoulos
Copy link
Author

Thanks for the suggestion. To be honest, I'm not 100% clear about the issue reported in #766. In any case, I noticed that they have some error messages. In my case I don't seem to have any error messages when I look at my log file.

@cderv
Copy link
Collaborator

cderv commented Jan 9, 2023

They have error message when they run epubcheck on their file.

If you have not done it, you could try and probably get similar error.

Anyway, I need to find time to get to the bottom of it, and try fix this. Not sure if it is us or pandoc.

Thanks!

@jasonmosborne
Copy link

I wrote about this issue and the solution to it in the RStudio community on 09/21/22 (see link below):

https://community.rstudio.com/t/issue-bookdown-epub-book-renders-epub-that-fails-epubcheck-v-4-2-6-with-error-rsc-012-and-error-rsc-005/147973

Not sure if this error has been resolved in the latest bookdown?

@jasonmosborne
Copy link

jasonmosborne commented Mar 17, 2023 via email

@tstratopoulos
Copy link
Author

Hi Jason -
I took down my earlier comment when I realized that I had not reviewed the entire thread.

I have used your suggestions to remove out.width from figures, resolving the first error message (RSC-005). Same as you, I have no way of adjusting the size of the figures.

I have read your instructions on how to deal with the second error message (RSC-012) and I'm having a hard time implementing your suggestion. For starters, I don't know how you access the files that make the ePub file (e.g., where did you find the file content.opf?). In your post, you say that "... Since I understand the problem and fix then the solution will be a simple "find and replace" on the chapter .xhtml files." But I don't know where to find these .xhtml files.

Thanks
Theo

@jasonmosborne
Copy link

jasonmosborne commented Mar 17, 2023 via email

@tstratopoulos
Copy link
Author

Thanks, Jason!
I am hoping that your changes will be implemented. They will certainly save a lot of time. Trying to do this manually takes forever.
Unfortunately, given the nature of my text (analysis of data using R) I don't think that I can use inDesign.
Theo

@jasonmosborne
Copy link

jasonmosborne commented Mar 20, 2023 via email

@cderv
Copy link
Collaborator

cderv commented May 4, 2023

Duplicate of #766

@cderv cderv marked this as a duplicate of #766 May 4, 2023
@cderv
Copy link
Collaborator

cderv commented May 4, 2023

Closing in favor of #766 where I commented #766 (comment)

This is indeed the same issue and thanks to you all I have now identified in our processing what is happening.

@cderv cderv closed this as completed May 4, 2023
@cderv cderv closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2023
Copy link

github-actions bot commented Nov 1, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
Archived in project
Development

No branches or pull requests

3 participants