{"id":32257032,"url":"https://github.com/fegemo/bespoke-math","last_synced_at":"2026-02-21T07:01:33.242Z","repository":{"id":28351879,"uuid":"31865598","full_name":"fegemo/bespoke-math","owner":"fegemo","description":"Use latex to create math formulas on your bespoke.js presentations (through katex)","archived":false,"fork":false,"pushed_at":"2021-05-01T21:25:36.000Z","size":7422,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-23T21:36:40.785Z","etag":null,"topics":["presentation-tools"],"latest_commit_sha":null,"homepage":"https://fegemo.github.io/bespoke-math/","language":"JavaScript","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/fegemo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-08T21:06:56.000Z","updated_at":"2021-05-01T21:26:39.000Z","dependencies_parsed_at":"2022-08-25T10:01:21.996Z","dependency_job_id":null,"html_url":"https://github.com/fegemo/bespoke-math","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/fegemo/bespoke-math","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fegemo%2Fbespoke-math","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fegemo%2Fbespoke-math/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fegemo%2Fbespoke-math/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fegemo%2Fbespoke-math/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fegemo","download_url":"https://codeload.github.com/fegemo/bespoke-math/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fegemo%2Fbespoke-math/sbom","scorecard":{"id":395730,"data":{"date":"2025-08-11","repo":{"name":"github.com/fegemo/bespoke-math","commit":"56abc06ba1b6b09079996b6d4e9c014a058fbafa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}}]},"last_synced_at":"2025-08-18T18:57:27.514Z","repository_id":28351879,"created_at":"2025-08-18T18:57:27.514Z","updated_at":"2025-08-18T18:57:27.514Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29675909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"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":["presentation-tools"],"created_at":"2025-10-22T19:21:06.800Z","updated_at":"2026-02-21T07:01:33.234Z","avatar_url":"https://github.com/fegemo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/fegemo/bespoke-math.svg)](https://travis-ci.org/fegemo/bespoke-math) [![Coverage Status](https://coveralls.io/repos/fegemo/bespoke-math/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/fegemo/bespoke-math?branch=master) ![Dependencies](https://david-dm.org/fegemo/bespoke-math.svg)\n\n# bespoke-math\n\nUse [KaTeX][katex] to include latex formulas into your bespoke.js presentation.\nSee our [demo](https://fegemo.github.io/bespoke-math/).\n\n## How it works\n\nOnly the HTML elements with the `math` class will be transformed through\nKaTeX (this is configurable, keep reading). For example, this markup:\n\n```html\n\u003cdiv class=\"math\"\u003ed = \\frac{a^2+b^2}{\\sqrt(c)}\u003c/div\u003e\n```\n\n...will render like:\n\n![](images/display.png)\n\n\nAlso, KaTeX will render the element either as a \"full\" math (\"displaystyle\")\nor as an inline math (\"textstyle\") (inline is a bit shortened to fit one text\nline) depending on the HTML element used:\n\n```html\n\u003cspan class=\"math\"\u003e...\u003c/span\u003e\n```\n\n...renders inline (because of `\u003cspan\u003e\u003c/span\u003e`) whereas a `\u003cdiv\u003e\u003c/div\u003e`\nor any other element renders a \"full\" formula:\n\n```html\n\u003cdiv class=\"math\"\u003e...\u003c/div\u003e\n```\n\n- Display style (full height):\n  ![](images/display.png)\n- Text style (inline):\n  ![](images/inline.png)\n\n\n## KaTeX\n\nKaTeX is a much lighter alternative to MathJax that allows you to write\nLaTeX formulas on the web.\n\nRefer to their documentation on what syntax is supported.\nThe current version of KaTeX in use is [0.13.3][katex-version].\n\n[katex-version]: https://github.com/Khan/KaTeX/releases/tag/v0.13.3\n\n## Download\n\nDownload the [production version][min] or the [development version][max], or use a [package manager](#package-managers).\n\n[min]: https://raw.github.com/fegemo/bespoke-math/master/dist/bespoke-math.min.js\n[max]: https://raw.github.com/fegemo/bespoke-math/master/dist/bespoke-math.js\n[katex]: http://khan.github.io/KaTeX/\n\n## Usage\n\nThis plugin is shipped in a [UMD format](https://github.com/umdjs/umd), meaning that it is available as a CommonJS/AMD module or browser global.\n\nFor example, when using CommonJS modules:\n\n```js\nconst bespoke = require('bespoke');\nconst math = require('bespoke-math');\n\nbespoke.from('#presentation', [\n  math()\n]);\n```\n\nWhen using browser globals:\n\n```js\nbespoke.from('#presentation', [\n  bespoke.plugins.math()\n]);\n```\n\n## Configuring bespoke-math\n\nThe default action is to transform every HTML element that has `.math` (e.g., `\u003cspan class=\"math\"\u003e\\vec{r} = \\vec{S} + 2\\vec{a}\u003c/span\u003e`).\nFurthermore, the formulas are considered inline if their element is a `span` or a full formula if the element is a `div` or any other HTML element.\n\nTo change that behavior, simply provide 1 or 2 arguments when instantiating the plugin:\n- 1 argument: a string with the selector for math formulas - inline vs full formulas is still decided through the\n  use of `span` (for inline) and anything else for full.\n  - Example:\n    ```js\n    var bespoke = require('bespoke'),\n      math = require('bespoke-math');\n\n    bespoke.from('#presentation', [\n      math('.formula, .math, .equation')\n    ]);\n    ```\n    - Renders into KaTeX equations all elements with either one of the classes: `formula`, `math` and `equation`.\n      A formula will be rendered inline if its element is a `span`, otherwise and it'll be a full formula.\n- 2 arguments:  a string with the selector for inline formulas and a string for the full formula\n  - Example:\n    ```js\n    var bespoke = require('bespoke'),\n      math = require('bespoke-math');\n\n    bespoke.from('#presentation', [\n      math('.inline-math', '.math')\n    ]);\n    ```\n    - Renders into KaTeX equations all elements with the class `inline-math` as inline and all elements with the\n      class `math` as full formula.  \n\n\n## Inclusion of KaTeX's CSS/Font files\n\nKaTeX is composed of javascript, CSS and font-face files (refer to their [usage documentation](https://github.com/Khan/KaTeX#usage)).\n\nThis plugin, when a math formula is found on the bespoke deck, injects the CSS file into de document head (by using [browserify-css](https://github.com/cheton/browserify-css)). The font-face files, however, are loaded from a CDN (cdnjs, in case). This is not ideal as an Internet connection is required for KaTeX to work 100%.\n\nIt is possible, however, to encode the font files on the generated browserify bundle, but that makes the plugin js file much larger. If being able to use this plugin offline is necessary, you can use the files:\n  - `dist/bespoke-math-offline-fonts.js` or\n  - `dist/bespoke-math-offline-fonts.min.js`\n\n## Package managers\n\n### npm\n\n```bash\n$ npm install bespoke-math\n```\n\n### Bower\n\n```bash\n$ bower install bespoke-math\n```\n\n## Credits\n\nThis plugin was built with [generator-bespokeplugin](https://github.com/markdalgleish/generator-bespokeplugin).\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffegemo%2Fbespoke-math","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffegemo%2Fbespoke-math","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffegemo%2Fbespoke-math/lists"}