{"id":24379662,"url":"https://github.com/channeladam/dev-mathjax-server-docker","last_synced_at":"2026-04-20T23:31:30.570Z","repository":{"id":44092218,"uuid":"200771789","full_name":"channeladam/dev-mathjax-server-docker","owner":"channeladam","description":"A MathJax server docker container to convert inline LaTeX to SVG, MathML or HTML.","archived":false,"fork":false,"pushed_at":"2022-12-09T21:40:55.000Z","size":227,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-28T13:31:08.761Z","etag":null,"topics":["docker","mathjax","mathjax-node","mathjax-server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/channeladam.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}},"created_at":"2019-08-06T03:45:53.000Z","updated_at":"2022-01-25T13:40:16.000Z","dependencies_parsed_at":"2023-01-25T21:45:46.671Z","dependency_job_id":null,"html_url":"https://github.com/channeladam/dev-mathjax-server-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/channeladam/dev-mathjax-server-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channeladam%2Fdev-mathjax-server-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channeladam%2Fdev-mathjax-server-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channeladam%2Fdev-mathjax-server-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channeladam%2Fdev-mathjax-server-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/channeladam","download_url":"https://codeload.github.com/channeladam/dev-mathjax-server-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channeladam%2Fdev-mathjax-server-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32070577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["docker","mathjax","mathjax-node","mathjax-server"],"created_at":"2025-01-19T07:18:19.379Z","updated_at":"2026-04-20T23:31:30.552Z","avatar_url":"https://github.com/channeladam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\nA MathJax server docker container to convert inline LaTeX to SVG, MathML or HTML.\n\nIntended only for running locally on a development or build server - through perhaps as a Hugo shortcode...\n\n# Example Usage\n\nAfter starting the docker container:\n\n```bash\n$ curl \"http://localhost:3000/?format=inline-TeX\u0026svg=1\u0026speakText=1\u0026math=\\mu\"\n```\n\nExample result: \n\n```javascript\n{\n    \"svg\":\"\u003csvg xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" width=\\\"1.346ex\\\" height=\\\"1.843ex\\\" style=\\\"vertical-align: -0.671ex;\\\" viewBox=\\\"0 -504.3 579.5 793.3\\\" role=\\\"img\\\" focusable=\\\"false\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" aria-labelledby=\\\"MathJax-SVG-1-Title\\\"\u003e\\n\u003ctitle id=\\\"MathJax-SVG-1-Title\\\"\u003emu\u003c/title\u003e\\n\u003cdefs aria-hidden=\\\"true\\\"\u003e\\n\u003cpath stroke-width=\\\"1\\\" id=\\\"E1-STIXWEBNORMALI-1D707\\\" d=\\\"M549 428l-86 -338c-4 -16 -8 -29 -8 -39c0 -8 5 -14 17 -14c23 0 45 27 57 48l15 -6c-15 -44 -84 -106 -131 -106c-29 0 -41 13 -41 41s14 94 33 171c-97 -146 -148 -191 -194 -191c-17 0 -36 11 -41 25c-36 -142 -43 -176 -66 -202h-74c14 20 30 53 45 114l125 497h79 l-71 -298c-2 -9 -4 -18 -4 -27c0 -27 14 -45 54 -45c53 0 178 216 197 299l16 71h78Z\\\"\u003e\u003c/path\u003e\\n\u003c/defs\u003e\\n\u003cg stroke=\\\"currentColor\\\" fill=\\\"currentColor\\\" stroke-width=\\\"0\\\" transform=\\\"matrix(1 0 0 -1 0 0)\\\" aria-hidden=\\\"true\\\"\u003e\\n \u003cuse xlink:href=\\\"#E1-STIXWEBNORMALI-1D707\\\" x=\\\"0\\\" y=\\\"0\\\"\u003e\u003c/use\u003e\\n\u003c/g\u003e\\n\u003c/svg\u003e\",\n    \"width\":\"1.346ex\",\n    \"height\":\"1.843ex\",\n    \"style\":\"vertical-align: -0.671ex;\",\n    \"speakText\":\"\\\\mu\",\n    \"speech\":\"mu\"}\n```\n\n# Input\n\nPerform an HTTP GET with the options below as query string parameters.\n\nThe options documented by [MathJax-node](https://github.com/mathjax/MathJax-node) \n```javascript\n  ex: 6,                          // ex-size in pixels\n  width: 100,                     // width of container (in ex) for linebreaking and tags\n  useFontCache: true,             // use \u003cdefs\u003e and \u003cuse\u003e in svg output?\n  useGlobalCache: false,          // use common \u003cdefs\u003e for all equations?\n  linebreaks: false,              // automatic linebreaking\n  equationNumbers: \"none\",        // automatic equation numbering (\"none\", \"AMS\" or \"all\")\n  cjkCharWidth: 13,               // width of CJK character\n\n  math: \"\",                       // the math string to typeset\n  format: \"TeX\",                  // the input format (TeX, inline-TeX, AsciiMath, or MathML)\n  xmlns: \"mml\",                   // the namespace to use for MathML\n\n  html: false,                    // generate HTML output\n  htmlNode: false,                // generate HTML output as jsdom node\n  css: false,                     // generate CSS for HTML output\n  mml: false,                     // generate MathML output\n  mmlNode: false,                 // generate MathML output as jsdom node\n  svg: false,                     // generate SVG output\n  svgNode: false,                 // generate SVG output as jsdom node\n\n  speakText: true,                // add textual alternative (for TeX/asciimath the input string, for MathML a dummy string)\n\n  state: {},                      // an object to store information from multiple calls (e.g., \u003cdefs\u003e if useGlobalCache, counter for equation numbering if equationNumbers ar )\n  timeout: 10 * 1000,             // 10 second timeout before restarting MathJax\n```\n\nIn addition, [mathjax-node-sre](https://github.com/pkra/mathjax-node-sre) accepts:\n\n```javascript\nspeakText: false,               // adds spoken annotations to output\nspeakRuleset: \"mathspeak\",      // set speech ruleset; default (= chromevox rules) or mathspeak\nspeakStyle: \"default\",          // set speech style for mathspeak rules:  default, brief, sbrief)\nsemantic: false,                // adds semantic tree information to output\nminSTree: false,                // if true the semantic tree is minified\nenrich: false                   // replace the math input with MathML resulting from SRE enrichment\nspeech: 'deep'                  // sets depth of speech; 'shallow' or 'deep'\n```\n\n# Output\n\nThe result object will contain (at most) the following structure:\n\n```javascript\n  mml:                        // a string of MathML markup if requested\n  mmlNode:                    // a jsdom node of MathML markup if requested\n  html:                       // a string of HTML markup if requested\n  htmlNode:                   // a jsdom node of HTML markup if requested\n  css:                        // a string of CSS if HTML was requested\n  svg:                        // a string of SVG markup if requested\n  svgNode:                    // a jsdom node of SVG markup if requested\n  style:                      // a string of CSS inline style if SVG requested\n  height:                     // a string containing the height of the SVG output if SVG was requested\n  width:                      // a string containing the width of the SVG output if SVG was requested\n\n  speakText:                  // a string of speech text if requested (the math that was converted)\n  speech:                     // a string of the speakText converted into English - suitable for alt text\n\n  state: {                    // the state object (if useGlobalCache or equationNumbers is set)\n           glyphs:            // a collection of glyph data\n           defs :             // a string containing SVG def elements\n           AMS: {\n                startNumber:  // the current starting equation number\n                labels:       // the set of labels\n                IDs:          // IDs used in previous equations\n             }\n         }\n```\n\nThis is a composition from:\n- [MathJax-node](https://github.com/mathjax/MathJax-node#promiseresolveresultoptions--promiserejecterrors--callbackresult-options); and\n- [mathjax-node-sre](https://github.com/pkra/mathjax-node-sre/blob/master/lib/main.js)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanneladam%2Fdev-mathjax-server-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchanneladam%2Fdev-mathjax-server-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanneladam%2Fdev-mathjax-server-docker/lists"}