← Plugins

LaTex input

Use the LaTex format to describe math and other complicated typography.


LaTeX input for Sanity



sanity install sanity-plugin-latex-input

You may now use the type name latex in your schema, such as in portable text.

Example schema definition for portable text

import React from 'react'
const mathInlineIcon = () => (
    <span style={{ fontWeight: 'bold' }}>∑</span>b
const mathIcon = () => <span style={{ fontWeight: 'bold' }}>∑</span>

export default {
  name: 'portableTextWithLatex',
  type: 'array',
  title: 'Body',
  of: [
      type: 'block',
      title: 'Block',
      of: [
        { type: 'latex', icon: mathInlineIcon, title: 'Inline math' },
    { type: 'latex', icon: mathIcon, title: 'Math block' },

The Portable Text editor will render a preview of the contents with KaTeX.