{"id":13815145,"url":"https://github.com/phfaist/pylatexenc","last_synced_at":"2025-05-14T13:09:53.233Z","repository":{"id":749875,"uuid":"20764371","full_name":"phfaist/pylatexenc","owner":"phfaist","description":"Simple LaTeX parser providing latex-to-unicode and unicode-to-latex conversion","archived":false,"fork":false,"pushed_at":"2025-04-09T15:26:15.000Z","size":2311,"stargazers_count":350,"open_issues_count":25,"forks_count":40,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-11T23:56:17.742Z","etag":null,"topics":["encoding","latex","parser","python","unicode"],"latest_commit_sha":null,"homepage":"https://pylatexenc.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phfaist.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-06-12T10:57:49.000Z","updated_at":"2025-04-11T05:03:14.000Z","dependencies_parsed_at":"2024-08-29T16:25:37.816Z","dependency_job_id":"5e3d5f59-d61c-4b88-a9ff-e771709daf73","html_url":"https://github.com/phfaist/pylatexenc","commit_stats":{"total_commits":557,"total_committers":14,"mean_commits":"39.785714285714285","dds":"0.10233393177737882","last_synced_commit":"34fe21db676d2a76eac36945628277f5a214f7df"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phfaist%2Fpylatexenc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phfaist%2Fpylatexenc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phfaist%2Fpylatexenc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phfaist%2Fpylatexenc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phfaist","download_url":"https://codeload.github.com/phfaist/pylatexenc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254133391,"owners_count":22020326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encoding","latex","parser","python","unicode"],"created_at":"2024-08-04T04:03:01.657Z","updated_at":"2025-05-14T13:09:48.201Z","avatar_url":"https://github.com/phfaist.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"pylatexenc\n==========\n\nSimple LaTeX parser providing latex-to-unicode and unicode-to-latex conversion\n\n.. image:: https://img.shields.io/github/license/phfaist/pylatexenc.svg?style=flat\n   :target: https://github.com/phfaist/pylatexenc/blob/master/LICENSE.txt\n\n.. image:: https://img.shields.io/pypi/v/pylatexenc.svg?style=flat\n   :target: https://pypi.org/project/pylatexenc/\n\nPython: ≥ 3.4 or ≥ 2.7. The library is designed to be as backwards-compatible as\nreasonably possible and is able to run on old python verisons should it be\nnecessary. (Use the setup.py script directly if you have python\u003c3.7, poetry\ndoesn't seem to work with old python versions.)\n\n**NEW (4/2023)**: *PYLATEXENC 3.0alpha* is in pre-release on PyPI.  See `new features\nand major changes \u003chttps://pylatexenc.readthedocs.io/en/latest/new-in-pylatexenc-3/\u003e`_.\nThe `documentation \u003chttps://pylatexenc.readthedocs.io/en/latest/\u003e`_ is still\nincomplete, and the new APIs are still subject to changes.  The code is meant\nto be as backwards compatible as is reasonably possible.  Feel free to try it\nout \u0026 submit feedback!\n\n\nUnicode Text to LaTeX code\n--------------------------\n\nThe ``pylatexenc.latexencode`` module provides a function ``unicode_to_latex()``\nwhich converts a unicode string into LaTeX text and escape sequences. It should\nrecognize accented characters and most math symbols. A couple of switches allow\nyou to alter how this function behaves.\n\nYou can also run ``latexencode`` in command-line to convert plain unicode text\n(from the standard input or from files given on the command line) into LaTeX\ncode, written on to the standard output.\n\nA third party plug-in for Vim\n`vim-latexencode \u003chttps://github.com/Konfekt/vim-latexencode\u003e`_\nby `@Konfekt \u003chttps://github.com/Konfekt\u003e`_\nprovides a corresponding command to operate on a given range.\n\n\nParsing LaTeX code \u0026 converting to plain text (unicode)\n-------------------------------------------------------\n\nThe ``pylatexenc.latexwalker`` module provides a series of routines that parse\nthe LaTeX structure of given LaTeX code and returns a logical structure of\nobjects, which can then be used to produce output in another format such as\nplain text.  This is not a replacement for a full (La)TeX engine, rather, this\nmodule provides a way to parse a chunk of LaTeX code as mark-up code.\n\nThe ``pylatexenc.latex2text`` module builds up on top of\n``pylatexenc.latexwalker`` and provides functions to convert given LaTeX code to\nplain text with unicode characters.\n\nYou can also run ``latex2text`` in command-line to convert LaTeX input (either\nfrom the standard input, or from files given on the command line) into plain\ntext written on the standard output.\n\n\nDocumentation\n-------------\n\nFull documentation is available at https://pylatexenc.readthedocs.io/.\n\nTo build the documentation manually, run::\n\n  \u003e poetry install --with=builddoc\n  \u003e cd doc/\n  doc\u003e poetry run make html\n\n\nLicense\n-------\n\nSee LICENSE.txt (MIT License).\n\nNOTE: See copyright notice and license information for file\n``tools/unicode.xml`` provided in ``tools/unicode.xml.LICENSE``.  (The file\n``tools/unicode.xml`` was downloaded from\nhttps://www.w3.org/2003/entities/2007xml/unicode.xml as linked from\nhttps://www.w3.org/TR/xml-entity-names/#source.)\n\n\nJavascript Library\n------------------\n\nSome core parts of this library can be transcribed to JavaScript.  This feature\nis used (and was developed for) my `Flexible Latex-like Markup\nproject \u003chttps://github.com/phfaist/flm\u003e`_.  See the *js-transcrypt/* folder and\nits `README file \u003cjs-transcrypt/README.md\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphfaist%2Fpylatexenc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphfaist%2Fpylatexenc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphfaist%2Fpylatexenc/lists"}