@@ -74,15 +74,23 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
7474 titletext <- liftM render $ inlineListToLaTeX title
7575 authorsText <- mapM (liftM render . inlineListToLaTeX) authors
7676 dateText <- liftM render $ inlineListToLaTeX date
77− body <- blockListToLaTeX blocks
77+ let (blocks', lastHeader) = if writerCiteMethod options == Citeproc then
78+ (blocks, [])
79+ else case last blocks of
80+ Header 1 il -> (init blocks, il)
81+ _ -> (blocks, [])
82+ body <- blockListToLaTeX blocks'
83+ biblioTitle <- liftM render $ inlineListToLaTeX lastHeader
7884 let main = render body
7985 st <- get
80− let biblio = intercalate "," $ map dropExtension $ writerBiblioFiles options
86+ let biblioFiles = intercalate "," $ map dropExtension $ writerBiblioFiles options
8187 citecontext = case writerCiteMethod options of
82− Natbib -> [ ("biblio", biblio)
88+ Natbib -> [ ("biblio-files", biblioFiles)
89+ , ("biblio-title", biblioTitle)
8390 , ("natbib", "yes")
8491 ]
85− Biblatex -> [ ("biblio", biblio)
92+ Biblatex -> [ ("biblio-files", biblioFiles)
93+ , ("biblio-title", biblioTitle)
8694 , ("biblatex", "yes")
8795 ]
8896 _ -> []
@@ -102,6 +110,7 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
102110 [ ("numbersections", "yes") | writerNumberSections options ] ++
103111 [ ("lhs", "yes") | stLHS st ] ++
104112 [ ("graphics", "yes") | stGraphics st ] ++
113+ [ ("book-class", "yes") | stBook st] ++
105114 citecontext
106115 return $ if writerStandalone options
107116 then renderTemplate context template