mtex

package
v0.0.0-...-31cef3c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2024 License: BSD-3-Clause Imports: 12 Imported by: 8

README

mtex

mtex provides a Go implementation of a naive LaTeX-like math expression parser and renderer.

Example

$> mtex-render -font-size=48 -dpi=100 "$\sum\sqrt{\frac{a+b}{2\pi}}\cos\omega\binom{a+b}{\beta}\prod \alpha x\int\frac{\partial x}{x}\hbar$"

mtex-example

Documentation

Overview

Package mtex provides tools to render LaTeX math expressions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(expr string, fontSize, DPI float64, backend font.Backend) (tex.Node, error)

Parse parses a LaTeX math expression and returns the TeX-like box model and an error if any.

func Render

func Render(dst Renderer, expr string, size, dpi float64, fonts *ttf.Fonts) error

Types

type Renderer

type Renderer interface {
	Render(w, h, dpi float64, cnv *drawtex.Canvas) error
}

Directories

Path Synopsis
Package symbols contains logic about TeX symbols.
Package symbols contains logic about TeX symbols.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL