reanimate-1.1.3.0: Animation library based on SVGs.
CopyrightWritten by David Himmelstrup
LicenseUnlicense
Maintainerlemmih@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Reanimate.LaTeX

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

Instances details
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.3.0-BaGajeRPMLTEpehV03LFXW" '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

Instances details
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.3.0-BaGajeRPMLTEpehV03LFXW" '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 :: Traversable t => t Text -> t Tree Source #

Invoke latex and separate results.

latexCfgChunks :: Traversable t => TexConfig -> t Text -> t Tree Source #

Invoke latex using a given configuration and separate results.

latexCfgChunksTrans :: Traversable t => TexConfig -> (Text -> Text) -> t Text -> t Tree Source #

Invoke latex using a given configuration and separate results. Apply the transformation to the LaTeX segments. See also mathChunks, the transformation is (s -> "$" <> s <> "$").

mathChunks :: Traversable t => t Text -> t Tree Source #

Render math formula 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"