Age | Commit message (Collapse) | Author | Files | Lines |
|
Deprecate readTeXMath, and use readTeXMath' in all the writers.
Require texmath >= 0.6.5.
|
|
Closes #990.
|
|
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.
|
|
|
|
Currently these are "transparent" containers, except in HTML,
where they produce div and span elements with attributes.
|
|
This allows pandoc to compile with base < 4.5, where Data.Monoid
doesn't export `<>`. Thanks to Dirk Ullirch for the patch.
|
|
* 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.
|
|
Closes #903. This change will make EPS images properly sized
on conversion to Word.
|
|
|
|
We take the word/styles.xml, docProps/app.xml, word/theme/theme1.xml,
and word/fontTable.xml from reference.docx, ignoring everything else.
Perhaps this will help with the corruption problems caused when
different versions of Word resave the reference.docx and
reorganize things.
|
|
Previously we used w:cr.
I don't see a difference between these in my version of Word,
but apparently some do. Closes #873.
|
|
* 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 differentiates between tight and loose lists.
Closes #775.
|
|
In 1.11 and 1.11.1, display math in lists rendered as a new list
item. Now it always appears centered, just as outside of lists,
and in proper display math style, no matter how far indented the
containing list item is.
Closes #784.
|
|
Display math inside a paragraph is now put in a separate
paragraph, so it will render properly (centered and without
extra blank lines around it).
Partially addresses #742.
|
|
FootnoteReference -> FootnoteRef.
Hyperlink -> Link.
Why? Because the old names got changed by Word when the
reference.docx was edited. I don't understand why, but this
fixes things.
Closes #414.
|
|
This fixes problems that arise when you edit the reference.docx
with Word. Word tends to remove things from the `[Content_Types].xml`
and `word/_rels/document.xml.rels` files that are needed (e.g.
references to the `footnotes.xml` file and image default mime types).
So we regenerate these completely rather than taking them from
the `reference.docx`.
We also now encode mime types for each individual image rather
than using defaults. This should allow us to handle a wider
range of image types.
This mostly addresses #414. The only remaining issue I can see
is the issue of style IDs, which Word inexplicably changes in
some cases when the reference.docx is saved. E.g.
`FootnoteReference` becomes `FootnoteReference1`.
|
|
|
|
|
|
Revises 1a4b47e93368bfbd31daccdfedbd9527ee740201
|
|
* In markdown reader, add a '\1' character to the beginning
of the title of an image that is alone in its paragraph,
if implicit_figures extension is selected.
* In writers, check for Para [Image alt (src,'\1':tit)] and treat
it as a figure if possible.
* Updated tests.
This is a bit of a hack, but it allows us to make implicit_figures
an extension of the markdown reader, rather than the writers.
|
|
* 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).
|
|
Avoid reading image files again when we've already processed them.
|
|
* Use getItem to fetch images, so we can get them over the net
if they have absolute URLs.
* Added TODO notes for cleaning up the logic.
|
|
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.
|
|
|
|
This seems to help LibreOffice convert the file, even though
it was valid docx before.
Note that the references in notes must be in
word/_rels/footnotes.xml.rel. We handle this now by simply
making that file contain all the references in
word/_rels/document.xml.rel. Something better could be done
eventually, but this works.
Closes #637.
|
|
* 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.
|
|
This helps when merging word documents with numbered or bulleted lists.
Closes #627.
|
|
Closes #626.
|
|
* 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.
|
|
This reverts commit 7272735b3d413a644fd9ab01eeae8ae9cd5a925b.
|
|
Previously, UTF-8 was enforced for both input and output.
The new system:
* For input, UTF-8 is tried first; if an error is raised, the
locale encoding is tried.
* For output, the locale encoding is always used.
|
|
Previously a list like
1. one
- a
- b
2. two
would come out with a bullet instead of "2."
Thanks to Russell Allen for reporting the bug.
|
|
This seems to fix a problem viewing pandoc-generated
docx files in LibreOffice.
|
|
|
|
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!
|
|
Closes #520.
|
|
|
|
Previously they each got a list marker.
Closes #457.
|
|
Needs testing with Word.
|
|
Closes #414.
Previously, if you edited the reference.docx with Word, then
created a new docx using the edited reference.docx, Word would complain
about the file being corrupt. The problem seems to be that Word
changes _rels/.rels, changing the Type of the Relationship to
docProps/core.xml from
"http://schemas.openxmlformats.org/officedocument/2006/relationships/metadata/core-properties"
to
"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties".
As far as I can see, this is a bug in Word, since the latter is not
valid. (See
http://idippedut.dk/post/2010/04/22/Correct-according-to-spec-or-implementation.aspx.)
This change simply does a global replace on _rels/.rels that reverts
the change Word makes. And now producing docx files with Word-modified
reference.docx seems to work.
|
|
|
|
Added normalizeDate to Text.Pandoc.Shared.
|
|
|
|
Previously a footnote in a list item would be a list item, etc.!
|
|
|
|
|