Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
So far, we don't actually write any custom properties,
but we have the infrastructure to add this.
See #3034.
|
|
Although this is not documented in the spec, some versions of
Word require a 'w:p' element inside every table cell. Thus, we
add one when the contents of a cell do not already include one
(e.g. when a table cell contains a table).
Closes #4953.
|
|
Remove exported functions `metaValueToInlines`, `metaValueToString`.
Add new exported functions `lookupMetaBool`, `lookupMetaBlocks`,
`lookupMetaInlines`, `lookupMetaString`.
Use these whenever possible for uniformity in writers.
API change (major, because of removed function `metaValueToInlines`.
`metaValueToString` wasn't in any released version.)
|
|
fixes #4900
|
|
Closes #4826. This isn't a complete solution, since other
nestings of display math may still cause problems, but it should
work for what is by far the most common case.
Note that this also involves an API change: `isDisplayMath`
is now exported from Text.Pandoc.Writers.Shared.
|
|
|
|
Closes #4645.
|
|
Updated golden test and confirmed validity of file.
Closes #4633.
|
|
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.
|
|
|
|
We want decimal for the top level, not lower roman.
|
|
|
|
Fixes an issuue regarding image sizing if the same image is included more than once.
Previously, a record was kept, indexed by image source, which would include the XML for that image. For every image element in the document, this record was checked, and if the image was the same as previous examples, the same XML would be included twice. The information in this XML incudes the image description, title text, and size on the page, thus all images from the same source would always be sized the same, and have the same description. This commit fixes this by generating unique XML every time, but keeping the image ID and path if it is the same image.
|
|
|
|
This will allow us to compare files directly in a golden test. Times
are still based on IO, but we will be able to safely skip those.
Changes:
- `getUniqueId` now calls to the state to get an incremented digit,
instead of calling to P.uniqueHash.
- we always start the PRNG in mkNumbering/mkAbstractNum with the same
seed (1848), so our randoms should be the same each time.
|
|
Comments from `--track-changes=all` were producing corrupt docx,
because the writer was trying to get id from the `(ID,_,_)` field of
the attributes, and ignoring the "id" entry in the key-value pairs. We
now check both.
There is a larger conversation to be had about the right way to treat
"id" and "class" entries in kvs, but this fix will correctly interpret
the output of the docx reader work.
|
|
This had been mistakenly written as a second insertion function.
Closes: #4303
|
|
|
|
This will allow the Powerpoint writer to use it as well.
|
|
|
|
fixes for docx writer
|
|
Word 2016 seems to use a default value of "1" for table headers, if there is no firstRow definition (although a default value of 0 is documented), so all tables get the first Row formatted as header.
Setting the parameter to 0 if the table has no header row fixes this for Word 2016
|
|
Custom styles with spaces worked for divs but not for spans.
This commit fixes the problem. Closes #3290.
|
|
subtitle is allready used to create a subtitle for the document
appending the subtitle to the main title leads to double subtitle in the document
|
|
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.
|