Skip to content

Not possible use a newer version of Mathjax #1364

Open
@piiskop

Description

@piiskop

MathJax has some packages optional. One of them is gensymb that can't be loaded via \require. If i still do \require{gensymb} then i see the message in the browser's console that says:

GET https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/extensions/TeX/gensymb.js?V=2.7.9 net::ERR_ABORTED 404

First thing to notice here is that an outdated version of MathJax will be referenced automatically. The current version should be 3.

The second thing to notice is that gensymb.js isn't available at the given address. So i followed the instruction at MathJax's homepage by adding these two snippets into my JS file that i use for adding elements to the page and there was no change in the outcome. i also have a current address inside _output.yml:

bookdown::bs4_book:
  css: style.css
  includes:
    in_header: js.html
  repo: https://github.com/piiskop/manual-for-rstudio
  math_method: 
    engine: mathjax
    url: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js

That current address won't be used as i see in the console that it still tries to access the version 2.7.9.

As here is requested the session info i add it:

xfun::session_info('bookdown')

R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS, RStudio 2022.2.2.485

Locale:
LC_CTYPE=et_EE.UTF-8 LC_NUMERIC=C LC_TIME=et_EE.UTF-8 LC_COLLATE=et_EE.UTF-8 LC_MONETARY=et_EE.UTF-8 LC_MESSAGES=et_EE.UTF-8 LC_PAPER=et_EE.UTF-8
LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=et_EE.UTF-8 LC_IDENTIFICATION=C

Package version:
base64enc_0.1.3 bookdown_0.27.3 bslib_0.4.0 cachem_1.0.6 digest_0.6.29 evaluate_0.15 fastmap_1.1.0 fs_1.5.2 glue_1.6.2 graphics_4.2.1 grDevices_4.2.1 highr_0.9
htmltools_0.5.3 jquerylib_0.1.4 jsonlite_1.8.0 knitr_1.39 magrittr_2.0.3 memoise_2.0.1 methods_4.2.1 R6_2.5.1 rappdirs_0.3.3 rlang_1.0.4 rmarkdown_2.14 sass_0.4.2
stats_4.2.1 stringi_1.7.8 stringr_1.4.0 tinytex_0.40 tools_4.2.1 utils_4.2.1 xfun_0.31 yaml_2.3.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions