Title: [MNT]: Use fix-cm rather than type1cm for LaTeX · Issue #27654 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: Use fix-cm rather than type1cm for LaTeX · Issue #27654 · matplotlib/matplotlib
X Title: [MNT]: Use fix-cm rather than type1cm for LaTeX · Issue #27654 · matplotlib/matplotlib
Description: Summary When I try use LaTeX with matplotlib (see script below), I get an error containing ! LaTeX Error: File type1cm.sty not found. On the site for type1cm, it says "Note that the LATEX distribution now contains a package fix-cm, which...
Open Graph Description: Summary When I try use LaTeX with matplotlib (see script below), I get an error containing ! LaTeX Error: File type1cm.sty not found. On the site for type1cm, it says "Note that the LATEX distribut...
X Description: Summary When I try use LaTeX with matplotlib (see script below), I get an error containing ! LaTeX Error: File type1cm.sty not found. On the site for type1cm, it says "Note that the LATEX dist...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/27654
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Use fix-cm rather than type1cm for LaTeX","articleBody":"### Summary\r\n\r\nWhen I try use LaTeX with matplotlib (see script below), I get an error containing `! LaTeX Error: File type1cm.sty not found`. On [the site for `type1cm`](https://ctan.org/pkg/type1cm), it says \"Note that the LATEX distribution now contains a package `fix-cm`, which performs the task of `type1cm`, as well as doing the same job for T1- and TS1-encoded ec fonts\". On my system/LaTeX installation, `fix-cm` is installed by default, whereas `type1cm` is not, so assuming this is generally true for other users, it would make more sense for matplotlib to use `fix-cm` instead of `type1cm`, as this should achieve the same results, and avoid forcing the user to install extra LaTeX packages.\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib\r\n\r\nmatplotlib.rc('font', **{'family': 'serif', 'serif': ['Computer Modern']})\r\nmatplotlib.rc('text', usetex=True)\r\n\r\nplt.plot([1, 2], c=\"b\")\r\nplt.savefig(\"output.png\")\r\n```\r\n\r\nPython 3.10.12\r\nmatplotlib Version: 3.8.2\r\nUbuntu 22.04.1 LTS\r\n\r\n### Proposed fix\r\n\r\nUse fix-cm rather than type1cm for LaTeX","author":{"url":"https://github.com/jakelevi1996","@type":"Person","name":"jakelevi1996"},"datePublished":"2024-01-15T11:59:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/27654/matplotlib/issues/27654"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:771d0993-8a67-dd98-0f75-3a8e220dcc3d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B14E:18C7E2:1434230:1B10169:6A534436 |
| html-safe-nonce | 587deaaab54b676c5edbef51bf4059329627ccabb262f2ab779cb4a50ecad483 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTRFOjE4QzdFMjoxNDM0MjMwOjFCMTAxNjk6NkE1MzQ0MzYiLCJ2aXNpdG9yX2lkIjoiMzk0MjM1NzY4MTE0NzQyOTk0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0bdaa72ab546f3a57a00cfb8a67e882989b3b36b004a929f265020d8ccb677a3 |
| hovercard-subject-tag | issue:2081886701 |
| 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/_view_fragments/issues/show/matplotlib/matplotlib/27654/issue_layout |
| twitter:image | https://opengraph.githubassets.com/477bed353be84eae34a5a11d01cb7464f9d5f4fff04acd689996bf07c36c59bc/matplotlib/matplotlib/issues/27654 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/477bed353be84eae34a5a11d01cb7464f9d5f4fff04acd689996bf07c36c59bc/matplotlib/matplotlib/issues/27654 |
| og:image:alt | Summary When I try use LaTeX with matplotlib (see script below), I get an error containing ! LaTeX Error: File type1cm.sty not found. On the site for type1cm, it says "Note that the LATEX distribut... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jakelevi1996 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width