{"id":15787157,"url":"https://github.com/tomtung/latex2unicode","last_synced_at":"2025-04-26T16:20:59.077Z","repository":{"id":2479184,"uuid":"3452368","full_name":"tomtung/latex2unicode","owner":"tomtung","description":"Convert LaTeX markup to Unicode (in Scala and Java)","archived":false,"fork":false,"pushed_at":"2022-05-02T06:10:13.000Z","size":92,"stargazers_count":38,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-26T10:34:10.713Z","etag":null,"topics":["latex","parsing","peg"],"latest_commit_sha":null,"homepage":"http://latex2unicode.herokuapp.com/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomtung.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}},"created_at":"2012-02-15T18:42:54.000Z","updated_at":"2025-03-23T13:54:54.000Z","dependencies_parsed_at":"2022-08-27T05:13:08.279Z","dependency_job_id":null,"html_url":"https://github.com/tomtung/latex2unicode","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtung%2Flatex2unicode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtung%2Flatex2unicode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtung%2Flatex2unicode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtung%2Flatex2unicode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomtung","download_url":"https://codeload.github.com/tomtung/latex2unicode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250976115,"owners_count":21516878,"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":["latex","parsing","peg"],"created_at":"2024-10-04T21:05:52.665Z","updated_at":"2025-04-26T16:20:59.060Z","avatar_url":"https://github.com/tomtung.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[online demo]: http://latex2unicode.herokuapp.com/\n[demo source]: https://github.com/tomtung/latex2unicode-demo\n[PEG]: https://en.wikipedia.org/wiki/Parsing_expression_grammar\n[fastparse]: http://www.lihaoyi.com/fastparse\n[latex-to-unicode by ypsu]: https://github.com/ypsu/latex-to-unicode\n[latex-to-unicode by vikhyat]: https://github.com/vikhyat/latex-to-unicode\n\n# LaTeX2Unicode [![Build Status](https://github.com/tomtung/latex2unicode/actions/workflows/scala.yml/badge.svg)](https://github.com/tomtung/latex2unicode/actions/workflows/scala.yml)\n\nLaTeX2Unicode translates LaTeX markup to human readable Unicode when possible. Here's an [online demo] that can be conveniently used to type in special characters. ([demo source])\n\nBasic math notations are supported. For instance:\n\n```\n\\because \\t{AB} + \\t{BC} \\neq \\t{AC}\n\\therefore \\iint\\sqrt[4]{\\xi^{\\theta+1}} - \\frac 38 \\le\n\\Sigma \\zeta_i \\\\\n\\therefore \\exists{x}\\forall{y} x \\in \\^A\n```\n\nis converted to\n\n\u003e ∵ A͡B + B͡C ≠ A͡C ∴ ∬∜ξ̅ᶿ̅⁺̅¹̅ - ⅜ ≤ Σ ζᵢ\n\n\u003e ∴ ∃x∀y x ∈ Â\n\nHundreds of other symbols and special characters are supported, too. For example, `\\spadesuit`, `\\aleph`, `\\OE`, `\\downdownarrows` and `\\o` are translated to `♠`, `ℵ`, `Œ`, `⇊`, `ø`, respectively.\n\nSome font styles are supported, too. For instance:\n\n```\n\\textbb{Black Board Bold}, \\textfrak{Fraktur},\n{\\bf Bold Face}, {\\cal Calligraphic}, {\\it Italic},\n{\\tt Monospace}\n```\n\nis translated to\n\n\u003e 𝔹𝕝𝕒𝕔𝕜 𝔹𝕠𝕒𝕣𝕕 𝔹𝕠𝕝𝕕, 𝔉𝔯𝔞𝔨𝔱𝔲𝔯, 𝐁𝐨𝐥𝐝 𝐅𝐚𝐜𝐞, 𝓒𝓪𝓵𝓵𝓲𝓰𝓻𝓪𝓹𝓱𝓲𝓬, 𝐼𝑡𝑎𝑙𝑖𝑐, 𝙼𝚘𝚗𝚘𝚜𝚙𝚊𝚌𝚎\n\n# Using as Scala / Java Library\n\nLaTeX2Unicode is written in Scala, thus can serve as a 3rd party library in any JVM application that needs to extract information from LaTeX texts (e.g. BibTeX).\n\n## Simple Conversion\n\nFor simple conversion without configuration, which works fine in most cases, one call to a static method and you're done.\n\nIn Scala:\n\n```scala\nimport com.github.tomtung.latex2unicode._\n\nval latex = \"\\\\ss^2 + \\\\alpha_3 \\n \\\\div \\\\frac{1}{3} = \\\\sqrt[3]{123}\"\nval unicode = LaTeX2Unicode.convert(latex)\nprintln(unicode)\n```\n\nIn Java:\n\n```java\nimport com.github.tomtung.latex2unicode.LaTeX2Unicode;\n\nString latex = \"\\\\ss^2 + \\\\alpha_3 \\n \\\\div \\\\frac{1}{3} = \\\\sqrt[3]{123}\"\nString unicode = LaTeX2Unicode.convert(latex)\nSystem.out.println(unicode);\n```\n\n\n## Maven / SBT Dependency\n\nTo add dependency on LaTeX2Unicode, insert the following to your `pom.xml` file if you use Apache Maven:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.tomtung\u003c/groupId\u003e\n    \u003cartifactId\u003elatex2unicode_2.12\u003c/artifactId\u003e\n    \u003cversion\u003e0.3.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nor add the following to your `build.sbt` file if you use sbt 0.11+:\n\n```scala\nlibraryDependencies += \"com.github.tomtung\" %% \"latex2unicode\" % \"0.3.2\"\n```\n# Credits\n\nLaTeX2Unicode is inspired by two similar projects, [latex-to-unicode by ypsu] \\(written in Python\\) and [latex-to-unicode by vikhyat] \\(written in Ruby\\).\n\nLaTeX2Unicode is built on [fastparse], an fast and elegant [PEG] parsing framework.\n\n# Licence\n\nApache License Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtung%2Flatex2unicode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomtung%2Flatex2unicode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtung%2Flatex2unicode/lists"}