gen.hs 436 B

12345678910111213141516171819202122
  1. {-# LANGUAGE OverloadedStrings #-}
  2. import Control.Monad
  3. import Data.List
  4. import qualified Data.Text.IO as T
  5. import System.Environment
  6. import System.IO
  7. import Text.LaTeX
  8. import Util
  9. main :: IO ()
  10. main = do
  11. args <- getArgs
  12. pages <- mapM T.readFile args
  13. printdoc $ doc pages
  14. doc :: Monad m => [Text] -> LaTeXT_ m
  15. doc pages = do
  16. prelude
  17. raw "\n"
  18. document $ mapM_ raw $ intersperse "\n\\mbox{}\\clearpage\n" pages