{"_id":"@amermathsoc/mathjax-href","name":"@amermathsoc/mathjax-href","dist-tags":{"latest":"5.1.1"},"versions":{"5.1.1":{"name":"@amermathsoc/mathjax-href","main":"./js/xhref.js","type":"module","version":"5.1.1","description":"A custom href extension for MathJax's TeX input","keywords":["MathJax","TeX","href"],"license":"Apache-2.0","contributors":[{"name":"Peter Krautzberger","url":"https://github.com/pkra"}],"repository":{"type":"git","url":"git://github.com/AmerMathSoc/mathjax-xhref.git"},"homepage":"https://github.com/AmerMathSoc/mathjax-xhref/","bugs":{"url":"https://github.com/AmerMathSoc/mathjax-xhref/issues"},"devDependencies":{"@mathjax/src":"4.0.0-rc.4","commit-and-tag-version":"12.5.1","terser-webpack-plugin":"5.3.14","typescript":"5.8.3","typescript-eslint":"8.33.1","typescript-tools":"0.3.1","webpack":"5.99.9","webpack-cli":"5.1.4"},"scripts":{"build":"npx tsc &&  node ./node_modules/@mathjax/src/components/bin/makeAll --mjs components","release":"commit-and-tag-version","pretest":"npx tsc","test":"node test/base.js"},"_id":"@amermathsoc/mathjax-href@5.1.1","gitHead":"03535bacba8b4ad9351b35ce77ae98a09f8f87ea","types":"./js/xhref.d.ts","_nodeVersion":"24.3.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-XsntV1W88zpxA9yrAzJQBsYj/Yc1y5CXKuSceuzNUaHj37iW/CayzZOWTuGllKosxoAzmo0PrTG03kSQ3R3RIQ==","shasum":"c69d1e165e842aa8255cb8f6490b5baab9cc2390","tarball":"https://registry.npmjs.org/@amermathsoc/mathjax-href/-/mathjax-href-5.1.1.tgz","fileCount":17,"unpackedSize":40016,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEZIemKJdCWlFaxz0I9lrMFeXFfMwHcfE2NliUawxmFWAiBrtw/y/BvkzV2JjLVC9TMT+3xmNW9AEBbINA0RG0sLaw=="}]},"_npmUser":{"name":"pkra","email":"p.krautzberger@gmail.com"},"directories":{},"maintainers":[{"name":"pkra","email":"p.krautzberger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mathjax-href_5.1.1_1752841022845_0.7224408192192444"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-18T12:17:02.765Z","5.1.1":"2025-07-18T12:17:03.044Z","modified":"2025-07-18T12:17:03.433Z"},"maintainers":[{"name":"pkra","email":"p.krautzberger@gmail.com"}],"description":"A custom href extension for MathJax's TeX input","homepage":"https://github.com/AmerMathSoc/mathjax-xhref/","keywords":["MathJax","TeX","href"],"repository":{"type":"git","url":"git://github.com/AmerMathSoc/mathjax-xhref.git"},"contributors":[{"name":"Peter Krautzberger","url":"https://github.com/pkra"}],"bugs":{"url":"https://github.com/AmerMathSoc/mathjax-xhref/issues"},"license":"Apache-2.0","readme":"# mathjax-xhref\n\nA custom href extension for MathJax's TeX input\n\n## MathJax Extension: `xhref.js`\n\nThis extension implements a TeX macro `\\xhref`.\n\n```tex\n\\xhref[type]{url}{content}\n```\n\nIn the output, this will generate `<a href=\"url\" data-ams-ref=\"type\">content</a>` with `5px` padding.\n\nThis macro integrates with [AmerMathSoc/texml-to-html](https://github.com/AmerMathSoc/texml-to-html/); see its documentation for more information on `data-ams-ref`.\n\n## Using NodeJS\n\nFor example, install `@mathjax/src` and `@amermathsoc/mathjax-xhref` and use something like\n\n```js\nimport { TeX } from \"@mathjax/src/js/input/tex.js\";\nimport { configuration as xhref } from \"mathjax-xhref\";\nconst tex = new TeX({\n  packages: [xhref.name],\n  textmacros: {\n    packages: { \"[+]\": [xhref.name] },\n  },\n});\n```\n\nNote: the `textmacros` part allows the use of this macro in text-mode.\n\n## Using a browser\n\nFor client-side use, you need load `browser/xhref.js`, e.g., from a CDN.\n\nFollow the instructions from the MathJax documentation on [loading a third-party extensions](http://docs.mathjax.org/en/latest/web/webpack.html#loading-the-extension), e.g.,\n\n```js\nMathJax = {\n  loader: {\n    load: [\"[xhref]/xhref.js\"],\n    paths: {\n      xhref:\n        \"https://cdn.jsdelivr.net/npm/@amermathsoc/mathjax-xhref@3/browser\",\n    },\n  },\n  tex: {\n    packages: { \"[+]\": [\"xhref\"] },\n    textmacros: {\n      packages: { \"[+]\": [\"xhref\"] },\n    },\n  },\n};\n```\n","readmeFilename":"README.md","_rev":"1-fc7bc4a2fff56cfc0c9d97b1a056d31a"}