reanimate-1.1.2.0: Animation library based on SVGs.

CopyrightWritten by David Himmelstrup
LicenseUnlicense
Maintainerlemmih@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Reanimate.LaTeX

Contents

Description

 
Synopsis

Documentation

latexCfg :: TexConfig -> Text -> SVG Source #

Render TeX script using a given configuration.

data TexEngine Source #

TeX backends. They have different features and capabilities.

Constructors

LaTeX 
XeLaTeX 
LuaLaTeX 
Instances
Eq TexEngine Source # 
Instance details

Defined in Reanimate.LaTeX

Ord TexEngine Source # 
Instance details

Defined in Reanimate.LaTeX

Read TexEngine Source # 
Instance details

Defined in Reanimate.LaTeX

Show TexEngine Source # 
Instance details

Defined in Reanimate.LaTeX

Generic TexEngine Source # 
Instance details

Defined in Reanimate.LaTeX

Associated Types

type Rep TexEngine :: Type -> Type #

Hashable TexEngine Source # 
Instance details

Defined in Reanimate.LaTeX

type Rep TexEngine Source # 
Instance details

Defined in Reanimate.LaTeX

type Rep TexEngine = D1 (MetaData "TexEngine" "Reanimate.LaTeX" "reanimate-1.1.2.0-LCl5ZYqYnCP5rAOn9RLfkO" False) (C1 (MetaCons "LaTeX" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "XeLaTeX" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "LuaLaTeX" PrefixI False) (U1 :: Type -> Type)))

data TexConfig Source #

TeX configurations can load packages and set up environments for tex scripts.

Instances
Eq TexConfig Source # 
Instance details

Defined in Reanimate.LaTeX

Ord TexConfig Source # 
Instance details

Defined in Reanimate.LaTeX

Read TexConfig Source # 
Instance details

Defined in Reanimate.LaTeX

Show TexConfig Source # 
Instance details

Defined in Reanimate.LaTeX

Generic TexConfig Source # 
Instance details

Defined in Reanimate.LaTeX

Associated Types

type Rep TexConfig :: Type -> Type #

Hashable TexConfig Source # 
Instance details

Defined in Reanimate.LaTeX

type Rep TexConfig Source # 
Instance details

Defined in Reanimate.LaTeX

type Rep TexConfig = D1 (MetaData "TexConfig" "Reanimate.LaTeX" "reanimate-1.1.2.0-LCl5ZYqYnCP5rAOn9RLfkO" False) (C1 (MetaCons "TexConfig" PrefixI True) (S1 (MetaSel (Just "texConfigEngine") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TexEngine) :*: (S1 (MetaSel (Just "texConfigHeaders") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Text]) :*: S1 (MetaSel (Just "texConfigPostScript") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Text]))))

latex :: Text -> Tree Source #

Invoke latex and import the result as an SVG object. SVG objects are cached to improve performance.

Example:

latex "$e^{i\\pi}+1=0$"

latexWithHeaders :: [Text] -> Text -> Tree Source #

Invoke latex with extra script headers.

latexChunks :: [Text] -> [Tree] Source #

Invoke latex and separate results.

xelatex :: Text -> Tree Source #

Invoke xelatex and import the result as an SVG object. SVG objects are cached to improve performance. Xelatex has support for non-western scripts.

xelatexWithHeaders :: [Text] -> Text -> Tree Source #

Invoke xelatex with extra script headers.

ctex :: Text -> Tree Source #

Invoke xelatex with "usepackage[UTF8]{ctex}" and import the result as an SVG object. SVG objects are cached to improve performance. Xelatex has support for non-western scripts.

Example:

ctex "中文"

ctexWithHeaders :: [Text] -> Text -> Tree Source #

Invoke xelatex with extra script headers + ctex headers.

latexAlign :: Text -> Tree Source #

Invoke latex and import the result as an SVG object. SVG objects are cached to improve performance. This wraps the TeX code in an 'align*' context.

Example:

latexAlign "R = \\frac{{\\Delta x}}{{kA}}"

Font configurations

chalkduster :: TexConfig Source #

Chalkduster font. Depends on lualatex. Font files are automatically downloaded.

latexCfg chalkduster "chalkduster"