Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously a `reference.docx` in `~/.pandoc` (or the user data dir)
would be used instead, and this could cause problems because a
user-modified docx sometimes lacks vital sections that we count
on the `distArchive` to supply.
Closes #4182.
|
|
These were a result of moving functions to the OOXML module.
|
|
This is for functions used by both Powerpoint and Docx writers.
|
|
This fixes a bug in 2.0.4, whereby pandoc could not
read the theme files generated with `--print-highlight-style`.
It also fixes some CSS issues involving line numbers.
Highlighted code blocks are now enclosed in a div with class
sourceCode.
Highlighting CSS no longer sets a generic color for pre
and code; we only set these for class `sourceCode`.
This will close #4133 and #4128.
|
|
* Deprecate `--strip-empty-paragraphs` option. Instead we now
use an `empty_paragraphs` extension that can be enabled on
the reader or writer. By default, disabled.
* Add `Ext_empty_paragraphs` constructor to `Extension`.
* Revert "Docx reader: don't strip out empty paragraphs."
This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b.
* Implement `empty_paragraphs` extension in docx reader and writer,
opendocument writer, html reader and writer.
* Add tests for `empty_paragraphs` extension.
|
|
See #2252.
This also changes fixDisplayMath from Text.Pandoc.Writers.Shared
so that it no longer produces empty Para as an artifact.
(That was the original reason the writer omitted them.)
|
|
|
|
|
|
Fixes #3901 by checking for the evenAndOddHeaders mark in the
reference doc, and copying it to the resulting docx if present.
|
|
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`.
|
|
Bug was introduced by commit a868b238f253423281b2648896f184e7cdc05014.
|
|
We assume that comments are defined as parsed by the
docx reader:
I want <span class="comment-start" id="0" author="Jesse Rosenthal"
date="2016-05-09T16:13:00Z">I left a comment.</span>some text to
have a comment <span class="comment-end" id="0"></span>on it.
We assume also that the id attributes are unique and properly
matched between comment-start and comment-end.
Closes #2994.
|
|
* readDataFile, readDefaultDataFile, getReferenceDocx,
getReferenceODT have been removed from Shared and
moved into Class. They are now defined in terms of
PandocMonad primitives, rather than being primitve
methods of the class.
* toLang has been moved from BCP47 to Class.
* NoTranslation and CouldNotLoudTranslations have
been added to LogMessage.
* New module, Text.Pandoc.Translations, exporting
Term, Translations, readTranslations.
* New functions in Class: translateTerm, setTranslations.
Note that nothing is loaded from data files until
translateTerm is used; setTranslation just sets the
language to be used.
* Added two translation data files in data/translations.
* LaTeX reader: Support `\setmainlanguage` or `\setdefaultlanguage`
(polyglossia) and `\figurename`.
|
|
It is now carried in CommonState in PandocMonad instances.
(And thus it can be used by readers too.)
|
|
In Text.Pandoc.Class and Text.Pandoc.Template, resp.
We now get the datadir from CommonState.
|
|
|
|
Closes #3519.
|
|
|
|
Text.Pandoc.BCP47 (unexported, internal module).
`getLang`, `Lang(..)`, `parseBCP47`.
|
|
into `Lang(..)`, `getLang`, `parceBCP47`.
|
|
This adds the required attributes to the temporary styles,
and also replaces existing language attributes in styles.xml.
Support for lang attributes on Div and Span has also been
added.
Closes #1667.
|
|
This gives 20-30% speedup and reduction of memory
usage in most of the writers.
|
|
(See #3719)
|
|
Hi, I don't know haskell so possibly this is wrong, but DOCX stores keywords in cp:keywords in core.xml, and this should be easy to add from the pandoc metadata (I copy and paste the author code). As far as I can tell (no clear documentation, just a few refs), keywords should be separated with a comma.
|
|
"Table Normal" is the default table style and can't be modified.
Closes #3275, further testing welcome.
|
|
Closes #3691.
|
|
Edit styles.xml as part of the fix for #3656
|
|
This follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
|
|
Use this instead of PandocIOError when a resource is not
found in path.
This improves the error message in this case, see #3629.
|
|
The docx writer takes components from the distribution's
version of reference.docx when it can't find them in a
user's custom reference.docx. (This sometimes happens
because Word will sometimes omit components needed for larger
documents when saving a simple one.)
Previously, we allowed a reference.docx in the data directory
(e.g. `~/.pandoc`) to be used as the distribution's reference.docx.
This led to a bizarre situation where pandoc would produce a
good docx using `--template ~/.pandoc/ref.docx`, but if `ref.docx`
were moved to `~/.pandoc/reference.docx`, it would then produce
a corrupted docx.
Closes #3322 (I think).
|
|
See #3334.
* Add writerSyntaxMap to WriterOptions.
* Highlighting: added parameter for SyntaxMap to highlight.
* Implemented --syntax-definition option.
TODO:
[ ] Figure out whether we want to have the xml parsing
depend on the dtd (it currently does, and fails unless
the language.dtd is found in the same directory).
[ ] Add an option to read a KDE syntax highlighting theme
as a custom style.
[ ] Add tests.
|
|
|
|
This allows us to display error information returned by the
skylighting library.
Display a warning if the highlighting library throws an error.
|
|
|
|
Closes #3476.
|
|
|
|
And cleaned up code.
|
|
- Bookmark start/end now surrounds content rather than preceding it.
- Bookmarks generated for Div with id. Fixes jgm/pandoc-citeproc#205.
- Cleaner code for handling dir and style attributes for Div.
|
|
Closes #736.
|
|
`imageSize img` is now `imageSize opts img`
|
|
|
|
|
|
|
|
API change.
For no highlighting, set writerHighlightStyle to Nothing.
|
|
This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
|
|
Made changes where these are used, so that the version
of fetchItem from PandocMonad can be used instead.
|
|
* Removed normalize, normalizeInlines, normalizeBlocks
from Text.Pandoc.Shared. These shouldn't now be necessary,
since normalization is handled automatically by the Builder
monoid instance.
* Remove `--normalize` command-line option.
* Don't use normalize in tests.
* A few revisions to readers so they work well without normalize.
|
|
We don't need these, since the default docx and odt can be
retrieved using `readDataFile datadir "reference.docx"` (or odt).
|
|
Do we need this? I don't see why.
There's a name clash which would better be avoided.
|
|
* Text.Pandoc.Options.WriterOptions: removed writerReferenceDocx
and writerReferenceODT, replaced them with writerReferenceDoc.
This can hold either an ODT or a Docx. In this way, writerReferenceDoc
is like writerTemplate, which can hold templates of different
formats. [API change]
* Removed `--reference-docx` and `--reference-odt` options.
* Added `--reference-doc` option.
|