-
Notifications
You must be signed in to change notification settings - Fork 337
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
Math rendering for LaTeX arrays and equation number in vignettes #2772
Comments
What's in your template:
math-rendering: mathjax |
also see @hadley's suggestion in one of these mathy issues to move to quarto, it will be the supported path moving forward (over bookdown, at least). |
The strategy here #2704 (comment) gives you the nicest math rendering. I submitted a PR: friendly/matlib#61. Unfortunately equation cross-references don't appear to work yet. |
Thanks so very much for the PR to use We have quite a few vignettes here, and it seems like a lot of work to convert to Quarto, even though that might be the way for the future. |
Closing this issue as you have a good workaround. We'll hopefully improve math support in pkgdown in the future. |
[My env: R version 4.4.1, RStudio 2023.06.1, pkgdown 2.1.0]
This issue is similar to #2739 in that it uses
bookdown::html_document2
I'm writing a vignette for the
matlib
package on our new facilities for creating LaTeX matrices & matrix equations in R. It creates more complex LaTeX than usual cases, but these should be handled bypkgdown
.The vignette in question has this YAML header
(trying to use
mathjax
rather thanmathml
.There are two problems with what
pkgdown
produces compared to what I get when I just useknitr
on the vignette.Rmd
file:(1) Equation numbers don't appear and cannot be referenced
One example uses our functions as so to produce two equations with
\label{}
sThis produces the LaTeX code:
From
knitr
, this appears correctly as below, and the equations can be referenced with@ref(eq:svd)
From
pkgdown
, I get:(2) We introduce methods for partitioned matrices:
This generates the LaTeX code that uses a
\begin{array} ... \end{array}
environment with vertical & horizontal rules.In
knitr
, this works fine:But from
pkgdown
all I get is this:Are there any
pkgdown
settings I could try to change that might make these work?The text was updated successfully, but these errors were encountered: