Data2LaTeX
This project is a part of my bachelor thesis which deals with data representation using Python and LaTeX. You can find the source code on my GitHub.
The idea behind this package prototype is that generating LaTeX documents containing scientific data from Python should not be difficult and require many steps. Currently the package supports the creation of simple tables and two types of plots: scatter plots and line plots. The package uses the PyLaTeX package to handle the document creation and compilation process. The main data sources are arrays and data tables from the popular packages numpy and pandas. A major inspiration for the module syntax is the matplotlib.pyplot module, which allows plots to be created in a few lines of code. The tables are created using the tblr environment from the tabularray package. The plots are created using the tikzpicture / axis environment from the tikz / pgfplots package.
Examples
Examples with results can be found in the documentation.
Simple features
import data2latex as dtol
dtol.section("Data2LaTeX")
dtol.text("This project is part of my bachelor thesis which deals with data representation using Python and LaTeX.")
dtol.finish("simple_features")
Simple table
import data2latex as dtol
data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
dtol.table(data)
dtol.finish("simple_table")
Simple plot
import data2latex as dtol
X = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Y = [84, 13, 94, 37, 80, 89, 90, 45, 55, 26, 92]
dtol.plot(X, Y, line="-", mark="*")
dtol.finish("simple_plot")
Installation
python -m pip install --upgrade pip
python -m pip install --upgrade data2latex
Development
python -m venv .venv
./.venv/Scripts/activate
python -m pip install --upgrade pip
python -m pip install .[dev]
Generating documentation
sphinx-apidoc -o docs src/data2latex
./docs/make html
Packaging
python clear.py
python -m pip install --upgrade build
python -m build
Publishing
python -m pip install --upgrade twine
python -m twine upload dist/*
Metadata
Release files for data2latex 1.0.5
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 |
|---|---|---|---|---|
| data2latex-1.0.5.tar.gz | 24.9 kB | Without provenance | Details for data2latex-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| data2latex-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for data2latex-1.0.5-py3-none-any.whl |
Total release size: 51.4 kB
Release files / data2latex-1.0.5.tar.gz
| Download URL | data2latex-1.0.5.tar.gz |
|---|---|
| Size | 24.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c09fbd30feaed3fb8ff49c57bc251e9aa2c16c9397e1c0248be64107921b9fd
|
|
BLAKE2b-256 checksum How to use checksums |
882fd025bf2d2e7ab8dfa929edee02c97d546fc679858b4857aac7c1afff9805
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.5
|
Release files / data2latex-1.0.5-py3-none-any.whl
| Download URL | data2latex-1.0.5-py3-none-any.whl |
|---|---|
| Size | 26.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ba68156d750bbd515bf9c32b6c2b3fc16cb9b99aa09a8118d3af42c2955e7e1
|
|
BLAKE2b-256 checksum How to use checksums |
64c912978dec165eeab101955a927b2d4c6e5f3fc22ca0ae72bdea2629d72136
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.5
|
Security for data2latex 1.0.5
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.