Age | Commit message (Collapse) | Author | Files | Lines |
|
Works pretty much the same as Word writer.
Following styles are used for figures:
Figure -- for figure with empty caption
FigureWithCaption (based on Figure) -- for figure with caption
FigureCaption (based on Caption) -- for figure captions
Also, TableCaption (based on Caption) is used for table captions.
We need FigureWithCaption to set keepWithNext, in order to keep caption
with figure.
|
|
Closes #1729.
|
|
* Resolve #1682
* Strip querystring from filename before rendering ODT files, ODT cannot
handle querystrings in files.
|
|
* Create a type synonym for MIME type (instead of `String`).
* Add `getMimeTypeDef` function.
* Avoid recreating MIME type `Map`s every time.
* Move “Formula-...” case handling into `getMimeType`.
|
|
|
|
The MediaBag is thread through from the reader, with no need
to extract to files.
|
|
|
|
Note: LibreOffice's support for this seems a bit buggy. But
it should be better than what we had before.
|
|
Replace uses of `maybe x id` with `fromMaybe x`.
|
|
See #939. We leave the nonconforming contextual-spacing attribute,
which is provided by LibreOffice itself and seems to be supported.
|
|
Previously we used to store the directory of the first input file,
even if it was local, and used this as a base directory for
finding images in ODT, EPUB, Docx, and PDF.
This has been confusing to many users. It seems better to look for
images relative to the current working directory, even if the first
file argument is in another directory.
writerSourceURL is set to 'Just url' when the first command-line
argument is an absolute URL. (So, relative links will be resolved
in relation to the first page.) Otherwise, 'Nothing'.
The ODT, EPUB, Docx, and PDF writers have been modified accordingly.
Note that this change may break some existing workflows. If you
have been assuming that relative links will be interpreted relative
to the directory of the first file argument, you'll need to
make that the current directory before running pandoc.
Closes #942.
|
|
They are significantly faster.
|
|
* In Shared, openURL and fetchItem now return an Either, for
better error handling. (API change.)
* Better error message when fetching a URL fails with
`--self-contained`.
* EPUB writer: If resource not found, skip it, as in Docx writer.
* Closes #916.
|
|
* Depend on pandoc 1.12.
* Added yaml dependency.
* `Text.Pandoc.XML`: Removed `stripTags`. (API change.)
* `Text.Pandoc.Shared`: Added `metaToJSON`.
This will be used in writers to create a JSON object for use
in the templates from the pandoc metadata.
* Revised readers and writers to use the new Meta type.
* `Text.Pandoc.Options`: Added `Ext_yaml_title_block`.
* Markdown reader: Added support for YAML metadata block.
Note that it must come at the beginning of the document.
* `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`,
`stateAuthors`, `stateDate` with `stateMeta`.
* RST reader: Improved metadata.
Treat initial field list as metadata when standalone specified.
Previously ALL fields "title", "author", "date" in field lists
were treated as metadata, even if not at the beginning.
Use `subtitle` metadata field for subtitle.
* `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string
instead of a compiled template..
* OPML template: Use 'for' loop for authors.
* Org template: '#+TITLE:' is inserted before the title.
Previously the writer did this.
|
|
This was due to a change in the Show instance for
Text.Pandoc.Pretty.Doc, which led 1.11 to produce corrupt ODTs.
Closes #780.
|
|
* 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
|
|
These images are now downloaded instead of being ignored (as
used to happen in the docx reader) or causing an error (as
used to happen in the odt reader).
|
|
* 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.
|
|
* 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.
|
|
Conflicts:
src/Text/Pandoc/Writers/ODT.hs
|
|
|
|
|
|
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!
|
|
|
|
|
|
* ImageSize record now includes dpiX, dpiY, pxX, pxY.
* New functions sizeInPixels and sizeInPoints.
|
|
OpenDocument writer: a title like "123x467" is interpreted
as size in *points*.
ODT writer: while adding images to the archive, computes their
sizes and inserts a title attribute with the size before
calling opendocument writer.
Size is computed as follows:
size in points = size in pixels * 96 / 72
|
|
Moved getMimeType from Text.Pandoc.Shared to Text.Pandoc.MIME,
so we won't have an API change.
|
|
This fixes a bug in ODTs containing images. LibreOffice would signal
that these ODTs were corrupt, because the manifest.xml did not contain
a reference to the image files.
|
|
Also do this when copying image files into EPUBs and ODTs.
Closes #263.
|
|
|
|
|
|
|
|
This allows us to remove an argument from the ODT and EPUB
writers.
|
|
+ Transformed the old Text.Pandoc.ODT module into a proper
writer module, Text.Pandoc.Writers.ODT.
+ Instead of saveOpenDocumentAsODT, we now have writeODT, which
takes a Pandoc document and produces a bytestring.
saveOpenDocumentAsODT has been removed.
+ To extract the images and insert them into the ODT, we now use
processPandocM on the Pandoc document rather than a custom XML parser.
+ Handle the case where the image is remote (or not found) by
converting the Image element into an Emph with the label.
+ Plumbing in pandoc.hs changed slightly to accomodate this, and to
allow other writers that live in the IO monad.
|