{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5210","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5210/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5210/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5210/events","html_url":"https://github.com/matplotlib/matplotlib/issues/5210","id":110466424,"number":5210,"title":"Unexpected replacement of \\right) with exlamation point in MathTextParser output","user":{"login":"rsnape","id":493293,"avatar_url":"https://avatars.githubusercontent.com/u/493293?v=3","gravatar_id":"","url":"https://api.github.com/users/rsnape","html_url":"https://github.com/rsnape","followers_url":"https://api.github.com/users/rsnape/followers","following_url":"https://api.github.com/users/rsnape/following{/other_user}","gists_url":"https://api.github.com/users/rsnape/gists{/gist_id}","starred_url":"https://api.github.com/users/rsnape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsnape/subscriptions","organizations_url":"https://api.github.com/users/rsnape/orgs","repos_url":"https://api.github.com/users/rsnape/repos","events_url":"https://api.github.com/users/rsnape/events{/privacy}","received_events_url":"https://api.github.com/users/rsnape/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/text","name":"text","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"mdboom","id":38294,"avatar_url":"https://avatars.githubusercontent.com/u/38294?v=3","gravatar_id":"","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/20","html_url":"https://github.com/matplotlib/matplotlib/milestones/next%20bug%20fix%20release%20(2.0.1)","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/20/labels","id":1306895,"number":20,"title":"next bug fix release (2.0.1)","description":"","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars.githubusercontent.com/u/199813?v=3","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":1,"state":"open","created_at":"2015-09-15T17:47:44Z","updated_at":"2015-10-08T16:23:34Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2015-10-08T14:40:37Z","updated_at":"2015-10-09T12:13:16Z","closed_at":null,"body":"This bug report originates from my attempts to [answer this question](http://stackoverflow.com/a/33000975/838992) on Stack Overflow.  Minimal example thanks to the [other answer there by Baptiste](http://stackoverflow.com/a/33002413/838992).\r\n\r\n---\r\n\r\nWith certain LaTeX strings, the right paranthesis indicates by `\\right)` is replaced with an exclamation point when passed to MathTextParser and rendered as a bitmap or png.  This behaviour appears to occur when the parantheses are around an expression comprising multiple layered fractions.  It does not occur if `\\right]` or `\\right\\}` are used\r\n\r\nThe minimal code to reproduce this is as follows:\r\n\r\n    import matplotlib.mathtext as mt\r\n\r\n    s = r'$\\left(\\frac{\\frac{\\frac{M}{I}}{N}}' \\\r\n         r'{\\frac{\\frac{B}{U}}{G}}\\right)$'\r\n    parser = mt.MathTextParser(\"Bitmap\")\r\n    for size in range(1, 30):\r\n        filename = \"figure{0}.png\".format(size)\r\n        parser.to_png(filename, s, fontsize=size)\r\n\r\nThis gives output like\r\n\r\n![Image with exclamation in](http://i.stack.imgur.com/3DVSa.png)\r\n\r\nInvestigations indicate that this occurs only for certain combinations of expression and font size, but the example given above seems to give the most consistent failure conditions.  It **may** be related to `dpi` in the rendering, however this has not yet been conclusively proven or disproven.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/146847288","html_url":"https://github.com/matplotlib/matplotlib/issues/5210#issuecomment-146847288","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5210","id":146847288,"user":{"login":"zblz","id":576258,"avatar_url":"https://avatars.githubusercontent.com/u/576258?v=3","gravatar_id":"","url":"https://api.github.com/users/zblz","html_url":"https://github.com/zblz","followers_url":"https://api.github.com/users/zblz/followers","following_url":"https://api.github.com/users/zblz/following{/other_user}","gists_url":"https://api.github.com/users/zblz/gists{/gist_id}","starred_url":"https://api.github.com/users/zblz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zblz/subscriptions","organizations_url":"https://api.github.com/users/zblz/orgs","repos_url":"https://api.github.com/users/zblz/repos","events_url":"https://api.github.com/users/zblz/events{/privacy}","received_events_url":"https://api.github.com/users/zblz/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T12:13:16Z","updated_at":"2015-10-09T12:13:16Z","body":"In L735 of mathtext.py there is this comment:\r\n```\r\n# The fourth size of '[' is mysteriously missing from the BaKoMa\r\n# font, so I've ommitted it for both '[' and ']'\r\n```\r\nIt seemed to me that the fourth size was the one giving problems in {} and () as well, so removing them as initially done for [], I got:\r\n\r\n![figure11](https://cloud.githubusercontent.com/assets/576258/10393348/24d2791c-6e87-11e5-8755-a4b181f31751.png)\r\n\r\nat all sizes! Maybe we should consider removing the fourth size outright.\r\n"}}