Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sanity-plugin-latex-input

Package Overview
Dependencies
Maintainers
36
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sanity-plugin-latex-input

> **NOTE** > > This is the **Sanity Studio v2 version** of sanity-plugin-latex-input. > > For the v3 version, please refer to the [v3-branch](https://github.com/sanity-io/sanity-plugin-latex-input).

  • 1.0.3
  • studio-v2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
794
decreased by-9.57%
Maintainers
36
Weekly downloads
 
Created
Source

LaTeX input for Sanity

NOTE

This is the Sanity Studio v2 version of sanity-plugin-latex-input.

For the v3 version, please refer to the v3-branch.

https://sanity.io

Installation

yarn add sanity-plugin-latex-input@studio-v2

Next, add "latex-input" to sanity.json plugins array:

"plugins": [
  "latex-input"
]

Usage

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>
    <span style={{ fontWeight: 'bold' }}>∑</span>b
  </span>
)
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.

Keywords

FAQs

Package last updated on 22 Nov 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc