{"_id":"@amermathsoc/mathjax-xhref","name":"@amermathsoc/mathjax-xhref","dist-tags":{"latest":"5.1.2"},"versions":{"5.1.2":{"name":"@amermathsoc/mathjax-xhref","main":"./js/xhref.js","type":"module","version":"5.1.2","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-xhref@5.1.2","gitHead":"b1589394e18abb90947bf425a0712c6db8b1af08","types":"./js/xhref.d.ts","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-CfmUOr20prB/hF+PkxdcLkTnefuh4FOcfpkqHEZTXRBItR3/7aiJ2MmEGAysggGmxjucR48V4dq9NJIP+E/MYg==","shasum":"d648a52f80002d75c879fb020061cb66c2bccfbc","tarball":"https://registry.npmjs.org/@amermathsoc/mathjax-xhref/-/mathjax-xhref-5.1.2.tgz","fileCount":17,"unpackedSize":40341,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDMJoAJ8RtQQUGCgaoQD+j9rioj7kzyeZOgynjYoA0LrAiEAtIncDeXFZhP696dczBPf46WN+7bQbiywkN9PtGO6HmM="}]},"_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-xhref_5.1.2_1760000472888_0.6618304820717102"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-09T09:01:12.799Z","5.1.2":"2025-10-09T09:01:13.067Z","modified":"2025-10-09T09:01:13.748Z"},"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-dae6dac1355e8061faa178c37a845207"}