/** * [[include:src/codecs/tex/README.md]] * * @module codecs/tex */ import schema from '@stencila/schema'; import * as vfile from '../../util/vfile'; import { Codec } from '../types'; export declare class TexCodec extends Codec implements Codec { /** * The media types that this codec can decode/encode. */ readonly mediaTypes: string[]; /** * The file extension names that this codec will match. */ readonly extNames: string[]; /** * Decode a `VFile` with Tex content to a Stencila `Math` node. * * @param file The `VFile` to decode * @returns A promise that resolves to a Stencila `MathFragment` * or `MathBlock` (if it starts with the `\displaystyle` command). */ readonly decode: (file: vfile.VFile) => Promise; /** * Encode a Stencila `Math` node to a `VFile` with TeX content. * * Attempts to translate other math languages that the node may * have (e.g AsciiMath) to Tex. * * @param thing The Stencila `Node` to encode * @returns A promise that resolves to a `VFile` */ readonly encode: (node: schema.Node) => Promise; }