@@ -44,8 +44,6 @@ import Data.Char (isLetter)
4444import Control.Applicative
4545import Data.Monoid
4646import System.FilePath (replaceExtension)
47−import System.Exit (ExitCode(..))
48−import System.Process (readProcessWithExitCode)
4947import qualified Data.Map as M
5048
5149-- | Parse LaTeX from string and return 'Pandoc' document.
@@ -538,7 +536,7 @@ handleIncludes :: String -> IO String
538536handleIncludes [] = return []
539537handleIncludes ('\\':xs) =
540538 case runParser include defaultParserState "input" ('\\':xs) of
541− Right (f, rest) -> do ys <- catch (kpsewhich f >>= readFile)
539+ Right (f, rest) -> do ys <- catch (readFile f)
542540 (\e -> warn
543541 ("could not open included file `" ++
544542 f ++ "': " ++ show e) >> return "")
@@ -570,14 +568,6 @@ verbatimEnv = do
570568 rest <- getInput
571569 return (r,rest)
572570
573−kpsewhich :: FilePath -> IO FilePath
574−kpsewhich f = do
575− (ec, ou, _) <- catch (readProcessWithExitCode "kpsewhich" [f] "")
576− (\_ -> return (ExitFailure 1, f, ""))
577− if ec == ExitSuccess
578− then return $ trim ou
579− else return f
580−
581571-- | Parse any LaTeX environment and return a string containing
582572-- the whole literal environment as raw TeX.
583573rawLaTeXBlock :: GenParser Char ParserState String