
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
highlightjs-macaulay2
Advanced tools
Macaulay2 is a software system devoted to supporting research in algebraic geometry and commutative algebra.
highlight.js is a JavaScript syntax highlighter with language auto-detection and zero dependencies.
Include the Highlight.js library in your webpage or Node app, then load this module.
Load the module after loading Highlight.js. Use the minified version found in the dist directory. This module is just a CDN build of the language, so it will register itself as the JavaScript is loaded.
<link rel="/path/to/styles/default.min.css"> <!-- or another highlight.js theme -->
<script src="/path/to/highlight.min.js"></script>
<script src="/path/to/macaulay2.min.js"></script>
<script>hljs.highlightAll();</script>
<pre><code class="language-macaulay2">
i1 : R = QQ[x,y,z,w]
o1 = R
o1 : PolynomialRing
i2 : I = monomialCurveIdeal(R, {1, 2, 3})
2 2
o2 = ideal (z - y*w, y*z - x*w, y - x*z)
o2 : Ideal of R
</code></pre>
<script src="https://unpkg.com/highlightjs-macaulay2/dist/macaulay2.min.js"></script>
If you're using Node / Webpack / Rollup / Browserify, etc., import the language module, then register it with Highlight.js.
import hljs from 'highlight.js'; // or 'highlight.js/lib/core' to not load other languages
import macaulay2 from 'highlightjs-macaulay2';
hljs.registerLanguage("macaulay2", macaulay2);
hljs.highlightAll();
The popular presentation framework reveal.js uses highlight.js for syntax highlighting.
To start including Macaulay2 code in your reveal.js presentations, download and unzip this slightly modified copy of reveal.js. It adds Macaulay2 support to the syntax highlighting plugin.
Then edit the file index.html with your Macaulay2 code, e.g.,:
<section>
The twisted cubic in Macaulay2:
<pre><code class="hljs macaulay2">
i1 : R = QQ[x,y,z,w]
o1 = R
o1 : PolynomialRing
i2 : I = monomialCurveIdeal(R, {1,2,3})
2 2
o2 = ideal (z - y*w, y*z - x*w, y - x*z)
o2 : Ideal of R
</code></pre>
</section>
Then open index.html in your favorite browser. It should look like this.
To build dist/macaulay2.min.js yourself, run:
npm run build
Or, if you have already cloned the highlight.js repository:
npm run build -- HLJSDIR=/path/to/highlight.js
To update the Macaulay2 language keywords, e.g., after a new release of Macaulay2, run:
npm run update
Note that you must have Macaulay2 installed for this to work. If you have already cloned the Macaulay2 repository:
npm run update -- M2DIR=/path/to/M2
To run the test suite, run:
npm run test
Or, as above, if you already have the highlight.js repository cloned:
npm run test -- HLJSDIR=/path/to/highlight.js
Distributed under the BSD 3-Clause License. See LICENSE for more information.
Highlight.js is also released under the BSD 3-Clause License.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b my-branch).git commit -m 'my changes').git push origin my-branch).FAQs
highlight.js syntax definition for Macaulay2
The npm package highlightjs-macaulay2 receives a total of 367 weekly downloads. As such, highlightjs-macaulay2 popularity was classified as not popular.
We found that highlightjs-macaulay2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.