Skip to content
LaTeX input for Sanity
CSS JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
src
.babelrc
.eslintrc
.gitignore
.npmignore
README.md
package-lock.json
package.json
sanity.json

README.md

LaTeX input for Sanity

https://sanity.io

Usage

sanity install sanity-plugin-latex-input

Then require the part and add it to your schema like any other type:

import createSchema from 'part:@sanity/base/schema-creator'
import mathSnippet from './mathSnippet'
import latex from 'part:@sanity/form-builder/input/latex/schema'

export default createSchema({
  name: 'default',
  types: [mathSnippet, latex]
})

Example schema definition using latex math input

export default {
  name: 'mathSnippet',
  title: 'Math Snippet',
  type: 'object',
  fields: [
    {
      title: 'Title',
      name: 'title',
      type: 'string'
    },
    {
      title: 'Content',
      name: 'content',
      type: 'array',
      of: [
        {type: 'block'},
        {type: 'latex', title: 'Latex'}
      ]
    }
  ]
}
You can’t perform that action at this time.