Skip to content

Appearance of non-math hyphen changes with math in text #6028

Closed

Description

@Tillsten

See the following minimal example:

plt.rcParams['mathtext.fontset'] = 'stixsans' #change to cm for normal behavior

mv = u'MV$^{2+}$'
cor = u'Al-cor'
plt.text(0.5, 0.5, cor)
plt.text(0.5, 0.3, cor + mv)

In the second case the hypen is much longer than in the first. The behavior
depends on the mathtext-setting, which is surprising. Confirmed in Python 2.7 and 3.5,
also in 2.X.

Activity

  1. modified the milestones: , on Feb 18, 2016
  2. changed the title [-]Appearence of non-math hypen changes when math [/-] [+]Appearance of non-math hyphen changes with math in text[/+] on Feb 18, 2016
  3. crazyo commented on Feb 29, 2016

    @crazyo
    Contributor

    The problem is that hyphen sign is intentionally converted to minus in order to avoid ambiguity, including those ones in texts. I made a fix: #6073

  4. added a commit that references this issue on Mar 6, 2016
    ebfbc4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions