{"id":17921816,"url":"https://github.com/3axap4ehko/react-native-katex","last_synced_at":"2025-04-05T07:02:01.015Z","repository":{"id":57337905,"uuid":"116315349","full_name":"3axap4eHko/react-native-katex","owner":"3axap4eHko","description":"React Native library that uses WebView to render KaTeX mathematical expressions.","archived":false,"fork":false,"pushed_at":"2025-01-31T22:50:43.000Z","size":1216,"stargazers_count":40,"open_issues_count":0,"forks_count":28,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T06:01:45.514Z","etag":null,"topics":["katex","react","react-native"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3axap4eHko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":["3axap4eHko","zource-dev"],"patreon":"zource","custom":["https://paypal.me/3axap4eHko"]}},"created_at":"2018-01-04T22:50:47.000Z","updated_at":"2025-01-31T22:50:41.000Z","dependencies_parsed_at":"2024-03-10T21:31:00.261Z","dependency_job_id":"d784574c-5b51-47e6-a55f-579645e6ee8a","html_url":"https://github.com/3axap4eHko/react-native-katex","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"ff2122faf477d5515fa8fbbd1802143501de40ee"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3axap4eHko%2Freact-native-katex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3axap4eHko%2Freact-native-katex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3axap4eHko%2Freact-native-katex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3axap4eHko%2Freact-native-katex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3axap4eHko","download_url":"https://codeload.github.com/3axap4eHko/react-native-katex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299829,"owners_count":20916190,"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":["katex","react","react-native"],"created_at":"2024-10-28T20:36:16.772Z","updated_at":"2025-04-05T07:02:00.979Z","avatar_url":"https://github.com/3axap4eHko.png","language":"TypeScript","funding_links":["https://github.com/sponsors/3axap4eHko","https://github.com/sponsors/zource-dev","https://patreon.com/zource","https://paypal.me/3axap4eHko"],"categories":[],"sub_categories":[],"readme":"# React Native [\u003cimg src=\"https://katex.org/img/katex-logo-black.svg\" width=\"130\" alt=\"KaTeX\"\u003e](https://katex.org/)\n\nReact Native library that uses [WebView](https://github.com/react-native-community/react-native-webview) to render [KaTeX](https://github.com/Khan/KaTeX) mathematical expressions.\nThis approach enables the display of complex math formulas directly within React Native applications, facilitating their use in educational, scientific, and any other context where mathematical notation is required.\n\n[![NPM version][npm-image]][npm-url]\n[![Downloads][downloads-image]][npm-url]\n[![Github CI Status][github-image]][github-url]\n\n## Example\n\n[EXPO Snack][expo-url]\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"screenshot.jpg\" width=\"380\" alt=\"React Native KaTeX\"\u003e\n\u003c/p\u003e\n\n## Usage\n```javascript\nconst styles = StyleSheet.create({\n  katex: {\n    flex: 1,\n  }\n});\n\nconst inlineStyle = `\nhtml, body {\n  display: flex;\n  background-color: #fafafa;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n}\n.katex {\n  font-size: 4em;\n  margin: 0;\n  display: flex;\n}\n`;\n\nexport default function App() {\n  const inlineText = 'inline text';\n  const [loaded, setLoaded] = useState(false);\n  const [expression, setExpression] = useState(`\\\\text{${inlineText} }c=\\\\pm\\\\sqrt{a^2 + b^2}`);\n  setTimeout(() =\u003e setExpression(`\\\\text{${inlineText} }d=\\\\pm\\\\sqrt{a^2 + b^2}\\\\text{ still}`), 2000);\n\n  return (\n    \u003cKatex\n      expression={expression}\n      style={styles.katex}\n      inlineStyle={inlineStyle}\n      displayMode={false}\n      throwOnError={false}\n      errorColor=\"#f00\"\n      macros={{}}\n      colorIsTextColor={false}\n      onLoad={() =\u003e setLoaded(true)}\n      onError={() =\u003e console.error('Error')}\n    /\u003e\n  );\n}\n```\n\n\n## License\nLicense [The MIT License](http://opensource.org/licenses/MIT)\nCopyright (c) 2017-2024 Ivan Zakharchanka\n\n[downloads-image]: https://img.shields.io/npm/dm/react-native-katex.svg\n[npm-url]: https://www.npmjs.com/package/react-native-katex\n[npm-image]: https://img.shields.io/npm/v/react-native-katex.svg\n\n[github-url]: https://github.com/3axap4eHko/react-native-katex/actions/workflows/build.yml\n[github-image]: https://github.com/3axap4eHko/react-native-katex/actions/workflows/build.yml/badge.svg\n\n[expo-image]: https://raw.githubusercontent.com/3axap4eHko/react-native-katex/master/screenshot.png\n[expo-url]: https://snack.expo.io/@3axap4ehko/react-native-katex\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3axap4ehko%2Freact-native-katex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3axap4ehko%2Freact-native-katex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3axap4ehko%2Freact-native-katex/lists"}