aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/EPUB.hs
AgeCommit message (Collapse)AuthorFilesLines
2013-01-22EPUB: condition Blaze Utf8 module name import on blaze-html versionJens Petersen1-0/+4
blaze-html/blaze-markup-0.5 has Text.Blaze.Html.Renderer.Utf8 whereas blaze-html-0.4 has Text.Blaze.Renderer.Utf8. So this needs to be conditional on the version for pandoc still be with blaze-html-0.4.x
2013-01-16Fixed problem with duplicate ids in epub.John MacFarlane1-12/+4
2013-01-11Revised EPUB writer given changes in header attributes.John MacFarlane1-7/+18
We need to ensure that all headers have attributes, since this is no longer guaranteed by hierarchicalize. Explicitly given headers remain the same.
2013-01-11EPUB writer: Download images at URLs.John MacFarlane1-3/+3
2013-01-11Refactoring:John MacFarlane1-0/+1
* Shared now exports fetchItem (instead of getItem) and openURL * fetchItem has different parameters than getItem and includes some logic formerly in the ODT and Docx writers * getItem still used in SelfContained
2013-01-09Added Attr field to Header.John MacFarlane1-7/+6
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2013-01-05EPUB changes.John MacFarlane1-12/+4
* Epub writer now exports writeEPUB, not writeEPUB2 and writeEPUB3. * Options now exports EPUBVersion * WriterOptions now includes writerEpubVersion.
2013-01-05Changed --toc-level to --toc-depth.John MacFarlane1-1/+1
2013-01-05Changed `--epub-toc-level` to `--toc-level`.John MacFarlane1-1/+1
Also writerEpubTOCLevel -> writerTOCLevel. So far this is only implemented in the EPUB writer.
2013-01-04Renamed writerEPUBMetadata -> writerEpubMetadata.John MacFarlane1-1/+1
API change for consistency.
2013-01-04Added `--epub-chapter-level` and `--epub-toc-level` options.John MacFarlane1-11/+13
Also added writerEpubChapterLevel and writerEpubTOCLevel fields to WriterOptions.
2013-01-04EPUB writer: Parameterize header level for splitting chapters.John MacFarlane1-8/+14
2012-12-29Data files changes.John MacFarlane1-3/+4
* Added `embed_data_files` flag. (not yet used) * Shared no longer exports `findDataFile`. * `readDataFile` now returns a strict bytestring. * Shared now exports `readDataFileUTF8` which returns a string like the old `readDataFile`. * Rewrote modules to use new data file functions and to avoid using functions from Paths_pandoc directly.
2012-12-19EPUB3: Don't use the switch statement for mathml.John MacFarlane1-10/+5
It is not widely implemented yet.
2012-11-04EPUB writer: Rationalized templates.John MacFarlane1-8/+3
* Previously there were three different templates involved in epub production. There is now just one template, default.epub or default.epub3. * It can now be overridden using `--template`, just like other templates.
2012-11-04EPUB: removed need for separate epub-titlepage template.John MacFarlane1-8/+3
The titlepage stuff is now folded into the epub-page template. A titlepage variable selects it.
2012-11-04EPUB writer: Removed need for separate epub-coverpage template.John MacFarlane1-11/+5
The standard epub-page template is now used.
2012-11-04EPUB writer: Improved handling of CSS.John MacFarlane1-2/+6
* Code highlighting now works by default. * Quote styles work as in pandoc's HTML writer.
2012-11-04EPUB writer: Set epub3 variable before calling templates.John MacFarlane1-1/+2
2012-11-04EPUB writer: Better TOC and footnote handling.John MacFarlane1-20/+29
* Here we go back to splitting the document at the Pandoc AST level, and converting each chapter to HTML separately. * Fixes bug in footnote processing introduced by commit 01d109e2efb880d9d2b8256d2e19ed4954076754. The bug caused all footnotes to appear in the last chapter, so that footnote links from other chapters would not work. Closes #651. * We also disable writerTableOfContents, since TOC is automatic for epub.
2012-11-04EPUB: Use section divs by default for better semantic markup.John MacFarlane1-0/+1
2012-11-04Improved support for MathML in EPUB3.John MacFarlane1-16/+26
* MathML math method now used always in EPUB3 (even if another math method specified in options). * epub:switch is used to specify a non-MathML default. This is supposed to proide a good fallback behavior in older readers, though I'm not sure how well it works in practice.
2012-11-02EPUB: Don't use opf:role in EPUB3.John MacFarlane1-1/+2
2012-11-02EPUB: Fixed invalid nesting problem in nav.xhtml.John MacFarlane1-3/+3
2012-11-02EPUB: Added properties attribute.John MacFarlane1-1/+3
2012-11-02EPUB: Use HTML5 for epub3.John MacFarlane1-1/+4
2012-11-02EPUB: Set epub3 template variable controlling doctype.John MacFarlane1-3/+5
2012-11-02EPUB writer: Don't create entry for nav.xhtml in EPUB2.John MacFarlane1-2/+3
2012-11-02Fixed a couple validation bugs that affect epub2 also.John MacFarlane1-2/+3
2012-11-02Preliminary changes for epub3 format.John MacFarlane1-15/+64
* EPUB writer now exports writeEPUB2 and writeEPUB3. * 'epub' output format is epub v2, while 'epub3' is v3.
2012-10-11EPUB writer improvements.John MacFarlane1-27/+54
* We now convert to XHTML before cutting into chapter-sized chunks. This fixes a number of problems. * `--number-sections` now works properly. * A proper three-level table of contents is now used in `toc.ncx`. There is no longer a subsidiary table of contents at the beginning of each chapter. * New epub-page template without the `$title$` variable. Titles are left in the chapter bodies as an initial h1. * Closes #539.
2012-09-29Renamed removedLeadingTrailingSpace to trim.John MacFarlane1-2/+2
Also removeLeadingSpace to triml, removeTrailingSpace to trimr.
2012-09-25Removed need for utf8-string package.John MacFarlane1-10/+10
* Depend on text. * Expose Text.Pandoc.UTF8. * Text.Pandoc.UTF8 now exports toString, fromString, toStringLazy, fromStringLazy. * These are used instead of the old utf8-string functions.
2012-09-13EPUB writer: Use ch001, ch002, etc. for chapter filenames.John MacFarlane1-5/+12
This improves sorting of chapters in some readers, which apparently sort ch2 after ch10. Closes #610.
2012-08-25EPUB: Use title instead of "Title Page" in contents.John MacFarlane1-1/+1
Otherwise we have a hard-coded English string, which looks strange in ebooks written in other languages. Using the title for this entry seems a good solution. Closes #572.
2012-08-23Don't strip meta and link elements in epub metadata.John MacFarlane1-3/+5
Per http://idpf.org/epub/30/spec/epub30-publications.html#sec-metadata-elem, a metadata element can contain not just Dublin Core elements but also meta and link elements, but Pandoc currently strips those out. Patch from aberrancy. Closes #589.
2012-08-09Use safeRead instead of using reads directly (various modules).John MacFarlane1-3/+3
2012-07-26Moved WriterOptions and associated types Shared -> Options.John MacFarlane1-4/+3
2012-07-24Changed signatures of writeODT, writeDocx, writeEPUB.John MacFarlane1-6/+4
These now take WriterOptions and Pandoc only. The extra parameters for epub stylesheet, epub fonts, reference Docx, and reference ODT have been removed, since these things are now in WriterOptions. Note: breaking API change!
2012-03-09EPUB reader: convert e.g. en_US from locale to en-US in language.John MacFarlane1-1/+2
2012-03-03EPUB writer: Use extensible exceptions.John MacFarlane1-1/+3
2012-02-05Normalize date in EPUB metadata.John MacFarlane1-1/+1
2012-01-30Added `--epub-embed-font` option.John MacFarlane1-5/+23
* This can be repeated for multiple fonts. * Added parameter for fonts to embed to writeEPUB. * Added ttf, otf to Mime types in Text.Pandoc.MIME.
2012-01-28Remove dependency on old-time.John MacFarlane1-2/+2
2012-01-13EPUB writer: Allow raw HTML.John MacFarlane1-6/+1
2012-01-01EPUB writer: Allow `lang` variable to set language in metadata.John MacFarlane1-2/+5
Defaults to locale language if `lang` is not set.
2011-12-30EPUB: Get correct environment variable for LANG.John MacFarlane1-1/+1
This should fix `<dc:language>` problems.
2011-12-28EPUB: Correctly handle internal links.John MacFarlane1-6/+55
Previously they were ignored. Now all links are preserved, but purely internal links are modified so that they point to the proper place in the EPUB. This is nontrivial, since the heading you refer to in your markdown source with 'my-section-1' might end up as 'ch16.xhtml#my-section' in the EPUB. Closes #76.
2011-12-26EPUB writer: Make external (absolute) links active.John MacFarlane1-2/+2
2011-12-18EPUB: Added customizable templates for epub pages.John MacFarlane1-46/+13
epub-page.html, epub-coverimage.html, epub-titlepage.html.