Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
epub:type of first section epub:type of body
-------------------------- ------------------
prologue frontmatter
abstract frontmatter
acknowledgments frontmatter
copyright-page frontmatter
dedication frontmatter
foreword frontmatter
halftitle, frontmatter
introduction frontmatter
preface frontmatter
seriespage frontmatter
titlepage frontmatter
afterword backmatter
appendix backmatter
colophon backmatter
conclusion backmatter
epigraph backmatter
Otherwise body will have epub:type 'bodymatter'.
This only affects epub3.
See http://www.idpf.org/epub/profiles/edu/structure/#h.l0bzsloklt10
Closes #4823.
|
|
Previously we weren't escaping `&` and other XML characters
in the pagetitle, so a title containing a `&` would be invalid.
|
|
even when structured titles are used.
This prevents spurious warnings about empty title elements.
Closes #4486.
|
|
fixes #4453
|
|
This is no longer necessary since we no longer support ghc 7.8.
|
|
This seems to be necessary if we are to use our custom Prelude
with ghci.
Closes #4464.
|
|
|
|
|
|
It was previously `media/media/imagename`, and should have
been `media/imagename`.
|
|
Closes #4069.
|
|
(src, poster, etc.) This had not been updated for the
new EPUB container layout, with a separate text/ subdirectory.
Closes #4050. Closes #4055.
|
|
The structure of the EPUBs was messed up, and #3720 was
improperly implemented. This commit fixes things.
|
|
|
|
|
|
- Ensure that epub2 is recognized as a non-text format,
so that a template is used.
- Don't include "prefix" attribute for ibooks for epub2.
It doesn't validate.
- Fix stylesheet paths; previously we had an incorrect
stylesheet path for the cover page and nav page.
|
|
|
|
|
|
|
|
|
|
Removed `writerSourceURL` from `WriterOptions` (API change).
Added `stSourceURL` to `CommonState`.
It is set automatically by `setInputFiles`.
Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`.
The type of `getInputFiles` has changed; it now returns `[FilePath]`
instead of `Maybe [FilePath]`.
Functions in Class that formerly took the source URL as a parameter
now have one fewer parameter (`fetchItem`, `downloadOrRead`,
`setMediaResource`, `fillMediaBag`).
Removed `WriterOptions` parameter from `makeSelfContained` in
`SelfContained`.
|
|
In Text.Pandoc.Class and Text.Pandoc.Template, resp.
We now get the datadir from CommonState.
|
|
Closes #1611.
|
|
You can now have the following fields in your YAML metadata,
and it will be treated appropriately in the generated
EPUB.
```
ibooks:
version: 1.3.4
specified-fonts: false
ipad-orientation-lock: portrait-only
iphone-orientation-lock: landscape-only
binding: true
scroll-axis: vertical
```
This commit also fixes a regression in stylesheet paths.
|
|
|
|
|
|
[API change]
The EPUB writer now takes its EPUB subdirectory from this option.
Also added `PandocEpubSubdirectoryError` to `PandocError`.
This is raised if the EPUB subdirectory is not all ASCII
alphanumerics.
See #3720.
|
|
See #3720.
We now put all EPUB related content in an EPUB/ subdirectory
by default (later this will be configurable).
mimetype
META-INF/
com.apple.ibooks.display-options.xml
container.xml
EPUB/ <<--configurable-->>
fonts/ <<--static-->>
font.otf
media/ <<--static-->>
cover.jpg
fig1.jpg
styles/ <<--static-->>
stylesheet.css
content.opf
toc.ncx
text/ <<--static-->>
ch001.xhtml
|
|
This gives 20-30% speedup and reduction of memory
usage in most of the writers.
|
|
* XML.toEntities: changed type to Text -> Text.
* Shared.tabFilter -- fixed so it strips out CRs as before.
* Modified writers to take Text.
* Updated tests, benchmarks, trypandoc.
[API change]
Closes #3731.
|
|
This follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
|
|
|
|
* Removed writerEpubStylesheet in WriterOptions.
* Removed `--epub-stylesheet` option.
* Allow `--css` to be used with epub.
* Allow multiple stylesheets to be used.
* Stylesheets will be taken both from `--css` and from
the `stylesheet` metadata field (which can contain either
a file path or a list of them).
Closes #3472, #847.
|
|
|
|
API change.
|
|
The argument was for a bridge javascript that used to be necessary
in 2004. We have removed the script already.
|
|
Options: Remove writerEPUBVersion.
|
|
Also include explicit epub2 output format in CLI tool.
|
|
* Text.Pandoc.Writers.HTML: removed writeHtml, writeHtmlString,
added writeHtml4, writeHtml4String, writeHtml5, writeHtml5String.
* Removed writerHtml5 from WriterOptions.
* Renamed default.html template to default.html4.
* "html" now aliases to "html5"; to get the old HTML4 behavior,
you must now specify "-t html4".
|
|
Made changes where these are used, so that the version
of fetchItem from PandocMonad can be used instead.
|
|
There's already a function addWarning in Parsing!
Maybe we can dispense with that now, but I still like
'warning' better as a name.
|
|
* Renaming Text.Pandoc.Class.warn to addWarning avoids conflict
with Text.Pandoc.Shared.warn.
* Removed writeRTFWithEmbeddedImages from Text.Pandoc.Writers.RTF.
This is no longer needed; we automatically handle embedded images
using the PandocM functions. [API change]
|
|
|
|
|
|
Errors can be thrown purely with `throwError`. At the moment there are
only three kinds of errors:
1. PandocFileReadError FilePath (for problems reading a file from the
filesystem)
2. PandocShouldNeverHappenError String (for stuff that should never
happen but we need to pattern-match anyway)
3. PandocSomeError String (a grab bag of everything else)
Of course, we need to subdivide the third item in this list.
|
|
Since PandocMonad is an instance of MonadError, this will allow us, in a
future commit, to change all invocations of `error` to `throwError`,
which will be preferable for the pure versions. At the moment, we're
disabling the lua custom writers (this is temporary).
This requires changing the type of the Writer in Text.Pandoc. Right now,
we run `runIOorExplode` in pandoc.hs, to make the conversion easier. We
can switch it to the safer `runIO` in the future.
Note that this required a change to Text.Pandoc.PDF as well. Since
running an external program is necessarily IO, we can be clearer about
using PandocIO.
|
|
Instead of Free Monad with runIO
|
|
This is just defined in term of a bytestring, so we convert when necessary.
|
|
|
|
These work with a State monad and a Reader monad to produce
deterministic results. It can probably be simplified somewhat.
|