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

Preserving Within Document Links #74

Open
michaeltopper1 opened this issue Oct 13, 2023 · 1 comment
Open

Preserving Within Document Links #74

michaeltopper1 opened this issue Oct 13, 2023 · 1 comment

Comments

@michaeltopper1
Copy link

First of all, fantastic package.

Second, I wanted to ask if there is a solution for preserving links to jump between slides in a xaringan presentation when rendering to PDF. My dirty workaround at the moment is to export to pdf, and then insert the links myself using Latex, which is unfortunately time-consuming.

Is this possible, and could it be in the pipeline for future releases?

@gadenbuie
Copy link
Collaborator

I don't think it's possible, sorry. Or at least, it's not something we can do much about. Rendering to PDF is really "printing from Chrome to PDF", so we're limited by two things:

  • The printing to PDF features supported by Chrome
  • The CSS styles that apply to the document for print media

This gives us (renderthis or xaringan devs) only a few places to affect the outcome:

  1. Configuring our usage to Chrome to enable/disable/configure features.
  2. If there is a mode in which PDF printing via Chrome allows internal links to work, we could use some JavaScript to rewrite internal links in a way that's more likely to work in PDF mode. (We'd need evidence of the feasibility to pursue this approach.)
  3. Post-processing the PDF in some way. (We don't have much experience here.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants