{"id":14990726,"url":"https://github.com/fjebaker/zigtex","last_synced_at":"2025-07-02T21:05:08.442Z","repository":{"id":251759696,"uuid":"838362047","full_name":"fjebaker/zigtex","owner":"fjebaker","description":"Embeddable LaTeX to SVG in Zig.","archived":false,"fork":false,"pushed_at":"2025-05-12T21:43:03.000Z","size":588,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T21:04:42.389Z","etag":null,"topics":["latex","latex-to-svg","microtex","renderer","svg","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/fjebaker.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-05T13:38:13.000Z","updated_at":"2025-06-19T05:26:01.000Z","dependencies_parsed_at":"2025-07-02T21:04:43.617Z","dependency_job_id":null,"html_url":"https://github.com/fjebaker/zigtex","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"136bbf0181e3073b4e029cac6ad44561efa1a8d0"},"previous_names":["fjebaker/zigtex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fjebaker/zigtex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fzigtex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fzigtex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fzigtex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fzigtex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fjebaker","download_url":"https://codeload.github.com/fjebaker/zigtex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fzigtex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263215288,"owners_count":23431893,"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","latex-to-svg","microtex","renderer","svg","zig"],"created_at":"2024-09-24T14:20:39.903Z","updated_at":"2025-07-02T21:05:08.394Z","avatar_url":"https://github.com/fjebaker.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/assets/example.svg\" style=\"max-height: 150px; background-color: white;\"/\u003e\n    \u003ch1 style=\"text-align: center;\"\u003eZigTeX\u003c/h1\u003e\n\u003c/p\u003e\n\nZigTeX is a wrapper around [MicroTeX](https://github.com/NanoMichael/MicroTeX/tree/openmath) with a custom SVG renderer. ZigTeX principally gives you one function, which takes some LaTeX code and spits out an SVG:\n\n```zig\nconst std = @import(\"std\");\nconst ztex = @import(\"zigtex\");\n\npub fn main() !void {\n    var gpa = std.heap.GeneralPurposeAllocator(.{}){};\n    defer _ = gpa.deinit();\n    const allocator = gpa.allocator();\n\n    var render = try ztex.TexSvgRender.init(allocator, .{});\n    defer render.deinit();\n\n    const tex =\n        \\\\\\begin{equation}\n        \\\\    \\hat{F}(\\nu) = \\int_{-\\infty}^\\infty e^{-i 2\\pi t \\nu} f(t) \\text{d}t\n        \\\\\\end{equation}\n    ;\n\n    const output = try render.parseRender(allocator, tex, .{});\n    defer allocator.free(output);\n\n    var f = try std.fs.cwd().createFile(\"example.svg\", .{});\n    defer f.close();\n    try f.writeAll(output);\n}\n```\nThis produces the title image on a transparent background.\n\n## Usage\n\nTo use in your Zig project, add this project as a dependency\n```bash\nzig fetch --save https://github.com/fjebaker/zigtex/archive/main.tar.gz\n```\n\nThen modify your `build.zig` in the usual way:\n```zig\nconst zigtex_dep = b.dependency(\n    \"zigtex\",\n    .{.optimize = optimize, .target = target},\n);\n\n// ...\nexe.root_module.addImport(\"zigtex\", zigtex_dep.module(\"zigtex\"));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fzigtex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffjebaker%2Fzigtex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fzigtex/lists"}