blob: 66f3ba50ba7cd97640e734a9e12c5141b75b8bd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
module Hakyll.TeX.LaTeX
( latexPdfCompiler
, compileLatexPdf
, rubberPipe
) where
import Prolog
import Hakyll
rubberPipe :: (StringConv s LazyByteString) => [String] -> s -> Compiler LazyByteString
rubberPipe args = unixFilterLBS "rubber-pipe" args . toSL
compileLatexPdf :: (StringConv s LazyByteString, Traversable t) => t s -> Compiler (t LazyByteString)
compileLatexPdf = traverse $ rubberPipe [ "--pdf" ]
latexPdfCompiler :: Compiler (Item LazyByteString)
latexPdfCompiler = getResourceLBS >>= compileLatexPdf
|