Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #1855
Closed
Open
Issue created Oct 13, 2017 by Administrator@rootContributor

MathJax dosen't persist border and other style related information in SVG

Created by: pawan52tiwari

Hi All,

I am using mml2svg to convert mathml into svg.

Input mathml is


<math xmlns="http://www.w3.org/1998/Math/MathML" style="border-bottom-style:dotted;border-bottom-color:#ff0000;border-left-style:dashed;border-left-color:#ff0000;border-top-style:solid;border-top-color:#ff0000;border-right-color:#ff0065;border-right-style:double;font-size:2em;" display="block">
  <mrow>
    <mrow>
      <mi>f</mi>
      <mo>⁡</mo>
      <mrow>
        <mo>(</mo>
        <mi>x</mi>
        <mo>)</mo>
      </mrow>
    </mrow>
    <mo>=</mo>
    
  </mrow>
</math>

when convert it into svg i get below output

<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="vertical-align: -0.838ex;" width="6.871ex" height="2.843ex" viewBox="0 -863.1 2958.3 1223.9" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" aria-labelledby="MathJax-SVG-1-Title">
<title id="MathJax-SVG-1-Title">Equation</title>
<defs aria-hidden="true">
</defs>
<g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)" aria-hidden="true">
 <use xlink:href="#E1-MJMATHI-66" x="0" y="0"></use>
<g transform="translate(550,0)">
 <use xlink:href="#E1-MJMAIN-28" x="0" y="0"></use>
 <use xlink:href="#E1-MJMATHI-78" x="389" y="0"></use>
 <use xlink:href="#E1-MJMAIN-29" x="962" y="0"></use>
</g>
 <use xlink:href="#E1-MJMAIN-3D" x="2179" y="0"></use>
</g>
</svg>

(Some code remove for brevity)

SVG doesn't have any information of style attributes. How to preserve the style information in svg

Assignee
Assign to
Time tracking