latex-formulae-hakyll 0.1.0.0 → 0.2.0.0
raw patch · 2 files changed
+5/−5 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Hakyll.Contrib.LaTeX: compileFormulaeDataURI :: EnvironmentOptions -> PandocFormulaOptions -> Item Pandoc -> Compiler (Item Pandoc)
+ Hakyll.Contrib.LaTeX: compileFormulaeDataURI :: EnvironmentOptions -> PandocFormulaOptions -> Pandoc -> Compiler Pandoc
- Hakyll.Contrib.LaTeX: initFormulaCompilerDataURI :: CacheSize -> EnvironmentOptions -> IO (PandocFormulaOptions -> Item Pandoc -> Compiler (Item Pandoc))
+ Hakyll.Contrib.LaTeX: initFormulaCompilerDataURI :: CacheSize -> EnvironmentOptions -> IO (PandocFormulaOptions -> Pandoc -> Compiler Pandoc)
Files
latex-formulae-hakyll.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: latex-formulae-hakyll-version: 0.1.0.0+version: 0.2.0.0 synopsis: Use actual LaTeX to render formulae inside Hakyll pages description: This library provides functions to render all math formulae inside Pandoc-processed Hakyll pages using real LaTeX.
src/Hakyll/Contrib/LaTeX.hs view
@@ -35,13 +35,13 @@ -- > compile $ pandocCompilerWithTransformM (renderFormulae defaultPandocFormulaOptions) -- initFormulaCompilerDataURI :: CacheSize -> EnvironmentOptions- -> IO (PandocFormulaOptions -> Item Pandoc -> Compiler (Item Pandoc))+ -> IO (PandocFormulaOptions -> Pandoc -> Compiler Pandoc) initFormulaCompilerDataURI cs eo = do mImageForFormula <- curry <$> memoizeLru (Just cs) (uncurry drawFormula) let eachFormula x y = do putStrLn $ " formula (" ++ environment x ++ ") \"" ++ equationPreview y ++ "\"" mImageForFormula x y- return $ \fo -> withItemBody $ unsafeCompiler . convertAllFormulaeDataURIWith eachFormula fo+ return $ \fo -> unsafeCompiler . convertAllFormulaeDataURIWith eachFormula fo where drawFormula x y = do putStrLn " drawing..."@@ -53,13 +53,13 @@ -- compileFormulaeDataURI :: EnvironmentOptions -> PandocFormulaOptions- -> Item Pandoc -> Compiler (Item Pandoc)+ -> Pandoc -> Compiler Pandoc compileFormulaeDataURI eo po = let eachFormula x y = do putStrLn $ " formula (" ++ environment x ++ ") \"" ++ equationPreview y ++ "\"" putStrLn " drawing..." imageForFormula eo x y- in withItemBody $ unsafeCompiler . convertAllFormulaeDataURIWith eachFormula po+ in unsafeCompiler . convertAllFormulaeDataURIWith eachFormula po equationPreview :: String -> String equationPreview (dropWhile isSpace -> x)