Skip to content

Rogue mathtext rendered spaces #4333

@ndevenish

Description

@ndevenish

I'm aware that the built in mathtext rendered is not expected to be perfectly identical to tex, but I'm seeing some egregious behavior with spacing that I cannot seem to explain. With:

import matplotlib.pyplot as plt
plt.figure()
plt.figtext(0.1, 0.9, r"1. ($a^2$)", size=20)
plt.figtext(0.1, 0.8, r"2. $(a^2)$", size=20)
plt.figtext(0.1, 0.7, r"3. $\left(a^2\right)$", size=20)
plt.show()

In both 1.4.2 and a recent development version I get a rogue space before the bracket in all three cases:
screen shot 2015-04-13 at 22 16 54
Compared with turning text.usetex on:
screen shot 2015-04-13 at 23 06 26

Using a negative space (\!) fixes the issue rendering with matplotlib, but screws up the latex output.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy