Name: TeX-my-math
Version: 0.202.1.0
x-revision: 2
Category: math
Synopsis: Render general Haskell math to LaTeX. Or: math typesetting with high signal-to-noise–ratio.
Description: For tl;dr: look at .
.
This is an attempt to get convenient math syntax in HaTeX (i.e., in data structures
compatible \/ convertable to those from ).
.
The idea is to combine these features:
.
* Full access to the math-typesetting power of LaTeX. It should be possible to express
any formula that might be found in a typical mathematics or physics journal article.
This should also include expression which are not quite well-defined from a programming
point of view, but are clear to the intended audience.
.
* Idiomatic Haskell syntax. Who wants to bother with unreadable expressions involving
either hundreds of double-backslashes or extra syntax overhead in wrapping them
explicitly into HaTeX?
.
Ideally, one would write expressions as if only meaning Haskell to /calculate/ them,
but get the result back as a full pretty-printing LaTeX math string. /And the actual
calculated result as well/, if possible!
.
To this end, we use a minimal symbolic-manipulation EDSL, namely
, set up in a way so the
leaves of the syntax tree, i.e. the individual symbols, are represented by LaTeX
expressions in memory and by single-letter variables in the Haskell code.
These can then be combined with operators corresponding to LaTeX's maths operators,
to obtain a very compact and almost WYSIWYG-like code appearance, while retaining
the ability to apply any LaTeX-specific tweaks whenever necessary. At the same
time, because the AST is fully precedence-aware, it is safely possible to transform
the expressions via e.g. Template Haskell, to actually compute concrete numerical
results, or apply exact symbolic-manipulation techniques.
License: GPL-3
License-file: COPYING
Author: Justus Sagemüller
Maintainer: (@) jsag $ hvl.no
Homepage: http://github.com/leftaroundabout/Symbolic-math-HaTeX
Build-Type: Simple
Cabal-Version: >=1.10
Library
Build-Depends: base>=4.8 && <4.15
, HaTeX>=3.22.3.0
, vector-space
, dumb-cas >= 0.2.1 && < 0.3
, decimal-literals
, text
, void
, hashable, unordered-containers
, template-haskell, haskell-src-meta
Exposed-modules: Math.LaTeX.Prelude
Math.LaTeX.StringLiterals
Math.LaTeX.Internal.MathExpr
Math.LaTeX.Internal.Display
Other-modules: CAS.Dumb.LaTeX.Symbols
Math.LaTeX.Internal.OperatorGenerator
Default-Language: Haskell2010
test-suite makeSnippets
default-language:
Haskell2010
type:
exitcode-stdio-1.0
hs-source-dirs:
test/PdfSnippets
main-is:
MkSnippets.hs
Other-modules:
LaTeXComparer
build-depends:
base >= 4 && < 5
, template-haskell, haskell-src-meta
, dumb-cas
, HaTeX
, TeX-my-math
, text
, directory, filepath, process
executable TeXmyMath-example
default-language:
Haskell2010
hs-source-dirs:
example
main-is:
Simple.hs
build-depends:
base
, TeX-my-math
, HaTeX
, text
, directory, filepath, process