{"id":13714333,"url":"https://github.com/alvinwan/TexSoup","last_synced_at":"2025-05-07T01:33:27.611Z","repository":{"id":45631446,"uuid":"55289231","full_name":"alvinwan/TexSoup","owner":"alvinwan","description":"fault-tolerant Python3 package for searching, navigating, and modifying LaTeX documents","archived":false,"fork":false,"pushed_at":"2024-04-10T18:06:34.000Z","size":2575,"stargazers_count":260,"open_issues_count":26,"forks_count":42,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-23T04:45:52.595Z","etag":null,"topics":["document-tree","latex","latex-parser","parser","python","python3"],"latest_commit_sha":null,"homepage":"https://texsoup.alvinwan.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvinwan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2016-04-02T10:29:06.000Z","updated_at":"2024-06-18T17:07:25.117Z","dependencies_parsed_at":"2024-02-28T12:26:52.869Z","dependency_job_id":"101f0e04-2f46-4ec2-b6ff-188de4198092","html_url":"https://github.com/alvinwan/TexSoup","commit_stats":{"total_commits":228,"total_committers":16,"mean_commits":14.25,"dds":0.4956140350877193,"last_synced_commit":"19451a322a51e12fd30a9a391301aa31b937e9e2"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinwan%2FTexSoup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinwan%2FTexSoup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinwan%2FTexSoup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinwan%2FTexSoup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvinwan","download_url":"https://codeload.github.com/alvinwan/TexSoup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224551225,"owners_count":17330103,"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":["document-tree","latex","latex-parser","parser","python","python3"],"created_at":"2024-08-02T23:01:57.224Z","updated_at":"2024-11-14T01:31:01.413Z","avatar_url":"https://github.com/alvinwan.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003ca href=\"https://texsoup.alvinwan.com\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/2068077/55692228-b7f92d00-595a-11e9-93a2-90090a361d12.png\" width=\"80px\"\u003e\u003c/a\u003e\n\n# [TexSoup](https://texsoup.alvinwan.com)\n\n[![PyPi Downloads per Day](https://img.shields.io/pypi/dm/texsoup.svg)](https://pypi.python.org/pypi/TexSoup/)\n[![Build Status](https://travis-ci.org/alvinwan/TexSoup.svg?branch=master)](https://travis-ci.org/alvinwan/TexSoup)\n[![Coverage Status](https://coveralls.io/repos/github/alvinwan/TexSoup/badge.svg?branch=master)](https://coveralls.io/github/alvinwan/TexSoup?branch=master)\n\nTexSoup is a fault-tolerant, Python3 package for searching, navigating, and modifying LaTeX documents. You can skip installation and try TexSoup directly, using the [pytwiddle demo \u0026rarr;](https://pytwiddle.com/?id=example:latex.py)\n\n- [Getting Started](https://github.com/alvinwan/TexSoup#Getting-Started)\n- [Installation](https://github.com/alvinwan/TexSoup#Installation)\n- [API Reference](http://texsoup.alvinwan.com/docs/data.html)\n\nCreated by [Alvin Wan](http://alvinwan.com) + [contributors](https://github.com/alvinwan/TexSoup/graphs/contributors).\n\n# Getting Started\n\nTo parse a $LaTeX$ document, pass an open filehandle or a string into the\n`TexSoup` constructor.\n\n``` python\nfrom TexSoup import TexSoup\nsoup = TexSoup(\"\"\"\n\\begin{document}\n\n\\section{Hello \\textit{world}.}\n\n\\subsection{Watermelon}\n\n(n.) A sacred fruit. Also known as:\n\n\\begin{itemize}\n\\item red lemon\n\\item life\n\\end{itemize}\n\nHere is the prevalence of each synonym.\n\n\\begin{tabular}{c c}\nred lemon \u0026 uncommon \\\\\nlife \u0026 common\n\\end{tabular}\n\n\\end{document}\n\"\"\")\n```\n\nWith the soupified $\\LaTeX$, you can now search and traverse the document tree.\nThe code below demonstrates the basic functions that TexSoup provides.\n\n```python\n\u003e\u003e\u003e soup.section  # grabs the first `section`\n\\section{Hello \\textit{world}.}\n\u003e\u003e\u003e soup.section.name\n'section'\n\u003e\u003e\u003e soup.section.string\n'Hello \\\\textit{world}.'\n\u003e\u003e\u003e soup.section.parent.name\n'document'\n\u003e\u003e\u003e soup.tabular\n\\begin{tabular}{c c}\nred lemon \u0026 uncommon \\\\\nlife \u0026 common\n\\end{tabular}\n\u003e\u003e\u003e soup.tabular.args[0]\n'c c'\n\u003e\u003e\u003e soup.item\n\\item red lemon\n\u003e\u003e\u003e list(soup.find_all('item'))\n[\\item red lemon, \\item life]\n```\n\nFor more use cases, see [the Quickstart Guide](https://texsoup.alvinwan.com/docs/quickstart.html). Or, try TexSoup [online, via pytwiddle \u0026rarr;](https://pytwiddle.com/?id=example:latex.py)\n\nLinks:\n\n- [Quickstart Guide: how and when to use TexSoup](http://texsoup.alvinwan.com/docs/quickstart.html)\n- [Example Use Cases: counting references, resolving imports, and more](https://github.com/alvinwan/TexSoup/tree/master/examples)\n\n# Installation\n\n## Pip\n\nTexSoup is published via PyPi, so you can install it via `pip`. The package\nname is `TexSoup`:\n\n```bash\n$ pip install texsoup\n```\n\n## From source\n\nAlternatively, you can install the package from source:\n\n```bash\n$ git clone https://github.com/alvinwan/TexSoup.git\n$ cd TexSoup\n$ pip install .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinwan%2FTexSoup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvinwan%2FTexSoup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinwan%2FTexSoup/lists"}