@@ -114,7 +114,7 @@ defaultWriterState :: WriterState
114114defaultWriterState = WriterState{
115115 stTextProperties = []
116116 , stParaProperties = []
117− , stFootnotes = []
117+ , stFootnotes = defaultFootnotes
118118 , stSectionIds = []
119119 , stExternalLinks = M.empty
120120 , stImages = M.empty
@@ -1073,6 +1073,22 @@ inlineToOpenXML opts (Image alt (src, tit)) = do
10731073br :: Element
10741074br = mknode "w:r" [] [mknode "w:br" [("w:type","textWrapping")] () ]
10751075
1076+-- Word will insert these footnotes into the settings.xml file
1077+-- (whether or not they're visible in the document). If they're in the
1078+-- file, but not in the footnotes.xml file, it will produce
1079+-- problems. So we want to make sure we insert them into our document.
1080+defaultFootnotes :: [Element]
1081+defaultFootnotes = [ mknode "w:footnote"
1082+ [("w:type", "separator"), ("w:id", "-1")] $
1083+ [ mknode "w:p" [] $
1084+ [mknode "w:r" [] $
1085+ [ mknode "w:separator" [] ()]]]
1086+ , mknode "w:footnote"
1087+ [("w:type", "continuationSeparator"), ("w:id", "0")] $
1088+ [ mknode "w:p" [] $
1089+ [ mknode "w:r" [] $
1090+ [ mknode "w:continuationSeparator" [] ()]]]]
1091+
10761092parseXml :: Archive -> Archive -> String -> IO Element
10771093parseXml refArchive distArchive relpath =
10781094 case ((findEntryByPath relpath refArchive `mplus`