Title: Issue · GitHub
Open Graph Title: Issue · matplotlib/matplotlib
X Title: Issue · matplotlib/matplotlib
Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
Open Graph Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
X Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
Opengraph URL: https://github.com/matplotlib/matplotlib
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: \\genfrac has bad spacing with (high) custom ruler","articleBody":"### Bug summary\n\nUsing a high horizontal ruler overwrites denominator\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\nplt.text(0.5, 0.5, r'$\\genfrac{}{}{10}{}{foo}{bar}$')\r\nplt.draw()\n```\n\n\n### Actual outcome\n\n\r\n\n\n### Expected outcome\n\nThis is from LaTeX rendering, but actually not that good either. It seems like the distance is also scaled with the height of the bar.\r\n\r\n\r\n\n\n### Additional information\n\nUsing\r\n```\r\n vlist = Vlist([cnum, # numerator\r\n Vbox(0, thickness * 2.0), # space\r\n Hrule(state, rule), # rule\r\n Vbox(0, thickness * 2.0 + 2 * rule), # space\r\n cden # denominator\r\n ])\r\n```\r\nin `_genfrac` (that is, adding 2 * rule to the second spacer) gives\r\n\r\n\r\n\r\nWhich I guess it at least somewhat consistent and no overwrite. The question is if one can/want to do better?\r\n\r\nI can include this is #22171 if it seems like a reasonable solution.\n\n### Operating system\n\nWindows 10\n\n### Matplotlib Version\n\n3.6.0.dev1270+g46d2a1e.d20220109\n\n### Matplotlib Backend\n\nmodule://matplotlib_inline.backend_inline\n\n### Python version\n\n3.9.9\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\ngit checkout","author":{"url":"https://github.com/oscargus","@type":"Person","name":"oscargus"},"datePublished":"2022-01-09T14:25:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/22172/matplotlib/issues/22172"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:9f3daee5-7632-2b8c-e8c0-5159092b4a1e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D6EA:128620:5914E7:775A42:6A519A73 |
| html-safe-nonce | 3aa6ec9905a641a17ff4b5cae529e3dd48716c4e5c48a8ab06dc6817b298d6ff |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkVBOjEyODYyMDo1OTE0RTc6Nzc1QTQyOjZBNTE5QTczIiwidmlzaXRvcl9pZCI6IjM5OTI1NjEwMTI3MDQzODU2NTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5eff679693c020ab6d00f065efef7947dd4efa5ed05d883ba87d6e914933ade0 |
| hovercard-subject-tag | repository:1385122 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/issues/22172 |
| twitter:image | https://opengraph.githubassets.com/9261bf81ff8848b426c0823e67448cf51d35b63d999294ff18880398e6b5b195/matplotlib/matplotlib |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9261bf81ff8848b426c0823e67448cf51d35b63d999294ff18880398e6b5b195/matplotlib/matplotlib |
| og:image:alt | matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-cache |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width