Skip to content

style transform origin incorrect in svg mode #3542

@70ray

Description

@70ray

Issue Summary

Making a reversed D character:
\(\style{transform: scaleX(-1);}{\mathrm{D}}\)
gives correct result in chtml but with svg it is displaced to the left.

Steps to Reproduce:

  1. using the example on jsbin, paste in
given \(\style{transform: scaleX(-1);}{\mathrm{D}}\) by a relation

This works correctly.

  1. change the src to tex-svg
    The character is displaced to the left.

Technical details:

  • MathJax Version: latest
  • Client OS: Linux
  • Browser: Firefox

I am using the following MathJax configuration from the jsbin page:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>MathJax example</title>
  <script id="MathJax-script" async
          src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-svg.js">
  </script>
</head>
<body>
<p>
  given \(\style{transform: scaleX(-1);}{\mathrm{D}}\) by a relation
</p>
</body>
</html>

Supporting information:

Screenshot below

good chtml

Image

bad svg:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Code ExampleContains an illustrative code example, solution, or work-aroundExpected BehaviorThis is how MathJax works

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions