data2latex


Namedata2latex JSON
Version 1.0.5 PyPI version JSON
download
home_page
SummaryPackage prototype for simple generation of LaTeX tables and plots from scientific data for use in any document.
upload_time2023-05-18 11:22:22
maintainer
docs_urlNone
author
requires_python>=3.10
licenseMIT License Copyright (c) 2023 Richard Kokstein Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords generation latex table plot graph array datatable
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Data2LaTeX

![Data2LaTeX logo](docs/_static/img/logo.png)

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

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](https://github.com/Trolobezka/data2latex).

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](https://github.com/JelteF/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](https://trolobezka.github.io/data2latex-docs).

### Simple features

```python
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

```python
import data2latex as dtol
data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
dtol.table(data)
dtol.finish("simple_table")
```

### Simple plot

```python
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

```bash
python -m pip install --upgrade pip
python -m pip install --upgrade data2latex
```

## Development

```bash
python -m venv .venv
./.venv/Scripts/activate
python -m pip install --upgrade pip
python -m pip install .[dev]
```

## Generating documentation

```bash
sphinx-apidoc -o docs src/data2latex
./docs/make html
```

## Packaging

```bash
python clear.py
python -m pip install --upgrade build
python -m build
```

## Publishing

```bash
python -m pip install --upgrade twine
python -m twine upload dist/*
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "data2latex",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "generation,latex,table,plot,graph,array,datatable",
    "author": "",
    "author_email": "Richard Kok\u0161tein <richard.Kokstein@fs.cvut.cz>",
    "download_url": "https://files.pythonhosted.org/packages/88/2f/d025bf2d2e7ab8dfa929edee02c97d546fc679858b4857aac7c1afff9805/data2latex-1.0.5.tar.gz",
    "platform": null,
    "description": "# Data2LaTeX\r\n\r\n![Data2LaTeX logo](docs/_static/img/logo.png)\r\n\r\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\r\n\r\nThis 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](https://github.com/Trolobezka/data2latex).\r\n\r\nThe 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](https://github.com/JelteF/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.\r\n\r\n## Examples\r\n\r\nExamples with results can be found in the [documentation](https://trolobezka.github.io/data2latex-docs).\r\n\r\n### Simple features\r\n\r\n```python\r\nimport data2latex as dtol\r\ndtol.section(\"Data2LaTeX\")\r\ndtol.text(\"This project is part of my bachelor thesis which deals with data representation using Python and LaTeX.\")\r\ndtol.finish(\"simple_features\")\r\n```\r\n\r\n### Simple table\r\n\r\n```python\r\nimport data2latex as dtol\r\ndata = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\r\ndtol.table(data)\r\ndtol.finish(\"simple_table\")\r\n```\r\n\r\n### Simple plot\r\n\r\n```python\r\nimport data2latex as dtol\r\nX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\r\nY = [84, 13, 94, 37, 80, 89, 90, 45, 55, 26, 92]\r\ndtol.plot(X, Y, line=\"-\", mark=\"*\")\r\ndtol.finish(\"simple_plot\")\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\npython -m pip install --upgrade pip\r\npython -m pip install --upgrade data2latex\r\n```\r\n\r\n## Development\r\n\r\n```bash\r\npython -m venv .venv\r\n./.venv/Scripts/activate\r\npython -m pip install --upgrade pip\r\npython -m pip install .[dev]\r\n```\r\n\r\n## Generating documentation\r\n\r\n```bash\r\nsphinx-apidoc -o docs src/data2latex\r\n./docs/make html\r\n```\r\n\r\n## Packaging\r\n\r\n```bash\r\npython clear.py\r\npython -m pip install --upgrade build\r\npython -m build\r\n```\r\n\r\n## Publishing\r\n\r\n```bash\r\npython -m pip install --upgrade twine\r\npython -m twine upload dist/*\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Richard Kokstein  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Package prototype for simple generation of LaTeX tables and plots from scientific data for use in any document.",
    "version": "1.0.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/Trolobezka/data2latex/issues",
        "Documentation": "https://trolobezka.github.io/data2latex-docs",
        "Homepage": "https://github.com/Trolobezka/data2latex",
        "Repository": "https://github.com/Trolobezka/data2latex"
    },
    "split_keywords": [
        "generation",
        "latex",
        "table",
        "plot",
        "graph",
        "array",
        "datatable"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64c912978dec165eeab101955a927b2d4c6e5f3fc22ca0ae72bdea2629d72136",
                "md5": "d64888eb7147b9e245556cccd221fb3b",
                "sha256": "2ba68156d750bbd515bf9c32b6c2b3fc16cb9b99aa09a8118d3af42c2955e7e1"
            },
            "downloads": -1,
            "filename": "data2latex-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d64888eb7147b9e245556cccd221fb3b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 26489,
            "upload_time": "2023-05-18T11:22:17",
            "upload_time_iso_8601": "2023-05-18T11:22:17.383475Z",
            "url": "https://files.pythonhosted.org/packages/64/c9/12978dec165eeab101955a927b2d4c6e5f3fc22ca0ae72bdea2629d72136/data2latex-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "882fd025bf2d2e7ab8dfa929edee02c97d546fc679858b4857aac7c1afff9805",
                "md5": "204e91f59ce0b2c1e2a158eb888a3eac",
                "sha256": "0c09fbd30feaed3fb8ff49c57bc251e9aa2c16c9397e1c0248be64107921b9fd"
            },
            "downloads": -1,
            "filename": "data2latex-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "204e91f59ce0b2c1e2a158eb888a3eac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 24918,
            "upload_time": "2023-05-18T11:22:22",
            "upload_time_iso_8601": "2023-05-18T11:22:22.658077Z",
            "url": "https://files.pythonhosted.org/packages/88/2f/d025bf2d2e7ab8dfa929edee02c97d546fc679858b4857aac7c1afff9805/data2latex-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-18 11:22:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Trolobezka",
    "github_project": "data2latex",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "data2latex"
}
        
Elapsed time: 0.07358s