git.iko.soy/typeable/pandoc
on master help sign in
Fix document section assignments in EPUB writer.

For example, introduction should go in bodymatter, not frontmatter, and epigraph, conclusion, and afterward should go in bodymatter, not backmatter. For the full list of assignments, see the manual. Closes #5546.

commitb5af8eed3877ff0c99e14b12220562db406c1eba authorJohn MacFarlane <jgm@berkeley.edu> dateTue 4 Jun 2019, 09:20 (7 years ago) parentdddad51
2 files changed+19−9
MANUAL.txt+12−5 src/Text/Pandoc/Writers/EPUB.hs+7−4
MANUAL.txt+12−5
@@ -4944,17 +4944,24 @@ abstract frontmatter
49444944acknowledgments frontmatter
49454945copyright-page frontmatter
49464946dedication frontmatter
4947+credits frontmatter
4948+keywords frontmatter
4949+imprint frontmatter
4950+contributors frontmatter
4951+other-credits frontmatter
4952+errata frontmatter
4953+revision-history frontmatter
4954+titlepage frontmatter
4955+halftitlepage frontmatter
4956+seriespage frontmatter
49474957foreword frontmatter
4948−halftitle, frontmatter
4949−introduction frontmatter
49504958preface frontmatter
49514959seriespage frontmatter
49524960titlepage frontmatter
4953−afterword backmatter
49544961appendix backmatter
49554962colophon backmatter
4956−conclusion backmatter
4957−epigraph backmatter
4963+bibliography backmatter
4964+index backmatter
49584965
49594966[epub-type]: http://www.idpf.org/epub/31/spec/epub-contentdocs.html#sec-epub-type-attribute
49604967
src/Text/Pandoc/Writers/EPUB.hs+7−4
@@ -584,11 +584,14 @@ pandocToEPUB version opts doc = do
584584 _ -> (Pandoc nullMeta bs, "bodymatter")
585585 frontMatterTypes = ["prologue", "abstract", "acknowledgments",
586586 "copyright-page", "dedication",
587− "foreword", "halftitle",
588− "introduction", "preface",
587+ "credits", "keywords", "imprint",
588+ "contributors", "other-credits",
589+ "errata", "revision-history",
590+ "titlepage", "halftitlepage", "seriespage",
591+ "foreword", "preface",
589592 "seriespage", "titlepage"]
590− backMatterTypes = ["afterword", "appendix", "colophon",
591− "conclusion", "epigraph"]
593+ backMatterTypes = ["appendix", "colophon", "bibliography",
594+ "index"]
592595
593596 chapterEntries <- zipWithM chapToEntry [1..] chapters
594597