Copyright | Copyright 2024 Yoo Chung |
---|---|
License | Apache-2.0 |
Maintainer | dev@chungyc.org |
Safe Haskell | None |
Language | GHC2021 |
Support for converting symbolic representations of mathematical expressions into equivalent LaTeX text.
Synopsis
- toLaTeX :: Expression -> Text
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}"