git.iko.soy/typeable/pandoc
on master help sign in
Include empty \author{} in LaTeX preamble if no
1f9d2f8fiddlosopher
src/Text/Pandoc/Writers/LaTeX.hs+2−4
@@ -75,10 +75,8 @@ latexHeader options (Meta title authors date) = do
75 else do title' <- inlineListToLaTeX title
75 else do title' <- inlineListToLaTeX title
76 return $ "\\title{" ++ title' ++ "}\n"
76 return $ "\\title{" ++ title' ++ "}\n"
77 extras <- get >>= (return . unlines . S.toList)
77 extras <- get >>= (return . unlines . S.toList)
78− let authorstext = if null authors
79− then ""
80− else "\\author{" ++ (joinWithSep "\\\\"
78+ let authorstext = "\\author{" ++ (joinWithSep "\\\\"
81− (map stringToLaTeX authors)) ++ "}\n"
79+ (map stringToLaTeX authors)) ++ "}\n"
82 let datetext = if date == ""
80 let datetext = if date == ""
83 then ""
81 then ""
84 else "\\date{" ++ stringToLaTeX date ++ "}\n"
82 else "\\date{" ++ stringToLaTeX date ++ "}\n"