symtegration-0.4.0: Library for symbolic integration of mathematical expressions.
CopyrightCopyright 2024 Yoo Chung
LicenseApache-2.0
Maintainerdev@chungyc.org
Safe HaskellNone
LanguageGHC2021

Symtegration.Symbolic.LaTeX

Description

Support for converting symbolic representations of mathematical expressions into equivalent LaTeX text.

Synopsis

Documentation

toLaTeX :: Expression -> Text Source #

Converts an Expression into an equivalent LaTeX expression.

>>> toLaTeX $ exp 5
"e^{5}"

Symbols are included without quotation.

>>> toLaTeX $ exp "x"
"e^{x}"
>>> toLaTeX $ "x" + 4 * sin "y"
"x + 4 \\sin y"

Since the text for symbols are included as is, we can also include LaTeX symbols:

>>> toLaTeX $ exp "\\delta_0"
"e^{\\delta_0}"