{"id":19436645,"url":"https://github.com/tech-pw/renderx","last_synced_at":"2025-04-24T21:31:27.141Z","repository":{"id":222649101,"uuid":"757991571","full_name":"tech-pw/RenderX","owner":"tech-pw","description":"The GitHub repository \"RenderX\" by tech-pw is an Android library that enhances LaTeX and HTML rendering. It significantly improves performance by using native rendering for LaTeX equations, showing a considerable speed boost compared to traditional methods like MathJax. ","archived":false,"fork":false,"pushed_at":"2024-05-07T05:04:15.000Z","size":51044,"stargazers_count":23,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-07T06:24:19.480Z","etag":null,"topics":["android","android-application","android-library","equation","latex","mathjax","mathml"],"latest_commit_sha":null,"homepage":"https://www.pw.live","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tech-pw.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}},"created_at":"2024-02-15T12:08:30.000Z","updated_at":"2024-05-07T05:04:20.000Z","dependencies_parsed_at":"2024-03-11T05:38:20.024Z","dependency_job_id":null,"html_url":"https://github.com/tech-pw/RenderX","commit_stats":null,"previous_names":["tech-pw/pwhtmllatex","tech-pw/renderx"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-pw%2FRenderX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-pw%2FRenderX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-pw%2FRenderX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-pw%2FRenderX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tech-pw","download_url":"https://codeload.github.com/tech-pw/RenderX/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223968280,"owners_count":17233445,"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":["android","android-application","android-library","equation","latex","mathjax","mathml"],"created_at":"2024-11-10T15:12:12.413Z","updated_at":"2024-11-10T15:12:12.978Z","avatar_url":"https://github.com/tech-pw.png","language":"Kotlin","readme":"[![](https://jitpack.io/v/tech-pw/RenderX.svg)](https://jitpack.io/#tech-pw/RenderX)\n\n# Native Android library to render latex with HTML support\n\n## Introduction\nIn the realm of Android development, the struggle with sluggish equation rendering has been all too real. RenderX steps into the spotlight as a game-changing solution, not only accelerating LaTeX rendering but also seamlessly handling HTML with a nuanced fallback mechanism. \n\n#### The Dual Power of RenderX\n\n1. **Native Rendering Excellence:**\n    - Bid farewell to the performance bottlenecks associated with webviews. RenderX champions native rendering, dramatically enhancing the speed of LaTeX equation display on Android. Our benchmark tests reveal a 50-80% improvement, translating to a more responsive user experience.\n    So we have captured the frame rate graph while rendering Latex equations in RenderX vs MathJax. The difference can be visually seen.\n    \n\u003cdiv style=\"display: flex;\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/tech-pw/RenderX/aaa31df197a3320aea3a868b97d79b88038b3f5b/screenshots/Screenshot%202024-02-16%20at%203.34.50%20PM.png\" alt=\"Latex rendering\" style=\"width: 45%;\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/tech-pw/RenderX/aaa31df197a3320aea3a868b97d79b88038b3f5b/screenshots/Screenshot%202024-02-16%20at%203.35.03%20PM.png\" alt=\"MathJax Rendering\" style=\"width: 45%;\"\u003e\n\u003c/div\u003e\n\nhttps://github.com/tech-pw/RenderX/assets/160108670/65903362-d56b-4a3a-bb7c-776dd3856c4f\n\n\n2. **HTML + LaTeX Synergy:**\n    - One of RenderX's standout features is its ability to seamlessly render LaTeX embedded within HTML. This means developers can pass HTML with LaTeX equations directly, unleashing a new realm of possibilities. To illustrate its prowess, we've included real-world scenarios where HTML and LaTeX coexist harmoniously.\n\n```markdown\nExample \n\nRenderX(\n    latex = \"\u003ch2\u003eLaTeX Equations:\u003c/h2\u003e\\n\" +\n            \"\\n\" +\n            \"  \u003cp\u003eExample 1: Equation 1 \\\\(e^{i\\\\pi} + 1 = 0\\\\)\u003c/p\u003e\\n\" +\n            \"\\n\" +\n            \"  \u003cp\u003eExample 2: Equation with fractions \\\\[ f(x) = \\\\frac{1}{2\\\\pi i} \\\\oint_C \\\\frac{f(z)}{z-z_0} \\\\, dz \\\\]\u003c/p\u003e\\n\" +\n            \"\u003cp\u003eExample 3: Quadratic formula \\\\(x = \\\\frac{{-b \\\\pm \\\\sqrt{{b^2 - 4ac}}}}{{2a}}\\\\)\u003c/p\u003e\\n\" +\n            \"\\n\" +\n            \"  \u003cp\u003eExample 4: Maxwell's equations\\n\" +\n            \"  \\\\[\\n\" +\n            \"  \\\\begin{aligned}\\n\" +\n            \"  \\\\nabla \\\\cdot \\\\mathbf{E} \u0026= \\\\frac{\\\\rho}{\\\\varepsilon_0} \\\\\\\\\\n\" +\n            \"  \\\\nabla \\\\cdot \\\\mathbf{B} \u0026= 0 \\\\\\\\\\n\" +\n            \"  \\\\nabla \\\\times \\\\mathbf{E} \u0026= -\\\\frac{\\\\partial \\\\mathbf{B}}{\\\\partial t} \\\\\\\\\\n\" +\n            \"  \\\\nabla \\\\times \\\\mathbf{B} \u0026= \\\\mu_0 \\\\mathbf{J} + \\\\mu_0\\\\varepsilon_0 \\\\frac{\\\\partial \\\\mathbf{E}}{\\\\partial t}\\n\" +\n            \"  \\\\end{aligned}\\n\" +\n            \"  \\\\]\u003c/p\u003e\\n\" +\n            \"\\n\" +\n            \"  \u003cp\u003eExample 5: Dirac equation \\\\(\\\\gamma^\\\\mu (i\\\\hbar\\\\partial_\\\\mu - e A_\\\\mu) \\\\psi - m c \\\\psi = 0\\\\)\u003c/p\u003e\\n\"\n)\n```\nOutput \n![Rendeing screenshot](https://raw.githubusercontent.com/tech-pw/RenderX/bfb85a776e0a7d2e9a39f5e87666b7246e2fce5e/screenshots/Screenshot%202024-02-16%20at%204.39.23%20PM.png)\n\n3. **Versatile HTML Rendering:**\n    - RenderX isn't confined to LaTeX alone; it excels in rendering pure HTML content with equal finesse with support of rendeing images via coil. Explore scenarios where the library effortlessly handles diverse HTML content, making it a versatile choice for rendering beyond mathematical equations.\n\n4. **Intelligent Fallback Mechanism:**\n    - In complex scenarios where native rendering faces challenges, RenderX gracefully falls back to webview, so that it can be used in production ready usecases, ensuring a seamless user experience. \n\n## Integration Guide: Bringing pwHtml Latex Into Your Project:\n1) For new project system following has to be added to setting.gradle and for old system it has to be added to root level build.gradle\n\n```\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        ........... other repo\n        mavenCentral()\n        maven(\"https://jitpack.io\")\n\n    }\n}\n```\n\n2) Then add the dependency to the app level build.gradle\n\n```\t\ndependencies {\n\t        implementation 'com.github.tech-pw:RenderX:$version'\n\t}\n\n```\n\n# Contributing\n\nWhen contributing to this repository, please first discuss the change you wish to make via issue, or any other method with the owners of this repository before making a change.\n\nPlease note we have a code of conduct, please follow it in all your interactions with the project.\n\n## Pull Request Process\n\n1. Ensure any install or build dependencies are removed before the end of the layer when doing a\n   build.\n2. Update the README.md with details of changes to the interface, this includes new environment\n   variables, exposed ports, useful file locations and container parameters.\n3. You may merge the Pull Request in once you have the sign-off of two other developers, or if you\n   do not have permission to do that, you may request the second reviewer to merge it for you.\n\n## Code of Conduct\n\n### Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, gender identity and expression, level of experience,\nnationality, personal appearance, race, religion, or sexual identity and\norientation.\n\n### Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\nadvances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n### Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-pw%2Frenderx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftech-pw%2Frenderx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-pw%2Frenderx/lists"}