diff options
Diffstat (limited to 'src/Hakyll/TeX/LaTeX.hs')
| -rw-r--r-- | src/Hakyll/TeX/LaTeX.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Hakyll/TeX/LaTeX.hs b/src/Hakyll/TeX/LaTeX.hs new file mode 100644 index 0000000..8f6d5cc --- /dev/null +++ b/src/Hakyll/TeX/LaTeX.hs @@ -0,0 +1,18 @@ +module Hakyll.TeX.LaTeX + ( latexPdfCompiler + , compileLatexPdf + , rubberPipe + ) where + +import Prolog + +import Hakyll + +rubberPipe :: [String] -> LazyByteString -> Compiler LazyByteString +rubberPipe = unixFilterLBS "rubber-pipe" + +compileLatexPdf :: (StringConv s LazyByteString, Traversable t) => t s -> Compiler (t LazyByteString) +compileLatexPdf = traverse $ rubberPipe [ "--pdf" ] . toSL + +latexPdfCompiler :: Compiler (Item LazyByteString) +latexPdfCompiler = getResourceLBS >>= compileLatexPdf |
