
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
A simple JavaScript library for creating interactive LaTeX equations (using KaTeX) with tooltips (using Tippy.js).
TipTex is a simple JavaScript library that allows you to create interactive LaTeX equations using KaTeX with tooltips powered by Tippy.js. It's designed to make mathematical equations in web pages more interactive and informative.
Simply render LaTeX equations with interactive tooltips.
Install TipTex via npm:
npm install tiptex
Or, if you prefer using Yarn:
yarn add tiptex
Note: v1.1+ introduces a new API that is more compatible with LaTeX.
Here's a quick example to get you started:
import {render} from 'tiptex';
const equation = render({
latex: `\\group{outer}{\\id{e}{e} = \\group{rhs}{\\id{m}{m}\\id{csq}{c^2}}}`,
interactiveElements: {
e: { href: "https://en.wikipedia.org/wiki/Mass%E2%80%93energy_equivalence", },
m: { label: 'mass'},
csq: { label: 'speed of light (squared)'},
},
groups: {
'outer': { label: 'Energy-mass equivalence'},
'rhs': { label: 'Inherent energy content of mass'},
},
enableCopy: true,
})
document.getElementById('equationContainer').appendChild(equation);
This will render the equation e=mc^2
with tooltips for m
and c^2
, and
make e
a clickable link.
Open test.html
to see the above in action.
The render
function accepts multiple objects as arguments, each representing a
part of the equation in sequential order.
These objects can have the following properties:
value
: The LaTeX string or plain text to be displayed.plainText
: Set to true
if val
is plain text. Defaults to false
.href
: URL to open when the part is clicked (optional).label
: Tooltip text to display when hovering over the part (optional).FAQs
A simple JavaScript library for creating interactive LaTeX equations (using KaTeX) with tooltips (using Tippy.js).
The npm package tiptex receives a total of 11 weekly downloads. As such, tiptex popularity was classified as not popular.
We found that tiptex demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.