Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides a basic framework to render LaTeX formulae inside Pandoc documents for Hakyll pages.
See the latex-svg page on GitHub for more information.
Synopsis
- initFormulaCompilerSVG :: CacheSize -> EnvironmentOptions -> IO (PandocFormulaOptions -> Pandoc -> Compiler Pandoc)
- initFormulaCompilerSVGPure :: EnvironmentOptions -> PandocFormulaOptions -> Pandoc -> Compiler Pandoc
- type CacheSize = Integer
- compileFormulaeSVG :: EnvironmentOptions -> PandocFormulaOptions -> Pandoc -> Compiler Pandoc
Documentation
initFormulaCompilerSVG :: CacheSize -> EnvironmentOptions -> IO (PandocFormulaOptions -> Pandoc -> Compiler Pandoc) Source #
Creates a formula compiler with caching. Can be used as in the following minimal example:
main = do renderFormulae <-initFormulaCompilerSVG
1000 'defaultEnv" hakyll $ match "posts/*.markdown" $ do route $ setExtension "html" compile $ pandocCompilerWithTransformM defaultHakyllReaderOptions defaultHakyllWriterOptions (renderFormulaedefaultPandocFormulaOptions
)
initFormulaCompilerSVGPure :: EnvironmentOptions -> PandocFormulaOptions -> Pandoc -> Compiler Pandoc Source #
Creates a formula compiler. Can be used as in the following minimal example:
main = hakyll $ do let renderFormulae =initFormulaCompilerSVGPure
'defaultEnv" match "posts/*.markdown" $ do route $ setExtension "html" compile $ pandocCompilerWithTransformM defaultHakyllReaderOptions defaultHakyllWriterOptions (renderFormulaedefaultPandocFormulaOptions
)
compileFormulaeSVG :: EnvironmentOptions -> PandocFormulaOptions -> Pandoc -> Compiler Pandoc Source #
A formula compiler that does not use caching, which works in a more drop-in fashion, as in:
compile $ pandocCompilerWithTransformM (compileFormulaeSVG defaultEnv defaultPandocFormulaOptions)