Skip to content

renderthis::to_pdf() throw error for HTML slides using mathjax #75

Open
@kevinrue

Description

Hello.

Thanks a lot for this package which I've been using happily for several years.

For some months now, I've been having an issue with some (but not all) symbols in LaTeX equations.

Initially, it seemed to be a quarto issue.

For instance, the following:

## The normal distribution

### Notation

$${\mathcal{N}}(\mu ,\sigma^{2})$$

was producing

image

Which led me to the fix here

format: 
  revealjs:
    html-math-method: mathjax
image

But now, that the LaTeX equation displays correctly in the HTML presentation, renderthis::to_pdf() throw the following error and fails to produce the PDF.

> renderthis::to_pdf("index.cluster.html")
Warning: A runtime exception has occured while executing JavaScript
  Runtime exception message:
    TypeError: Cannot read properties of undefined (reading 'Config')
    at http://127.0.0.1:5310/index.cluster_files/libs/revealjs/plugin/math/math.js:1:28635
    at HTMLScriptElement.i (http://127.0.0.1:5310/index.cluster_files/libs/revealjs/plugin/math/math.js:1:28502)

Note that weirdly enough, if I click the 'Print' button in the RStudio 'Presentation' tab, and manually (not programmatically) print it from there, the PDF contains the equation formatted properly.

image

Any suggestion?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions