Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously, we had used the user-supplied date, if available, for Word's
document creation metadata. This could lead to weird results, as in
cases where the user post-dates a document (so the modification might be
prior to the creation). Here we use the actual computer time to set the
document creation.
|
|
We treat display math like block quotes, and apply FirstParagraph style
to paragraphs that follow them. These can be styled as the user
wishes. (But, when the user is using indentation, this allows for
paragraphs to continue after display math without indentation.)
|
|
closes #2754
|
|
This avoids performance problems in documents with many identically
named headers.
Closes #2671.
|
|
It's possible that wrapping causes problems; safer to
turn it off.
|
|
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.
|
|
Previously we tried to get the image size from the image even
if an explicit size was specified. Since we still can't get
image size for PDFs, this made it impossible to use PDF images
in docx.
Now we don't try to get the image size when a size is already
explicitly specified.
|
|
mb21-new-image-attributes
* Bumped version to 1.16.
* Added Attr field to Link and Image.
* Added `common_link_attributes` extension.
* Updated readers for link attributes.
* Updated writers for link attributes.
* Updated tests
* Updated stack.yaml to build against unreleased versions of
pandoc-types and texmath.
* Fixed various compiler warnings.
Closes #261.
TODO:
* Relative (percentage) image widths in docx writer.
* ODT/OpenDocument writer (untested, same issue about percentage widths).
* Update pandoc-citeproc.
|
|
This matches Word's default behavior. Closes #2527.
|
|
Don't use custom prelude for latest ghc.
This is a better approach to making 'stack ghci' and 'cabal repl'
work. Instead of using NoImplicitPrelude, we only use the custom
prelude for older ghc versions. The custom prelude presents a
uniform API that matches the current base version's prelude.
So, when developing (presumably with latest ghc), we don't
use a custom prelude at all and hence have no trouble with ghci.
The custom prelude no longer exports (<>): we now want to
match the base 4.8 prelude behavior.
|
|
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
|
|
This is needed for ghci to work with pandoc, given that we
now use a custom prelude.
Closes #2503.
|
|
* CPP around deprecated `parseTime`.
* Text.Pandoc.Compat.Locale -> Text.Pandoc.Compat.Time,
now exports Data.Time.
|
|
- The (non-exported) prelude is in prelude/Prelude.hs.
- It exports Monoid and Applicative, like base 4.8 prelude,
but works with older base versions.
- It exports (<>) for mappend.
- It hides 'catch' on older base versions.
This allows us to remove many imports of Data.Monoid
and Control.Applicative, and remove Text.Pandoc.Compat.Monoid.
It should allow us to use -Wall again for ghc 7.10.
|
|
This allows the test suite to work without installing pandoc first.
It also brings the docx writer in line with the odt writer.
|
|
This avoids an inefficient generic traversal.
Updates f3aa03e.
Closes #2356.
|
|
|
|
(mb21)
|
|
Taking some values from a user-supplied reference.docx
tends to lead to corruption.
This fixes a regression from the last release. Closes #2249.
|
|
Now they are constructed on the fly from their components,
but we now allow them to be printed with `--print-default-data-file`
and to override the defaults if placed in the user data directory.
Shared now exports getDefaultReferenceDocx and getDefaultReferenceODT
(API change).
These functions have been removed from the Docx and ODT writers.
Shared.readDataFile has been modified so that requests to read
a reference.odt or reference.docx will use these functions to
generate the files.
|
|
* Reverted kludgy change to make-windows-installer.bat.
* Removed make-reference-fiels.hs.
* Moved the individual ingredients of reference.docx and
reference.odt to the data directory.
* Removed reference.docx and reference.odt from data directory.
* We now build the reference archives from their ingredient pieces
in the docx and odt writers, instead of having a reference.docx
or reference.odt intermediary.
This should fix #2187.
It also simplifies the bulid procedure.
The one thing users may notice is different is that you can
no longer get the reference.docx or reference.odt using
`--print-default-data-file`. Instead, simply generate a
docx or odt using pandoc with a blank or minimal input,
and use that (or a customized version) with `--reference-docx`
or `--reference-odt`.
|
|
Closes #1834.
|
|
This will give us better error reporting options.
This is part of a fix for #1834.
|
|
|
|
|
|
|
|
Docx Writer/Reference: Add keepNext to objects w/ captions
|
|
Docx Writer: Copy hyphenation settings from reference.docx
|
|
Docx Writer: support for --toc option
|
|
Fixes #1992
|
|
|
|
|
|
Creates a "dirty" TOC at the beginning of document, before abstract
|
|
Figures with empty captions use style "Figure"
Figures with nonempty captions use style "Figure with Caption", which is
based on "Figure", and additionally has keepNext set.
|
|
|
|
|
|
|
|
|
|
|
|
* Author
* Abstract
* Compact
* ImageCaption
* TableCaption
* DefinitionTerm
* Definition
* FirstParagraph
|
|
|
|
|
|
|
|
|
|
This patch attempts to build a style name -> style id mapping based on styles.xml from reference doc, and changes pStyle and rStyle to accept style name as a parameter instead of styleId. There is a fallback mechanic that removes spaces from style name and returns it as style id, but it likely won't help much.
Style names are matched lower-case, since headings and `footnote text` have lowercase names.
|
|
Word uses, by default, footnotes with id -1 and 0 for separators. If a
user modifies reference.docx, they will end up with a settings.xml file
that references these footnotes, but no such footnotes in the
document. This will produce a corruption error. Here we add these to the
document and settings.xml file, so future modifications won't break the file.
|
|
We apply a "BodyText" style to all unstyled paragraphs. This is,
essentially, the same as "Normal" up until now -- except that since not
everything inherits from "BodyText" (the metadata won't, for example, or
the headers or footnote numbers) we can change the text in the body
without having to make exceptions for everything.
This will still inherit from Normal, so if we want to
change *everything*, we can do it through "Normal".
|
|
Before we had used `FirstParagraph` style after Headings, BlockQuotes,
and other blocks a user might not want an indentation after. We hadn't
actually used it for the first paragraph -- i.e. the opening of the
body. This makes sure the first body paragraph gets that style.
|
|
Following the odt writer, we make the first text paragraph following an
image, blockquote, table, or heading into a "FirstParagraph" style. This
allows it to be styled differently, if the user wishes. The default is
for it to be the same as "Normal"
|
|
|