{ "info": { "author": "Peijun Ma", "author_email": "mat1g3r@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Graphics :: Graphics Conversion", "Topic :: Text Processing :: Markup :: LaTeX", "Topic :: Utilities" ], "description": "# pnglatex\npnglatex, a small program that converts LaTeX snippets to png\n\n## Requiremens\n\n[Python3](https://www.python.org/downloads/)\n\nA LaTeX distribution such as [TeX Live](https://www.tug.org/texlive/) or [MiKTeX](https://miktex.org/)\n\n`pdfcrop, pnmtopng, pdftoppm` You should be able to find those programs in your distro package manager or [Homebrew](https://brew.sh/)\n\n## Install\n\nIn your terminal, type:\n```\npip install pnglatex\n```\nOn some systems you might need to use `pip3` instead of `pip`\n\n## Usage\n\npnglatex comes with a simple command line interface.\n\nTo use the cli, you can check the help message using:\n```\npnglatex -h\n```\n\nHere's the help message in full:\n```\nusage: pnglatex.py [-h] -c \"LaTeX string\" [-o filename]\n\npnglatex, a small program that converts latex snippets to png\n\noptional arguments:\n -h, --help show this help message and exit\n -c \"LaTeX string\" The LaTeX string to convert\n -o filename The output filename.\n```\n\nSome examples:\n\n`pnglatex -c \"\\[\\frac{1}{2}\\]\"`, `pnglatex -c foo -o foo.png`\n\npnglatex also includes a single function that you can include in your code.\n\nHere's its docstring in full:\n```python\ndef pnglatex(tex_string, output=None):\n \"\"\"\n Produce an png based on a input LaTeX snippet.\n\n @param tex_string: The LaTeX string.\n @param output: The output filename. It can also be a pathlib.Path object.\n If not provided, this will be randomly generated.\n\n @return: A Path object of the output file\n @raises ValueError: If the input is empty of something went wrong with\n the image creation.\n \"\"\"\n```\n\nAn example usage would be:\n```python\nfrom pnglatex import pnglatex\n\noutput = pnglatex(r'\\[\\displaystyle{\\sum_{i=0}^{10} 3i}\\]', 'output.png')\n```\n\n## Licence\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nSee [LICENSE](LICENSE) for details.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MaT1g3R/pnglatex", "keywords": "", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "pnglatex", "package_url": "https://pypi.org/project/pnglatex/", "platform": "", "project_url": "https://pypi.org/project/pnglatex/", "project_urls": { "Homepage": "https://github.com/MaT1g3R/pnglatex" }, "release_url": "https://pypi.org/project/pnglatex/1.1/", "requires_dist": null, "requires_python": "", "summary": "A small program that converts latex snippets to png", "version": "1.1" }, "last_serial": 3379613, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "7dc36e60b61e86055589049e8eb4b311", "sha256": "4594542e71d5b047ef6c9879e0ce7d86c752576619590fc7649d75849608b85b" }, "downloads": -1, "filename": "pnglatex-1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7dc36e60b61e86055589049e8eb4b311", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19826, "upload_time": "2017-12-01T07:37:38", "url": "https://files.pythonhosted.org/packages/ad/b7/b38067e2f42ce8b3e4b433d96da1f3d184a8efd7580c4830e868e05cb85f/pnglatex-1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a157cda4e4f5afae4c68da74cbadb2a3", "sha256": "4da791d21ed27c229b37f3f71e9435bce1b81a0b27d14479757f7e9398b2022d" }, "downloads": -1, "filename": "pnglatex-1.0.tar.gz", "has_sig": false, "md5_digest": "a157cda4e4f5afae4c68da74cbadb2a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17851, "upload_time": "2017-12-01T07:37:40", "url": "https://files.pythonhosted.org/packages/94/f5/db9cc88638073f41e67d93d4dc16ebcc97c8ca5a6e98f6cd9fac04498a54/pnglatex-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "8209ee2d91cee8d7e9cb7bc03f2230c7", "sha256": "8d1d01c59e14ad05ef152194c1bd28f996f0d999b93a67110f24e8be7c0aee20" }, "downloads": -1, "filename": "pnglatex-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8209ee2d91cee8d7e9cb7bc03f2230c7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19861, "upload_time": "2017-12-01T08:54:45", "url": "https://files.pythonhosted.org/packages/64/bc/89bd1b10abd6c6623195d3f81c99679b2cdfe5666f7a8c7b78c7f2aaa8dc/pnglatex-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d037e8e59db77226dc3ff7d89a94ca49", "sha256": "0995060d4926b6d3b40731586c615234c3e45b3142fc15b836601e3b0cf863d3" }, "downloads": -1, "filename": "pnglatex-1.1.tar.gz", "has_sig": false, "md5_digest": "d037e8e59db77226dc3ff7d89a94ca49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17879, "upload_time": "2017-12-01T08:54:47", "url": "https://files.pythonhosted.org/packages/a1/09/66e828e1d0767a7ba8f3fa157d0be5595ef300967755d61b735dd846bc0a/pnglatex-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8209ee2d91cee8d7e9cb7bc03f2230c7", "sha256": "8d1d01c59e14ad05ef152194c1bd28f996f0d999b93a67110f24e8be7c0aee20" }, "downloads": -1, "filename": "pnglatex-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8209ee2d91cee8d7e9cb7bc03f2230c7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19861, "upload_time": "2017-12-01T08:54:45", "url": "https://files.pythonhosted.org/packages/64/bc/89bd1b10abd6c6623195d3f81c99679b2cdfe5666f7a8c7b78c7f2aaa8dc/pnglatex-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d037e8e59db77226dc3ff7d89a94ca49", "sha256": "0995060d4926b6d3b40731586c615234c3e45b3142fc15b836601e3b0cf863d3" }, "downloads": -1, "filename": "pnglatex-1.1.tar.gz", "has_sig": false, "md5_digest": "d037e8e59db77226dc3ff7d89a94ca49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17879, "upload_time": "2017-12-01T08:54:47", "url": "https://files.pythonhosted.org/packages/a1/09/66e828e1d0767a7ba8f3fa157d0be5595ef300967755d61b735dd846bc0a/pnglatex-1.1.tar.gz" } ] }