Name | matplatex JSON |
Version |
0.5.0
JSON |
| download |
home_page | None |
Summary | A package to save matplotlib figures for easy inclusion in LaTeX. |
upload_time | 2024-10-03 06:57:00 |
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/5b/69/0c39c4acf13a73d5ebb648c230704341d41d28a0481291d8941d458f108e/matplatex-0.5.0.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.5.0",
"project_urls": {
"GitHub": "https://github.com/johashei/matplatex"
},
"split_keywords": [
"latex",
" matplotlib",
" pdf_tex"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2fc2eeb2089de78640aaa8c20073e4a3e84e963cd4599a303c6e2acf94b54d5f",
"md5": "07fd247710ec2036b2ec48389178465f",
"sha256": "a66e3e40c0e45e2977f907c70e8868240912212b4b63806ba152ae246cd458c7"
},
"downloads": -1,
"filename": "matplatex-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "07fd247710ec2036b2ec48389178465f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 21047,
"upload_time": "2024-10-03T06:57:02",
"upload_time_iso_8601": "2024-10-03T06:57:02.122399Z",
"url": "https://files.pythonhosted.org/packages/2f/c2/eeb2089de78640aaa8c20073e4a3e84e963cd4599a303c6e2acf94b54d5f/matplatex-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5b690c39c4acf13a73d5ebb648c230704341d41d28a0481291d8941d458f108e",
"md5": "6cdec86104d9f74fc8a07ba07fa6b715",
"sha256": "af1242911c40707ebe1028610a270c7faae5833612cd1f1afe43308e10c1e1e0"
},
"downloads": -1,
"filename": "matplatex-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "6cdec86104d9f74fc8a07ba07fa6b715",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 20688,
"upload_time": "2024-10-03T06:57:00",
"upload_time_iso_8601": "2024-10-03T06:57:00.587307Z",
"url": "https://files.pythonhosted.org/packages/5b/69/0c39c4acf13a73d5ebb648c230704341d41d28a0481291d8941d458f108e/matplatex-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-03 06:57:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "johashei",
"github_project": "matplatex",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "matplatex"
}