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

[WARNING] Could not convert TeX math y = \beta_0 + \sum_{i=1}^{999}\beta_i x_i, rendering as TeX #3432

Closed
4 tasks done
XiangyunHuang opened this issue Nov 23, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@XiangyunHuang
Copy link

Bug description

LaTeX math can't be rendered when output is epub format.

Step 1. Create a Quarto Book followed by RStudio IDE's guides.

Step 2. Insert some math to index.qmd, here are some examples.

$y = \beta_0 + \sum_{i=1}^{999}\beta_i x_i$

$$
S_k = \sum_{x=0}^{k} p_x
$$

$$
p_x = \binom{n}{x}p^x(1-p)^{n-x}, \quad x = 0,1,\cdots,n
$$

Step 3. then Render EPUB, and we will see

Output from Render Book

截屏2022-11-23 10 13 00

Output from EPUB Book

截屏2022-11-23 10 14 30

My session info

I use Quarto 1.2.269. more info about my session, please see

sessionInfo(package = c("knitr","rmarkdown"))
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Ventura 13.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
character(0)

other attached packages:
[1] knitr_1.41     rmarkdown_2.18

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9      grDevices_4.2.2 ps_1.7.2        digest_0.6.30   later_1.3.0     jsonlite_1.8.3 
 [7] evaluate_0.18   datasets_4.2.2  rlang_1.0.6     utils_4.2.2     cli_3.4.1       rstudioapi_0.14
[13] graphics_4.2.2  base_4.2.2      tools_4.2.2     yaml_2.3.6      xfun_0.35       fastmap_1.1.0  
[19] compiler_4.2.2  processx_3.8.0  stats_4.2.2     htmltools_0.5.3 methods_4.2.2   quarto_1.2 

RStudio 2022.07.2+576 "Spotted Wakerobin" Release (e7373ef832b49b2a9b88162cfe7eac5f22c40b34, 2022-09-06) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 13_0_1) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
@XiangyunHuang
Copy link
Author

The math can't be rendered either when I put the math into the Bookdown Book. I guess the root cause is from Pandoc or EPUB. Am I right?

@bwelman
Copy link
Contributor

bwelman commented Nov 25, 2022

With EPUB3, MathML has become part of the EPUB standard. So use in _quarto.yml

format:
  epub:
    html-math-method: mathml

@XiangyunHuang
Copy link
Author

@bwelman Thanks.

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

2 participants