{"id":43390552,"url":"https://github.com/marcusfrdk/docmath","last_synced_at":"2026-02-02T13:02:05.964Z","repository":{"id":235481296,"uuid":"790781221","full_name":"marcusfrdk/docmath","owner":"marcusfrdk","description":"Code to embed in your documentation to make LaTeX math interactive.","archived":false,"fork":false,"pushed_at":"2024-04-24T15:11:24.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-24T17:34:14.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/marcusfrdk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-04-23T14:14:00.000Z","updated_at":"2024-04-24T15:11:28.000Z","dependencies_parsed_at":"2024-04-23T15:46:42.776Z","dependency_job_id":null,"html_url":"https://github.com/marcusfrdk/docmath","commit_stats":null,"previous_names":["marcusfrdk/docmath"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marcusfrdk/docmath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusfrdk%2Fdocmath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusfrdk%2Fdocmath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusfrdk%2Fdocmath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusfrdk%2Fdocmath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcusfrdk","download_url":"https://codeload.github.com/marcusfrdk/docmath/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusfrdk%2Fdocmath/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29012691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T12:48:30.580Z","status":"ssl_error","status_checked_at":"2026-02-02T12:46:38.384Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-02T13:02:02.721Z","updated_at":"2026-02-02T13:02:05.959Z","avatar_url":"https://github.com/marcusfrdk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocMath\n\nCode to embed in your documentation to make LaTeX math interactive.\n\n## Installation\n\nInclude the following code in the head of your document:\n\n### `\u003chead\u003e`\n\n```html\n\u003c!-- Stylesheets --\u003e\n\u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/katex@0.10.0-rc.1/dist/katex.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"https://raw.githubusercontent.com/marcusfrdk/docmath/main/index.css\"\u003e\n\n\u003c!-- Scripts --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/katex@0.10.0-rc.1/dist/katex.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://raw.githubusercontent.com/marcusfrdk/docmath/main/index.js\"\u003e\u003c/script\u003e\n```\n\n### `\u003cbody\u003e`\n\n```html\n\u003cscript\u003e\n  // KaTeX\n  // - {{output}} is the output of the compute() function.\n  // - {{...key}} is each key in the initialize() object, such as {{a}} and {{b}} in this example.\n  template = \"{{output}} = {{a}} + {{b}}\";\n  \n  // The function to compute {{output}}.\n  // ({a, b, ...}: Record\u003cstring, number\u003e) =\u003e number\n  function compute({a, b, ...}){\n    return a + b;\n  }\n\n  // Initialize the input fields and values\n  //\n  // initialize(values, options?);\n  //\n  // values: {\n  //   [id]: {\n  //     value: number, // optional\n  //     step: number | string, // optional\n  //     min: number | string, // optional\n  //     max: number | string, // optional\n  //   }\n  // }\n  //\n  // options: {\n  //   fractions: number,\n  // }\n  //\n  initialize({\n    a: {\n      value: 1,\n      step: 0.1,\n      min: 0,\n      max: \"b\", // The value of \"b\" (synced with the value of \"b)\n    },\n    b: {\n      value: 10\n    }, \n    ...\n  });\n\u003c/script\u003e\n```\n\n## Template\n\nThe template used to render the interactive math is a string that containes the KaTeX math and the variables to be replaced.\n\nKaTeX is a faster version of LaTeX that is used to render the math. You can find a list of supported functions [here](https://katex.org/docs/supported.html).\n\nYou can use any variable names in the template that are defined in the `initialize()` function. The `{{output}}` variable is the result of the `compute()` function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusfrdk%2Fdocmath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcusfrdk%2Fdocmath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusfrdk%2Fdocmath/lists"}