Giter Site home page Giter Site logo

Comments (1)

dpvc avatar dpvc commented on July 28, 2024

It is not clear what your use case really is. Are you trying to set the background for ALL the SVG elements created by MathJax? If so, you can use CSS to do that. Something like

.MathJax_SVG > svg {
  background-color: red;
}

If you want to control the color from within the expression, that will depend on the input format you are using; you don't stay which that is.

For TeX, you can use \bbox[red]{...} to make the math in its argument have a red background. You may want to use \bbox[red; padding: 3px]{...} to increase the space around the expression that is red.

You can also use \require{color} \colorbox{red}{...}.

For MathML, you would use the attribute mathbackground="red" on any element to make the background red for its contents. It can be used on the <math> tag to make the whole expression have a red background.

There is no mechanism in AsciiMath for making a colored background.

from mathjax-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.