{"_id":"@adheil_gupta/react-native-latex-renderer","_rev":"4-592c0214ba041fbcd8de3bdd196a4812","name":"@adheil_gupta/react-native-latex-renderer","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@adheil_gupta/react-native-latex-renderer","version":"1.0.0","keywords":["react-native","ios","android","latex","katex","math","mathematics","formula","equation","renderer","webview","autoheight","typesetting"],"author":{"url":"https://github.com/ibeginnernoob","name":"ibeginnernoob","email":"adheilgupta@gmail.com"},"license":"MIT","_id":"@adheil_gupta/react-native-latex-renderer@1.0.0","maintainers":[{"name":"adheil_gupta","email":"adheilgupta@gmail.com"}],"homepage":"https://github.com/ibeginnernoob/react-native-latex#readme","bugs":{"url":"https://github.com/ibeginnernoob/react-native-latex/issues"},"dist":{"shasum":"edbf3c9433c9ac958c511c8a3ffd1b18726a8993","tarball":"https://registry.npmjs.org/@adheil_gupta/react-native-latex-renderer/-/react-native-latex-renderer-1.0.0.tgz","fileCount":20,"integrity":"sha512-4E+qvrsOyMhNavxUhHlOSFcl6N4NYJph/fiYUsBW5wN+/iS1td/ZZ7knrbFI3HL128qs+8UXfquAiyjXHnvXGg==","signatures":[{"sig":"MEYCIQCYOU4HGnKmmaBNG93EjizjG1w0I7gRR3cBSuG3pAdFEgIhAMmIHBPkHBhuCZbROUwy+iNTRvalwgetC6eYNY8E98lC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49316},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"types":"./lib/typescript/src/index.d.ts","source":"./src/index.tsx","default":"./lib/module/index.js"},"./package.json":"./package.json"},"gitHead":"76f360b86e1293935b8ab5b0e59e09c368255d25","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli lib","example":"yarn workspace react-native-latex-example","prepare":"bob build","release":"release-it --only-version","typecheck":"tsc"},"_npmUser":{"name":"adheil_gupta","email":"adheilgupta@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/ibeginnernoob/react-native-latex.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.9.2","description":"A lightweight, auto-resizing LaTeX renderer for React Native using KaTeX.","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.1","devDependencies":{"jest":"^29.7.0","react":"*","eslint":"^9.35.0","del-cli":"^6.0.0","prettier":"^3.6.2","@eslint/js":"^9.35.0","commitlint":"^19.8.1","release-it":"^19.0.4","typescript":"^5.9.2","@types/jest":"^29.5.14","@types/react":"^19.1.12","react-native":"*","@eslint/compat":"^1.3.2","@eslint/eslintrc":"^3.3.1","eslint-plugin-jest":"^29.0.1","react-native-webview":"*","eslint-plugin-ft-flow":"^3.0.11","@evilmartians/lefthook":"^1.12.3","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","react-native-builder-bob":"^0.40.13","@typescript-eslint/parser":"^8.43.0","@react-native/babel-preset":"0.81.1","eslint-plugin-react-native":"^5.0.0","@react-native/eslint-config":"^0.81.1","@formidable-webview/webshell":"*","@commitlint/config-conventional":"^19.8.1","@typescript-eslint/eslint-plugin":"^8.43.0","@release-it/conventional-changelog":"^10.0.1"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*","@formidable-webview/webshell":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-latex-renderer_1.0.0_1764827959541_0.6949646929893731","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"create-react-native-library":{"type":"library","version":"0.54.3","languages":"js"}},"1.0.1":{"name":"@adheil_gupta/react-native-latex-renderer","version":"1.0.1","keywords":["react-native-latex-renderer","react-native","react-native-katex","react-native-latex","react-native-math","react-native-math-renderer","ios","android","latex","katex","math","mathematics","formula","equation","renderer","webview","autoheight","typesetting"],"author":{"url":"https://github.com/ibeginnernoob","name":"ibeginnernoob","email":"adheilgupta@gmail.com"},"license":"MIT","_id":"@adheil_gupta/react-native-latex-renderer@1.0.1","maintainers":[{"name":"adheil_gupta","email":"adheilgupta@gmail.com"}],"homepage":"https://github.com/ibeginnernoob/react-native-latex#readme","bugs":{"url":"https://github.com/ibeginnernoob/react-native-latex/issues"},"dist":{"shasum":"43caaff5bc6fee163dff038bcbad15173a55b3c7","tarball":"https://registry.npmjs.org/@adheil_gupta/react-native-latex-renderer/-/react-native-latex-renderer-1.0.1.tgz","fileCount":20,"integrity":"sha512-/1HmUliOavMVQ+ygTJqqU8QcUye2rotpw5HgI39GAdclTIqiSrZg1BsKBp8e/MDDZLCfEyy44Re9euHIrtXk3A==","signatures":[{"sig":"MEYCIQC/CETE/IAv43+UbbCHpHUC6USWTFQ6jj6eKWWirnAu6gIhAM+kyGcSBVwnKFLKyGi/Leqzphp6Rd3gdzE/lsjYGqe7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49578},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"types":"./lib/typescript/src/index.d.ts","source":"./src/index.tsx","default":"./lib/module/index.js"},"./package.json":"./package.json"},"gitHead":"38faf04e180368210c1a58b30082207d2f9a66ee","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli lib","example":"yarn workspace react-native-latex-example","prepare":"bob build","release":"release-it --only-version","typecheck":"tsc"},"_npmUser":{"name":"adheil_gupta","email":"adheilgupta@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/ibeginnernoob/react-native-latex.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.9.2","description":"A lightweight, auto-resizing LaTeX renderer for React Native using KaTeX.","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.1","devDependencies":{"jest":"^29.7.0","react":"*","eslint":"^9.35.0","del-cli":"^6.0.0","prettier":"^3.6.2","@eslint/js":"^9.35.0","commitlint":"^19.8.1","release-it":"^19.0.4","typescript":"^5.9.2","@types/jest":"^29.5.14","@types/react":"^19.1.12","react-native":"*","@eslint/compat":"^1.3.2","@eslint/eslintrc":"^3.3.1","eslint-plugin-jest":"^29.0.1","react-native-webview":"*","eslint-plugin-ft-flow":"^3.0.11","@evilmartians/lefthook":"^1.12.3","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","react-native-builder-bob":"^0.40.13","@typescript-eslint/parser":"^8.43.0","@react-native/babel-preset":"0.81.1","eslint-plugin-react-native":"^5.0.0","@react-native/eslint-config":"^0.81.1","@formidable-webview/webshell":"*","@commitlint/config-conventional":"^19.8.1","@typescript-eslint/eslint-plugin":"^8.43.0","@release-it/conventional-changelog":"^10.0.1"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*","@formidable-webview/webshell":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-latex-renderer_1.0.1_1765366549978_0.5866019414493806","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"create-react-native-library":{"type":"library","version":"0.54.3","languages":"js"}},"1.1.1":{"name":"@adheil_gupta/react-native-latex-renderer","version":"1.1.1","keywords":["react-native-latex-renderer","react-native","react-native-katex","react-native-latex","react-native-math","react-native-math-renderer","ios","android","latex","katex","math","mathematics","formula","equation","renderer","webview","autoheight","typesetting"],"author":"ibeginnernoob <adheilgupta@gmail.com> (https://github.com/ibeginnernoob)","license":"MIT","_id":"@adheil_gupta/react-native-latex-renderer@1.1.1","maintainers":[{"name":"adheil_gupta","email":"adheilgupta@gmail.com"}],"homepage":"https://github.com/ibeginnernoob/react-native-latex#readme","bugs":{"url":"https://github.com/ibeginnernoob/react-native-latex/issues"},"dist":{"shasum":"48087e58eebbf4fef365b4e17e1c8ab0dee09771","tarball":"https://registry.npmjs.org/@adheil_gupta/react-native-latex-renderer/-/react-native-latex-renderer-1.1.1.tgz","fileCount":20,"integrity":"sha512-lZnVeC8+5/5CABoYLnjbVGGm5bwShVgXFCknFkLcMmfs3TJcI3usSBdk07IUUlH1dlpSApl5CbpK4+qIBORNJA==","signatures":[{"sig":"MEUCIEFXgvPXZ2hdmjbu1tqJMaB+pvXnKD86frNtxu5Sbim6AiEAmP2J0QK3cUGy1DeDN5TIlJojzioUa3dnP8pcWA8hs54=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2003703},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"types":"./lib/typescript/src/index.d.ts","source":"./src/index.tsx","default":"./lib/module/index.js"},"./package.json":"./package.json"},"gitHead":"27fff1e63dcdb24307290e62323fdddeb90de43a","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli lib","example":"yarn workspace react-native-latex-example","prepare":"bob build","release":"release-it --only-version","typecheck":"tsc","generate-assets":"node scripts/generate-katex-assets.js"},"_npmUser":{"name":"adheil_gupta","email":"adheilgupta@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":false},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"conventionalcommits"}}}},"repository":{"url":"git+https://github.com/ibeginnernoob/react-native-latex.git","type":"git"},"workspaces":["example"],"description":"A lightweight, auto-resizing LaTeX renderer for React Native using KaTeX.","directories":{},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.1","devDependencies":{"jest":"^29.7.0","katex":"^0.16.45","react":"*","eslint":"^9.35.0","del-cli":"^6.0.0","prettier":"^3.6.2","@eslint/js":"^9.35.0","commitlint":"^19.8.1","release-it":"^19.0.4","typescript":"^5.9.2","@types/jest":"^29.5.14","@types/react":"^19.1.12","react-native":"*","@eslint/compat":"^1.3.2","@eslint/eslintrc":"^3.3.1","eslint-plugin-jest":"^29.0.1","react-native-webview":"*","@evilmartians/lefthook":"^1.12.3","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","react-native-builder-bob":"^0.40.13","@typescript-eslint/parser":"^8.43.0","@react-native/babel-preset":"0.81.1","eslint-plugin-react-native":"^5.0.0","@react-native/eslint-config":"^0.81.1","@commitlint/config-conventional":"^19.8.1","@typescript-eslint/eslint-plugin":"^8.43.0","@release-it/conventional-changelog":"^10.0.1","conventional-changelog-conventionalcommits":"^9.3.1"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-latex-renderer_1.1.1_1778616144923_0.15347959665638067","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]}},"1.1.2":{"name":"@adheil_gupta/react-native-latex-renderer","version":"1.1.2","description":"A lightweight, auto-resizing LaTeX renderer for React Native using KaTeX.","main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"source":"./src/index.tsx","types":"./lib/typescript/src/index.d.ts","default":"./lib/module/index.js"},"./package.json":"./package.json"},"scripts":{"example":"yarn workspace react-native-latex-example","test":"jest","typecheck":"tsc","lint":"eslint \"**/*.{js,ts,tsx}\"","clean":"del-cli lib","prepare":"bob build","generate-assets":"node scripts/generate-katex-assets.js","release":"release-it --only-version"},"keywords":["react-native-latex-renderer","react-native","react-native-katex","react-native-latex","react-native-math","react-native-math-renderer","ios","android","latex","katex","math","mathematics","formula","equation","renderer","webview","autoheight","typesetting"],"repository":{"type":"git","url":"git+https://github.com/iAmAdheil/react-native-LaTeX-renderer.git"},"author":{"name":"iAmAdheil","email":"adheilgupta@gmail.com","url":"https://github.com/iAmAdheil"},"license":"MIT","bugs":{"url":"https://github.com/iAmAdheil/react-native-LaTeX-renderer/issues"},"homepage":"https://github.com/iAmAdheil/react-native-LaTeX-renderer#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"devDependencies":{"@commitlint/config-conventional":"^19.8.1","@eslint/compat":"^1.3.2","@eslint/eslintrc":"^3.3.1","@eslint/js":"^9.35.0","@evilmartians/lefthook":"^1.12.3","@react-native/babel-preset":"0.81.1","@react-native/eslint-config":"^0.81.1","@release-it/conventional-changelog":"^10.0.1","@types/jest":"^29.5.14","@types/react":"^19.1.12","@typescript-eslint/eslint-plugin":"^8.43.0","@typescript-eslint/parser":"^8.43.0","commitlint":"^19.8.1","conventional-changelog-conventionalcommits":"^9.3.1","del-cli":"^6.0.0","eslint":"^9.35.0","eslint-config-prettier":"^10.1.8","eslint-plugin-jest":"^29.0.1","eslint-plugin-prettier":"^5.5.4","eslint-plugin-react-native":"^5.0.0","jest":"^29.7.0","katex":"^0.16.45","prettier":"^3.6.2","react":"*","react-native":"*","react-native-builder-bob":"^0.40.13","react-native-webview":"*","release-it":"^19.0.4","typescript":"^5.9.2"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*"},"workspaces":["example"],"packageManager":"yarn@3.6.1","jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":false},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"conventionalcommits"}}}},"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"react-native-builder-bob":{"source":"src","output":"lib","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"_id":"@adheil_gupta/react-native-latex-renderer@1.1.2","gitHead":"a27ff9b4f0367ac8a12de7de472ac49b15aa814c","_nodeVersion":"22.15.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-n1Hv51FFhxUnU2AsNqI6MRsdZJmkTS9KSVc6yu4EPVruBOT67WBXuNttI1esiN/K6QXxTsAN1VbkFk//tbL3LA==","shasum":"2e58afd092be91f7da5f1d4121938b763bd9795b","tarball":"https://registry.npmjs.org/@adheil_gupta/react-native-latex-renderer/-/react-native-latex-renderer-1.1.2.tgz","fileCount":20,"unpackedSize":2003859,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFvNRKebMr4VBpV9FDpfPwZhTX3+iTIdgxjkVoVaNkyeAiAu/OwKc5lQPnMiCZ8CQ6KMzUEyNxjUR3nj/9pkVJGndA=="}]},"_npmUser":{"name":"adheil_gupta","email":"adheilgupta@gmail.com"},"directories":{},"maintainers":[{"name":"adheil_gupta","email":"adheilgupta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-latex-renderer_1.1.2_1787506795702_0.6128455264031791"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-04T05:59:19.448Z","modified":"2026-08-23T17:39:56.036Z","1.0.0":"2025-12-04T05:59:19.691Z","1.0.1":"2025-12-10T11:35:50.122Z","1.1.1":"2026-05-12T20:02:25.123Z","1.1.2":"2026-08-23T17:39:55.875Z"},"bugs":{"url":"https://github.com/iAmAdheil/react-native-LaTeX-renderer/issues"},"author":{"name":"iAmAdheil","email":"adheilgupta@gmail.com","url":"https://github.com/iAmAdheil"},"license":"MIT","homepage":"https://github.com/iAmAdheil/react-native-LaTeX-renderer#readme","keywords":["react-native-latex-renderer","react-native","react-native-katex","react-native-latex","react-native-math","react-native-math-renderer","ios","android","latex","katex","math","mathematics","formula","equation","renderer","webview","autoheight","typesetting"],"repository":{"type":"git","url":"git+https://github.com/iAmAdheil/react-native-LaTeX-renderer.git"},"description":"A lightweight, auto-resizing LaTeX renderer for React Native using KaTeX.","maintainers":[{"name":"adheil_gupta","email":"adheilgupta@gmail.com"}],"readme":"# React Native Latex Renderer\n\n⭐ If this package helps you, please [star the repo on GitHub](https://github.com/iAmAdheil/react-native-LaTeX-renderer) — it helps others find it.\n\nA lightweight, offline-capable, auto-resizing LaTeX renderer for React Native using [KaTeX](https://katex.org/). No native modules. No internet required.\n\n## When to use this package\n\nThis package is the right choice when:\n\n- You are using **Expo managed workflow** and cannot add native modules\n- You are on the **Old Architecture** and cannot use Fabric/TurboModules\n- You need **zero native setup** — no `pod install`, no Kotlin/Swift, no build configuration\n- You are rendering **standalone LaTeX equations** (not full markdown documents)\n\n### When to use something else instead\n\nIf your use case goes beyond standalone LaTeX, better-suited libraries exist:\n\n| Need | Recommended library |\n|---|---|\n| Markdown + math (headers, bold, tables, code blocks) | [react-native-enriched-markdown](https://github.com/software-mansion-labs/react-native-enriched-markdown) by Software Mansion — fully native, no WebView, New Architecture |\n| Markdown + math with streaming (LLM/SSE outputs) | [react-native-nitro-markdown](https://github.com/JoaoPauloCMarra/react-native-nitro-markdown) — native C++ parser, built-in streaming support |\n\nBoth of those libraries require the New Architecture and native module setup. If that is not a constraint for you, they will give you better performance and broader feature coverage than this package.\n\n## Features\n\n*   **Offline**: KaTeX is fully bundled — no CDN, no network required.\n*   **Auto-resizing**: Automatically adjusts height based on content.\n*   **Zero native modules**: Works in Expo managed workflow and Old Architecture projects out of the box.\n*   **Customizable**: Extensive styling options for container, text, and math elements.\n*   **TypeScript Support**: Fully typed for better development experience.\n\n## Installation\n\n```sh\n# npm\nnpm install @adheil_gupta/react-native-latex-renderer react-native-webview\n\n# yarn\nyarn add @adheil_gupta/react-native-latex-renderer react-native-webview\n```\n\nKaTeX is bundled inside the package — no CDN links, no additional setup needed.\n\n## Usage\n\nPass content as a string with math equations wrapped with:\n\n- `$ ... $` -> to display inline math\n- `$$ ... $$` -> to display the equation on a new line\n\n### Simple Example\n\n```js\nimport { KaTeXAutoHeightWebView, createKaTeXHTML } from '@adheil_gupta/react-native-latex-renderer';\nimport { View, StyleSheet } from 'react-native';\n\nconst testString = `\n  This is a test latex equation:\n  $$\n  I(\\\\lambda)\n  =\n  \\\\int_0^{\\\\infty} e^{-\\\\lambda x^2}\\\\cos(x)\\\\,dx\n  \\\\sim\n  \\\\sum_{k=0}^{\\\\infty}\n  \\\\frac{(-1)^k (2k)!}{2^{2k+1} k!}\n  \\\\lambda^{-k-\\\\tfrac12}\n  $$\n  End of test latex equation.\n`;\n\nexport default function HomeScreen() {\n  const src = createKaTeXHTML(\n    testString,\n    {\n      'width': '75%',\n      'font-size': '15px',\n      'color': 'pink',\n      'background-color': 'green',\n      'border': '1px solid black',\n    },\n    {\n      'color': 'white',\n      'background-color': 'purple',\n      'border': '1px solid red',\n    }\n  );\n\n  return (\n    <View style={styles.container}>\n      <KaTeXAutoHeightWebView\n        source={src}\n        onHeightChange={(height) => console.log('New height:', height)}\n        containerStyle={{\n          width: '100%',\n          backgroundColor: 'yellow',\n          borderWidth: '1',\n          borderColor: 'orange',\n        }}\n      />\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    backgroundColor: '#fff',\n    paddingVertical: 80,\n  },\n});\n```\n\n### Example Result\n\n<img src=\"https://res.cloudinary.com/dzaj1xdgz/image/upload/v1765365968/Screenshot_2025-12-10_at_4.52.50_PM_dfmgij.png\" alt=\"Example Result\" width=\"300\" />\n\n## API Reference\n\n### `createKaTeXHTML(content, containerStyles, latexStyles)`\n\nGenerates the HTML source string for the WebView.\n\n| Parameter | Type | Description |\n|---|---|---|\n| `content` | `string` | The text content containing LaTeX delimiters. |\n| `containerStyles` | `object` | Styles for the HTML container (font, padding, color, etc.). |\n| `latexStyles` | `object` | Styles specifically applied to KaTeX elements. |\n\n### `KaTeXAutoHeightWebView`\n\nThe main component that renders the LaTeX content.\n\n| Prop | Type | Default | Description |\n|---|---|---|---|\n| `source` | `string` | - | The HTML string returned by `createKaTeXHTML`. |\n| `onHeightChange` | `(height: number) => void` | - | Callback fired when content height changes. |\n| `minHeight` | `number` | `50` | Minimum height of the WebView. |\n| `containerStyle` | `object` | - | Styles for the outer React Native View. |\n| `...props` | `WebViewProps` | - | Any other props accepted by `react-native-webview`. |\n\n## Styling\n\nYou can style the component at three levels:\n\n1.  **React Native Container**: Using the `containerStyle` prop on `<KaTeXAutoHeightWebView />`.\n2.  **HTML Content**: Using the second argument of `createKaTeXHTML`. Supports standard CSS properties like `font-size`, `color`, `padding`, `line-height`.\n3.  **LaTeX Elements**: Using the third argument of `createKaTeXHTML`. Styles applied directly to `.katex` elements.\n\n## Contributing\n\n- [Development workflow](CONTRIBUTING.md#development-workflow)\n- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)\n- [Code of conduct](CODE_OF_CONDUCT.md)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}