Age | Commit message (Collapse) | Author | Files | Lines |
|
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"
|
|
|
|
Word doesn't really treat table captions as something special. It's just a paragraph with special style, nothing more, so simple reversal of output order in writer works fine.
|
|
International heading styles are inferred based on `<w:name val="heading #">` fallback, if there are no en-US "Heading#" styles
|
|
|
|
Uses it to scale images that are too large.
When there is no reference files, default to a US letter portrait size
to scale the images
|
|
We previously took the old relationship names of the headers and footer in
secptr. That led to collisions. We now make a map of availabl names in the
relationships file, and then rename in secptr.
|
|
Conflicts:
src/Text/Pandoc/Writers/Docx.hs
|
|
|
|
|