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

Internal links to chapters not following the "Chapter-#" title format result are not clickable in PDF exports #1141

Open
jocelynpb2 opened this issue Dec 13, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@jocelynpb2
Copy link

jocelynpb2 commented Dec 13, 2022

Description

In chapters titled “Chapter-#”, the PDF export results in working internal links to chapters.

If the chapter title does not take the form of “Chapter-#”, for example https://integrations.pressbooks.network/linksinpdf/chapter/3rd-chapter/, the PDF exports internal links that cannot be clicked on.

Web versions and EPUB do not appear to be affected.

Steps to Reproduce

  1. In a book, create a chapter with a title that does not follow the form of “Chapter-#” (for example, “2nd Chapter” or “2 Chapter”
  2. In another chapter, create a link to the chapter you created with the title mentioned above.
  3. Using the Malala, McLuhan, Lewis, or Leonard theme, export the book to PDF.
  4. Open PDF and attempt to click on link to “2nd Chapter”.
  5. Go back to the editor and add a link to a chapter that follows the form of “Chapter-#”.
  6. Export to PDF and successfully click on new link.

Expected behavior: Clickable link in PDF export.

Actual behavior: Links to chapters in a book that do not follow the form "Chapter-#" are not clickable in PDF export.

@jocelynpb2 jocelynpb2 added the bug Something isn't working label Dec 13, 2022
@tw77
Copy link
Contributor

tw77 commented Dec 14, 2022

From testing in bug scrub, it appears this is caused by the path in the chapter URL beginning with a number, e.g. '/2nd-chapter' or https://pressbooks.lib.vt.edu/introearthscience/chapter/2-plate-tectonics/

A workaround is updating the chapter permalink so its path does not begin with a number and linking to this updated URL.

@SteelWagstaff
Copy link
Member

Is this identical to pressbooks/pressbooks#3016?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants