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

[Feature Request] equation preview with extra math packages #1187

Closed
garylavayou opened this issue Feb 21, 2019 · 3 comments
Closed

[Feature Request] equation preview with extra math packages #1187

garylavayou opened this issue Feb 21, 2019 · 3 comments

Comments

@garylavayou
Copy link

garylavayou commented Feb 21, 2019

Is your feature request related to a problem? Please describe.
The preview environment seems not to support the commands \bm and \mathclap, which are in the package bm and mathtools.
img`

Describe the solution you'd like
As latextools does, an option could be added to the LaTeX Workshop, so that users can add extra math related packages that are also used in their tex files.
In this way, the preview should be correctly rendered.

Describe alternatives you've considered
Or the requested packages could be included in the built-in preview settings.

@jlelong
Copy link
Collaborator

jlelong commented Feb 21, 2019

From stackoverflow

You can not simply drop a LaTeX package into MathJax. The packages that MathJax supports have to be re-implemented in javascript, which is difficult for non-trivial packages

Mathtools is not supported by mathjax, see mathjax repo

@jlelong jlelong closed this as completed Feb 21, 2019
@xinleiyu
Copy link

\bm is recommended by some as the best option for LaTeX, but not supported by MathJax.

Can we change the config as follows to replace \bm with \boldsymbol in preview?

TeX: {
  Macros: {
    bm: ["\\boldsymbol{#1}",1],
  }
}

From the issue of MathJax: LaTeX input: add support for bm package

Repository owner locked as resolved and limited conversation to collaborators Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants