shakebook-0.4.0.0: Shake-based technical documentation generator; HTML & PDF

Safe HaskellNone
LanguageHaskell2010

Shakebook.Pandoc

Synopsis

Documentation

runPandocA :: (MonadAction m, MonadThrow m) => PandocIO a -> m a Source #

Natural transformation from PandocIO to a MonadAction

readMDFile :: (MonadAction m, MonadThrow m) => ReaderOptions -> Path Rel File -> m Pandoc Source #

Read a markdown file as an Action.

readMDFileIn :: (MonadAction m, MonadThrow m) => ReaderOptions -> Path Rel Dir -> Path Rel File -> m Pandoc Source #

Read a markdown file as an Action.

needPandocImagesIn :: (MonadAction m, MonadThrow m) => Path Rel Dir -> Pandoc -> m () Source #

Find all the images in a Pandoc data structure and call need on them.

makePDFLaTeX :: (MonadAction m, MonadThrow m) => WriterOptions -> Pandoc -> m ByteString Source #

Make a pdflatex in an Action.

progressivelyDemoteHeaders :: Cofree [] Pandoc -> Cofree [] Pandoc Source #

Precarious function that demotes Header numbers within the Pandoc according to its depth in the Cofree. This is so that Headers that H1s that would correctly display for an HTML page will be lower in the table of contents in the PDF equivalent.

replaceUnusableImages :: MonadThrow m => [String] -> (Text -> Inline) -> Pandoc -> m Pandoc Source #

For a list of file extensions, replace the images with an Inline based on its src path.