Name | matplatex JSON |
Version |
0.9.6
JSON |
| download |
home_page | None |
Summary | A package to save matplotlib figures for easy inclusion in LaTeX. |
upload_time | 2025-08-06 06:52:45 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
latex
matplotlib
pdf_tex
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MatpLaTeX
MatpLaTeX lets you save a matplotlib `Figure` as a combination of a pdf file containing the graphics and a LaTeX file containing the text. With this, text in the figure will automatically use the typeface, size and other settings of the surrounding text.
## Installation
MatpLaTeX is on PyPI, simply
```
pip install matplatex
```
### Python requirements:
- python >= 3.10 (If someone asks I may add support for earlier versions.)
- matplotlib >= 3.5
- beartype
### LaTeX requirements:
- tikz
- graphicx
## Basic Usage
To save a figure, simply use
```
matplatex.save(fig, "myfig")
```
this will create two files named `myfig.pdf` and `myfig.pdf_tex`.
In your LaTeX document, define the width of the figure with
```
\newlength{\figurewidth}
\setlength{\figurewidth}{<your desired width>}
```
and include the figure as such:
```
\input{myfig.pdf_tex}
```
LaTeX commands such as `\small` and `\textbf{}` will affect the text in the expected way.
## Options
_Note: this is still under development and may change in future versions._
`matplatex.save` accepts the following keyword options:
- `widthcommand`: string
Command used to set the width of the figure. Default: `\figurewidth`.
- `draw_anchors`: bool
Mark the text anchors in the figure. Useful for debugging. Default: `False`.
- `verbose`: bool
Print message upon successful save. Default: `True`.
Raw data
{
"_id": null,
"home_page": null,
"name": "matplatex",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "LaTeX, matplotlib, pdf_tex",
"author": null,
"author_email": "Johannes S\u00f8rby Heines <j.s.heines@protonmail.ch>",
"download_url": "https://files.pythonhosted.org/packages/50/68/f74e422c27114ad34a2eae60045839f7758e6c0acd8093d9ad19d9c425cc/matplatex-0.9.6.tar.gz",
"platform": null,
"description": "# MatpLaTeX\n\nMatpLaTeX lets you save a matplotlib `Figure` as a combination of a pdf file containing the graphics and a LaTeX file containing the text. With this, text in the figure will automatically use the typeface, size and other settings of the surrounding text.\n\n## Installation\n\nMatpLaTeX is on PyPI, simply\n```\npip install matplatex\n```\n\n### Python requirements:\n- python >= 3.10 (If someone asks I may add support for earlier versions.)\n- matplotlib >= 3.5\n- beartype\n\n### LaTeX requirements:\n- tikz\n- graphicx\n\n## Basic Usage\n\nTo save a figure, simply use\n```\nmatplatex.save(fig, \"myfig\")\n```\nthis will create two files named `myfig.pdf` and `myfig.pdf_tex`.\n\nIn your LaTeX document, define the width of the figure with\n```\n\\newlength{\\figurewidth}\n\\setlength{\\figurewidth}{<your desired width>}\n```\nand include the figure as such:\n```\n\\input{myfig.pdf_tex}\n```\nLaTeX commands such as `\\small` and `\\textbf{}` will affect the text in the expected way.\n\n## Options\n\n_Note: this is still under development and may change in future versions._\n\n`matplatex.save` accepts the following keyword options:\n- `widthcommand`: string \nCommand used to set the width of the figure. Default: `\\figurewidth`.\n- `draw_anchors`: bool \nMark the text anchors in the figure. Useful for debugging. Default: `False`.\n- `verbose`: bool \nPrint message upon successful save. Default: `True`.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A package to save matplotlib figures for easy inclusion in LaTeX.",
"version": "0.9.6",
"project_urls": {
"GitHub": "https://github.com/johashei/matplatex"
},
"split_keywords": [
"latex",
" matplotlib",
" pdf_tex"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d1a844c27c0a85ea854f8caee3c955b3278dc890e18cc26d95c5ca2ee13a89fc",
"md5": "857fc5a88ce6789c62f8fd4c34c6d22a",
"sha256": "e95a869d2f259ded1ad48ca942889d0e1528745904c5af22e9a0d184156c3b99"
},
"downloads": -1,
"filename": "matplatex-0.9.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "857fc5a88ce6789c62f8fd4c34c6d22a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 22991,
"upload_time": "2025-08-06T06:52:46",
"upload_time_iso_8601": "2025-08-06T06:52:46.597355Z",
"url": "https://files.pythonhosted.org/packages/d1/a8/44c27c0a85ea854f8caee3c955b3278dc890e18cc26d95c5ca2ee13a89fc/matplatex-0.9.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5068f74e422c27114ad34a2eae60045839f7758e6c0acd8093d9ad19d9c425cc",
"md5": "9ed1f0094763cca517c542e042675704",
"sha256": "593b28eed258bc41cf80b46f4c2eb4776f6af09aa7ada0e198fe2f67ce2460d6"
},
"downloads": -1,
"filename": "matplatex-0.9.6.tar.gz",
"has_sig": false,
"md5_digest": "9ed1f0094763cca517c542e042675704",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 22101,
"upload_time": "2025-08-06T06:52:45",
"upload_time_iso_8601": "2025-08-06T06:52:45.432969Z",
"url": "https://files.pythonhosted.org/packages/50/68/f74e422c27114ad34a2eae60045839f7758e6c0acd8093d9ad19d9c425cc/matplatex-0.9.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-06 06:52:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "johashei",
"github_project": "matplatex",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "matplatex"
}