aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/EPUB.hs
AgeCommit message (Collapse)AuthorFilesLines
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.
2011-12-13EPUB: Don't use any decimal entities.John MacFarlane1-2/+2
kindlegen doesn't like them - even &#39;. It should be safe to use the unescaped ' character, since we know that all attributes are double quoted in the relevant files.
2011-12-12EPUB writer: made unEntity handle errors better.John MacFarlane1-6/+3
2011-12-12Fixed previous patch so it doesn't swallow a character!John MacFarlane1-7/+10
2011-12-12EPUB: Use UTF-8 rather than decimal entities.John MacFarlane1-2/+12
This addresses a problem with kindlegen pointed out by Axel Kielhorn.
2011-11-12Add date to EPUB titlepage and metadata.John MacFarlane1-3/+8
Closes #323. Thanks to Ralf Stephan for the patch (slightly modified).
2011-10-27Don't generate superfluous file `cover-image.jpg`.John MacFarlane1-2/+0
Closes #319.
2011-10-27Added TOC identifier in EPUB page template.John MacFarlane1-0/+2
Closes #329.
2011-07-16Un-URI-escape image filenames in LaTeX, ConTeXt, RTF, Texinfo.John MacFarlane1-2/+4
Also do this when copying image files into EPUBs and ODTs. Closes #263.
2011-07-04EPUB writer: Add a meta element specify the cover.Kelsey Hightower1-4/+6
Some EPUB e-readers, such as the Nook, require a meta element inside the OPF metadata block to ensure the cover image is properly displayed. When generating an EPUB using the `--epub-cover-image` option, this patch adds the following meta element to the OPF metadata block in `content.opf`: <meta name="cover" content="cover-image" />
2011-04-29Allow non-plain math methods in epub.John MacFarlane1-2/+1
2011-04-16Revert API change in EPUB writer.John MacFarlane1-3/+3
Instead of passing the epub cover image as a parameter, we now pass it in the list of variables. This avoids the API change introduced in f5cbb68534c52b292c57aaf741ab94442ddadd7a without losing the new functionality.
2011-03-13Added --epub-cover-image option.John MacFarlane1-9/+44
API change: Added a parameter for the cover image path to writeEPUB. Followed best practices outlined in http://blog.threepress.org/2009/11/20/best-practices-in-epub-cover-images/
2011-02-06Make --toc work in epub output.John MacFarlane1-0/+3
2011-01-26Bumped version to 1.8; depend on pandoc-types 1.8.John MacFarlane1-3/+3
The old TeX, HtmlInline and RawHtml elements have been removed and replaced by generic RawInline and RawBlock elements. All modules updated to use the new raw elements.
2010-12-24Use functions from Text.Pandoc.Generic instead of processWith(M).John MacFarlane1-1/+2
2010-07-09Cleaned up EPUB writer.John MacFarlane1-33/+43
2010-07-08EPUB writer: don't put multiple copies of same image in epub.John MacFarlane1-10/+17
2010-07-08Get default stylesheet in EPUB writer, rather than pandoc.hs.John MacFarlane1-2/+5
2010-07-08Added writerSourceDirectory to WriterOptions.John MacFarlane1-3/+3
This allows us to remove an argument from the ODT and EPUB writers.
2010-07-05Made -Wall clean.John MacFarlane1-1/+1
2010-07-05Removed links (internal and external).John MacFarlane1-15/+17
2010-07-05Process user-supplied EPUB metadata.John MacFarlane1-7/+21
Read a sequence of elements from the file. Ignore anything that's not valid Dublin Core. If title, language, uuid not supplied, supply them.
2010-07-05Added an EPUB writer.John MacFarlane1-0/+247
+ New writer module Text.Pandoc.Writers.EPUB + Stylesheet in epub.css + --epub-stylesheet command-line option. + New utility module Text.Pandoc.UUID to generate random UUIDs for EPUBs.