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

SVG path for SPACE (u0020) is missing attribute d #3

Closed
pkra opened this issue Jun 12, 2014 · 2 comments
Closed

SVG path for SPACE (u0020) is missing attribute d #3

pkra opened this issue Jun 12, 2014 · 2 comments

Comments

@pkra
Copy link
Contributor

pkra commented Jun 12, 2014

Example:

$ bin/tex2svg "\text{ }"

produces

...
<path stroke-width="10" id="E1-MJMAIN-20"></path>
...

or more precisely

    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg xmlns:xlink="http://www.w3.org/1999/xlink" style="vertical-align: -0.167ex; margin-left: 0ex; margin-right: 0ex; margin: 1px 0px;" width="0.667ex" height="0.167ex" viewBox="0 -23.9 255 47.9" xmlns="http://www.w3.org/2000/svg">
    <defs>
    <path stroke-width="10" id="E1-MJMAIN-20"></path>
    </defs>
    <g stroke="black" fill="black" stroke-width="0" transform="matrix(1 0 0 -1 0 0)">
    <use xlink:href="#E1-MJMAIN-20"></use>
    </g>
    </svg>

Adding empty attribute d="" should fix this.

This looks like an upstream bug in MathJax.

@dpvc
Copy link
Member

dpvc commented Jun 12, 2014

There really shouldn't be any path element at all; the SVG jax should simply increment its position rather than inserting a useless path.

dpvc added a commit to dpvc/MathJax that referenced this issue Sep 3, 2014
@dpvc
Copy link
Member

dpvc commented Sep 3, 2014

This is fixed upstream in MathJax by the commit listed above. This just advances the position within the string for space characters rather than producing an empty path (unless the path also has height or depth, which is not currently true for any glyph in the MathJax fonts, but perhaps could be in the future).

@dpvc dpvc closed this as completed Sep 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants