Skip to main content

Built and signed on GitHub Actions

Adds support for TeX (math) syntax to Eleventy projects

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
3 weeks ago (0.1.2)
type alias EleventyTeXOptions

An options object. Every option is optional.

Properties

optional
delimiters: Array<{ start: string; end: string; katexOptions?: KaTeXOptions; }>

These delimiters are used to find TeX inside the template. By default, the delimiters \(…\) and $…$ are used for inline math, and \[…\] and $$…$$ for display math. Note that, if you define your own, they overwrite the defaults. To avoid this, import the defaultDelimiters and use delimiters: [...defaultDelimiters, …] to keep them around. To define custom delimiters, you must specify the start and end for each delimiter as strings. Optionally, include some options to pass to KaTeX (most notably displayMode) for TeX rendered with a specific custom delimiter. Note that every delimiter may be escaped with a backslash; such an occurrance is not used as a delimiter. The backslash is removed (but only if it is followed by a registered delimiter!)

Set default options to pass to KaTeX. These may be overwritten by individual delimiters.

Add Package

deno add jsr:@vrugtehagel/eleventy-tex

Import symbol

import { type EleventyTeXOptions } from "@vrugtehagel/eleventy-tex";

---- OR ----

Import directly with a jsr specifier

import { type EleventyTeXOptions } from "jsr:@vrugtehagel/eleventy-tex";

Add Package

npx jsr add @vrugtehagel/eleventy-tex

Import symbol

import { type EleventyTeXOptions } from "@vrugtehagel/eleventy-tex";

Add Package

yarn dlx jsr add @vrugtehagel/eleventy-tex

Import symbol

import { type EleventyTeXOptions } from "@vrugtehagel/eleventy-tex";

Add Package

pnpm dlx jsr add @vrugtehagel/eleventy-tex

Import symbol

import { type EleventyTeXOptions } from "@vrugtehagel/eleventy-tex";

Add Package

bunx jsr add @vrugtehagel/eleventy-tex

Import symbol

import { type EleventyTeXOptions } from "@vrugtehagel/eleventy-tex";