@@ -397,6 +397,10 @@ writeEPUB opts doc@(Pandoc meta _) = do
397397
398398 let chapters = evalState (toChapters blocks'') []
399399
400+ let removeNote :: Inline -> Inline
401+ removeNote (Note _) = Str ""
402+ removeNote x = x
403+
400404 let chapToEntry :: Int -> Chapter -> Entry
401405 chapToEntry num (Chapter mbnum bs) = mkEntry (showChapter num)
402406 $ renderHtml
@@ -404,7 +408,9 @@ writeEPUB opts doc@(Pandoc meta _) = do
404408 fromMaybe [] mbnum }
405409 $ case bs of
406410 (Header _ _ xs : _) ->
407− Pandoc (setMeta "title" (fromList xs) nullMeta) bs
411+ -- remove notes or we get doubled footnotes
412+ Pandoc (setMeta "title" (walk removeNote $ fromList xs)
413+ nullMeta) bs
408414 _ ->
409415 Pandoc nullMeta bs
410416