This release is a pre-release and may not be stable for production use.
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.
Metadata
Release files for matplatex 0.10.0.0.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| matplatex-0.10.0.0.dev0.tar.gz | 24.0 kB | With provenance | Details for matplatex-0.10.0.0.dev0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| matplatex-0.10.0.0.dev0-py3-none-any.whl | Python 3 | none | any | Details for matplatex-0.10.0.0.dev0-py3-none-any.whl |
Total release size: 48.9 kB
Release files / matplatex-0.10.0.0.dev0.tar.gz
| Download URL | matplatex-0.10.0.0.dev0.tar.gz |
|---|---|
| Size | 24.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd468fe20356c525918fbe4d5ae73a16839bf9f6d6fcfd46658262ee7c3fe7cf
|
|
BLAKE2b-256 checksum How to use checksums |
6afd093926552abc66b65d11813ac36c6720feb10afb2385c9df0db3f5cd71f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / matplatex-0.10.0.0.dev0-py3-none-any.whl
| Download URL | matplatex-0.10.0.0.dev0-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c2f45cb28366fee468433a797a73da34ae60511d7e8a65aeebde0f27160b6e6
|
|
BLAKE2b-256 checksum How to use checksums |
b5c646eb3f516f1c6d6979187132d65e63ef65bc8b1159fc2fd4cf5420d655da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for matplatex 0.10.0.0.dev0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for matplatex-0.10.0.0.dev0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.