{"id":14981022,"url":"https://github.com/nvlang/sveltex","last_synced_at":"2025-10-15T08:44:52.489Z","repository":{"id":246720585,"uuid":"762883389","full_name":"nvlang/sveltex","owner":"nvlang","description":"Svelte + Markdown + LaTeX","archived":false,"fork":false,"pushed_at":"2024-09-01T15:59:09.000Z","size":81363,"stargazers_count":6,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T22:01:41.539Z","etag":null,"topics":["latex","markdown","svelte"],"latest_commit_sha":null,"homepage":"https://sveltex.dev","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/nvlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2024-02-25T00:23:27.000Z","updated_at":"2025-01-14T01:24:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"5975f717-aea2-4ee5-ba94-9c82e9ecacb8","html_url":"https://github.com/nvlang/sveltex","commit_stats":{"total_commits":384,"total_committers":2,"mean_commits":192.0,"dds":0.0234375,"last_synced_commit":"dfb6a100fd08127ae40463e7819cbf1fd0db096a"},"previous_names":["nvlang/sveltex"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvlang%2Fsveltex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvlang%2Fsveltex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvlang%2Fsveltex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvlang%2Fsveltex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nvlang","download_url":"https://codeload.github.com/nvlang/sveltex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238768420,"owners_count":19527197,"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","markdown","svelte"],"created_at":"2024-09-24T14:02:45.224Z","updated_at":"2025-10-15T08:44:52.482Z","avatar_url":"https://github.com/nvlang.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Integrations"],"sub_categories":["Preprocessing"],"readme":"\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n\u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/nvlang/sveltex/main/res/dark/logotype.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/nvlang/sveltex/main/res/light/logotype.svg\"\u003e\n    \u003cimg alt=\"Logotype\" src=\"https://raw.githubusercontent.com/nvlang/sveltex/main/res/light/logotype.svg\" width=\"40%\"\u003e\n\u003c/picture\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cdiv\u003e\n\n[\n\u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/github/v/tag/nvlang/sveltex?style=flat-square\u0026logo=GitHub\u0026logoColor=a3acb7\u0026label=\u0026labelColor=21262d\u0026color=21262d\u0026filter=@nvl/sveltex@*\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://img.shields.io/github/v/tag/nvlang/sveltex?style=flat-square\u0026logo=GitHub\u0026logoColor=24292f\u0026label=\u0026labelColor=eaeef2\u0026color=eaeef2\u0026filter=@nvl/sveltex@*\"\u003e\n    \u003cimg alt=\"GitHub version tag\" src=\"https://img.shields.io/github/v/tag/nvlang/sveltex?style=flat-square\u0026logo=GitHub\u0026logoColor=24292f\u0026label=\u0026labelColor=eaeef2\u0026color=eaeef2\u0026filter=@nvl/sveltex@*\"\u003e\n\u003c/picture\u003e\n](https://github.com/nvlang/sveltex)\n[\n\u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/badge/@nvl/sveltex-_?style=flat-square\u0026logo=npm\u0026logoColor=a3acb7\u0026labelColor=21262d\u0026color=21262d\u0026logoSize=auto)\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://img.shields.io/badge/@nvl/sveltex-_?style=flat-square\u0026logo=npm\u0026logoColor=24292f\u0026labelColor=eaeef2\u0026color=eaeef2\u0026logoSize=auto)\"\u003e\n    \u003cimg alt=\"NPM package name\" src=\"https://img.shields.io/badge/@nvl/sveltex-_?style=flat-square\u0026logo=npm\u0026logoColor=24292f\u0026labelColor=eaeef2\u0026color=eaeef2\u0026logoSize=auto)\"\u003e\n\u003c/picture\u003e\n](https://npmjs.com/@nvl/sveltex)\n[\n\u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/badge/@nvl/sveltex-_?style=flat-square\u0026labelColor=21262d\u0026color=21262d\u0026logo=jsr\u0026logoColor=a3acb7\u0026logoSize=auto\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://img.shields.io/badge/@nvl/sveltex-_?style=flat-square\u0026labelColor=eaeef2\u0026color=eaeef2\u0026logo=jsr\u0026logoColor=24292f\u0026logoSize=auto\"\u003e\n    \u003cimg alt=\"JSR package name\" src=\"https://img.shields.io/badge/@nvl/sveltex-_?style=flat-square\u0026labelColor=eaeef2\u0026color=eaeef2\u0026logo=jsr\u0026logoColor=24292f\u0026logoSize=auto\"\u003e\n\u003c/picture\u003e\n](https://jsr.io/@nvl/sveltex)\n[\n\u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://jsr.io/badges/@nvl/sveltex/score?style=flat-square\u0026labelColor=21262d\u0026color=21262d\u0026logoColor=a3acb7\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://jsr.io/badges/@nvl/sveltex/score?style=flat-square\u0026labelColor=eaeef2\u0026color=eaeef2\u0026logoColor=24292f\"\u003e\n    \u003cimg alt=\"JSR score\" src=\"https://jsr.io/badges/@nvl/sveltex/score?style=flat-square\u0026labelColor=eaeef2\u0026color=eaeef2\u0026logoColor=24292f\"\u003e\n\u003c/picture\u003e\n](https://jsr.io/@nvl/sveltex)\n[\n\u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/codecov/c/github/nvlang/sveltex?flag=sveltex\u0026style=flat-square\u0026logo=codecov\u0026label=\u0026logoColor=a3acb7\u0026labelColor=21262d\u0026color=21262d\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://img.shields.io/codecov/c/github/nvlang/sveltex?flag=sveltex\u0026style=flat-square\u0026logo=codecov\u0026label=\u0026logoColor=24292f\u0026labelColor=eaeef2\u0026color=eaeef2\"\u003e\n    \u003cimg alt=\"CodeCov coverage\" src=\"https://img.shields.io/codecov/c/github/nvlang/sveltex?flag=sveltex\u0026style=flat-square\u0026logo=codecov\u0026label=\u0026logoColor=24292f\u0026labelColor=eaeef2\u0026color=eaeef2\"\u003e\n\u003c/picture\u003e\n](https://codecov.io/gh/nvlang/sveltex)\n\n\u003c/div\u003e\n\u003c/div\u003e\n\n\n## Getting Started\n\n**Note:** See the [docs] for more information.\u003cbr\u003e\n**Note**: This package is [ESM-only].\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eCreating a new project\u003c/b\u003e\u003c/summary\u003e\n\nYou can use the [`create-sveltex`] package to create a new project using SvelTeX:\n\n```sh\npnpm dlx create-sveltex # If using PNPM\nbunx     create-sveltex # If using Bun\nnpx      create-sveltex # If using NPM\nyarn dlx create-sveltex # If using Yarn\n```\n\n...and follow the prompts.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eAdding to an existing project\u003c/b\u003e\u003c/summary\u003e\n\n#### Installation\n\n```sh\npnpm add -D @nvl/sveltex     # If using PNPM\nbun  add -D @nvl/sveltex     # If using Bun\nnpm  add -D @nvl/sveltex     # If using NPM\nyarn add -D @nvl/sveltex     # If using Yarn\ndeno add -D jsr:@nvl/sveltex # If using Deno\n```\n\n#### Basic steup\n\n```js\n// svelte.config.js\nimport { vitePreprocess } from '@sveltejs/vite-plugin-svelte';\nimport { sveltex } from '@nvl/sveltex';\n\n/** @type {import('@sveltejs/kit').Config} */\nconst config = {\n    preprocess: [\n        vitePreprocess(), // (optional)\n        await sveltex({\n            markdownBackend: 'unified',\n            codeBackend: 'shiki',\n            mathBackend: 'mathjax',\n        }, {\n            // Options\n        }),\n    ],\n    extensions: ['.svelte', '.sveltex'],\n};\n\nexport default config;\n```\n\nNow, install the backends (see IntelliSense or the error message you'd get if\nyou tried to run the above code without installing the backends), and you should\nbe good to go. Create a `+page.sveltex` file in your `src/routes` directory, and\nstart adding markdown, math, code blocks, and even TeX components.\n\nSee the [docs] for more information on how to use SvelTeX.\n\n\u003c/details\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/nvlang/sveltex/main/res/dark/screenshot.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/nvlang/sveltex/main/res/light/screenshot.png\"\u003e\n    \u003cimg alt=\"Logotype\" src=\"https://raw.githubusercontent.com/nvlang/sveltex/main/res/light/screenshot.png\" width=\"100%\"\u003e\n\u003c/picture\u003e\n\u003c/div\u003e\n\n## Editor integration\n\nFor VS Code, you can install the official [SvelTeX extension] from the\nmarketplace. This will provide syntax highlighting for `.sveltex` files.\n\nFor other editors, you'd need to configure syntax highlighting yourself using\nthe SvelTeX [TextMate grammar] provided within the VS Code extension.\n\nProper LSP-style language support is not currently implemented. Doing so via\ne.g. [request forwarding] could be an immense enrichment to the developer\nexperience, but it's not something I can currently commit to. Contributions for\nthis would be extremely welcome.\n\n## Acknowledgments\n\nSee [acknowledgments] on the project site.\n\n**Note:** The TSDoc comments for many of this project's interfaces, particularly\nthose describing options to be passed to external libraries, may be copies,\nparaphrasings, or adaptations of the official documentations of the respective\nlibraries. Some notable examples are MathJax and TikZ.\n\n\n[docs]: https://sveltex.dev/docs\n[ESM-only]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n[`create-sveltex`]: https://www.npmjs.com/package/create-sveltex\n[SvelTeX extension]: https://marketplace.visualstudio.com/items?itemName=sveltex-preprocessor.sveltex\n[TextMate grammar]: ./packages/vscode-sveltex/syntaxes\n[request forwarding]: https://code.visualstudio.com/api/language-extensions/embedded-languages#request-forwarding\n[acknowledgments]: https://sveltex.dev/docs/acknowledgments\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvlang%2Fsveltex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvlang%2Fsveltex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvlang%2Fsveltex/lists"}