Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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.
|
|
|
|
Using Text.Pandoc.Free, introduce pure versions of Docx, EPUB, ICML, and
ODT writers. Each of the pure versions is exported along with the IO
version (produced by running `runIO` on the pure reader). Ideally, this
should make the writers easier to test.
|
|
Previously setting writerStandalone = True did nothing unless
a template was provided in writerTemplate. Now a fragment
will be generated if writerTemplate is Nothing; otherwise,
the specified template will be used and standalone output
generated. [API change]
|
|
This means that underscores won't be used for emphasis,
or CAPS for bold. The metadata fields will just have unadorned
text.
Closes #3066.
|
|
|
|
This allows templates to treat it differently.
|
|
This avoids performance problems in documents with many identically
named headers.
Closes #2671.
|
|
Added threefold wrapping option.
* Command line option: deprecated `--no-wrap`, added
`--wrap=[auto|none|preserve]`
* Added WrapOption, exported from Text.Pandoc.Options
* Changed type of writerWrapText in WriterOptions from
Bool to WrapOption.
* Modified Text.Pandoc.Shared functions for SoftBreak.
* Supported SoftBreak in writers.
* Updated tests.
* Updated README.
Closes #1701.
|