{"id":13407714,"url":"https://github.com/sanity-io/latex-input","last_synced_at":"2025-10-27T20:30:55.523Z","repository":{"id":62646896,"uuid":"105533842","full_name":"sanity-io/latex-input","owner":"sanity-io","description":"LaTeX input for Sanity","archived":false,"fork":false,"pushed_at":"2025-02-04T19:44:32.000Z","size":4749,"stargazers_count":11,"open_issues_count":12,"forks_count":6,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-06T16:54:26.366Z","etag":null,"topics":["team-ecosystem"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanity-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-02T12:52:35.000Z","updated_at":"2024-11-06T10:00:55.000Z","dependencies_parsed_at":"2024-01-17T12:43:35.462Z","dependency_job_id":"c1699a8a-1534-492d-a3b8-6ce7b9cd829e","html_url":"https://github.com/sanity-io/latex-input","commit_stats":{"total_commits":63,"total_committers":9,"mean_commits":7.0,"dds":0.6507936507936508,"last_synced_commit":"acc3e0130b49e642915494a85b0be520d8916eff"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanity-io%2Flatex-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanity-io%2Flatex-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanity-io%2Flatex-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanity-io%2Flatex-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanity-io","download_url":"https://codeload.github.com/sanity-io/latex-input/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238552974,"owners_count":19491352,"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":["team-ecosystem"],"created_at":"2024-07-30T20:00:48.024Z","updated_at":"2025-10-27T20:30:55.519Z","avatar_url":"https://github.com/sanity-io.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# LaTeX input for Sanity\n\n\u003e For the v2 version, please refer to the [v2-branch](https://github.com/sanity-io/latex-input/tree/studio-v2).\n\n## What is it?\n\nsanity-plugin-latex-input adds support for `latex` schema type, so it can be used in Portable Text Editor (PTE) in Sanity Studio.\n\n![latex-input preview](assets/latex-input.png)\n\n## Installation\n\n```sh\nnpm install --save sanity-plugin-latex-input\n```\n\nor\n\n```sh\nyarn add sanity-plugin-latex-input\n```\n\n## Usage\n\n\nImport and add the plugin to your studio config in sanity.config.ts (or .js):\n\n```ts\nimport { latexInput } from \"sanity-plugin-latex-input\";\n\nexport default defineConfig({\n  /* ... */\n\n  plugins: [\n      latexInput()\n  ]\n})\n```\n\nYou may now use the type name `latex` in your schema, such as in portable text.\n\n## Example schema definition for portable text\n\n```\nimport React from 'react'\nconst mathInlineIcon = () =\u003e (\n  \u003cspan\u003e\n    \u003cspan style={{ fontWeight: 'bold' }}\u003e∑\u003c/span\u003eb\n  \u003c/span\u003e\n)\nconst mathIcon = () =\u003e \u003cspan style={{ fontWeight: 'bold' }}\u003e∑\u003c/span\u003e\n\nexport default {\n  name: 'portableTextWithLatex',\n  type: 'array',\n  title: 'Body',\n  of: [\n    {\n      type: 'block',\n      title: 'Block',\n      of: [\n        { type: 'latex', icon: mathInlineIcon, title: 'Inline math' },\n      ],\n    },\n    { type: 'latex', icon: mathIcon, title: 'Math block' },\n  ],\n}\n```\n\nThe Portable Text editor will render a preview of the contents with KaTeX.\n\n## License\n\nMIT-licensed. See LICENSE.\n\n## Develop \u0026 test\n\nThis plugin uses [@sanity/plugin-kit](https://github.com/sanity-io/plugin-kit)\nwith default configuration for build \u0026 watch scripts.\n\nSee [Testing a plugin in Sanity Studio](https://github.com/sanity-io/plugin-kit#testing-a-plugin-in-sanity-studio)\non how to run this plugin with hotreload in the studio.\n\n### Release new version\n\nRun [\"CI \u0026 Release\" workflow](https://github.com/sanity-io/latex-input/actions/workflows/main.yml).\nMake sure to select the v3 branch and check \"Release new version\".\n\nSemantic release will only release on configured branches, so it is safe to run release on any branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanity-io%2Flatex-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanity-io%2Flatex-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanity-io%2Flatex-input/lists"}