Skip to content

Using XyJax-v3 with Markdown-It-MathJax3 #3358

Open
@ych817

Description

@ych817

I will post my question in here , As @dpvc said : )

Thank you @dpvc . I have done the following inside my local " markdown-it-mathjax3 " project folder :

  1. npm install git://github.com/sonoisa/XyJax-v3.git to make xyjax folder show up inside my node_modules
  2. import 'xyjax/src/core/XypicConfiguration.js'; in index.ts

but how to append import "xyjax" to AllPackages ? Here is the relevant code in index.ts of markdown-it-mathjax3 :

import { AllPackages } from "mathjax-full/js/input/tex/AllPackages.js";

...

function plugin(md: MarkdownIt, options: any) {
  // Default options

  const documentOptions = {
    InputJax: new TeX({ packages: AllPackages, ...options?.tex }),
    OutputJax: new SVG({ fontCache: 'none', ...options?.svg })
  }
  const convertOptions = {
    display: false
  }

  ....
}

I tried to put import 'xyjax/src/core/XypicConfiguration.js'; inside ./markdown-it-mathjax3/node_modules/mathjax-full/js/input/tex/AllPackages.d.ts and then type npm run build , seems like nothing changed ...

Image

Here is my package.json for my vitepress project :

{
  "private": true,
  "type": "module",
  "scripts": {
    "docs:dev": "vitepress dev docs",
    "docs:build": "vitepress build docs",
    "docs:preview": "vitepress preview docs"
  },
  "devDependencies": {
    "markdown-it-mathjax3": "file:../markdown-it-mathjax3",
    "vitepress": "latest"
  }
}

not sure if this is the correct way for linking to my local markdown-it-mathjax3 project .

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions