mathjax / mathjax/MathJax

Trouble setting fontURL in custom component

Open
#3,039 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Replace the text below with the details of the issue you are facing.
DO NOT simply erase the form and type a free-form response.

Issue Summary

This is a follow-up of #3021 in which it was suggested to create our own custom component. I have a first version working at https://github.com/jupyterlab/jupyterlab/pull/14439. However I have trouble setting chtml.fontURL to use a CDN. The linked PR sets MathJax.config.chtml.fontURL. However it is not picked up and I need to set manually MathJax.config.chtml.font.options.fontURL. Would you mind pointing me towards the correct syntax?

Technical details:
  • MathJax Version: 3.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked JupyterLab pull request and its MathJax 3.2 configuration around the chtml fontURL setting. Compare the documented chtml font configuration with the configuration used there, then verify the correct syntax in a custom component. Done means the CDN font URL is accepted and actually used without manually setting the nested font.options value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.