aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Docx.hs
AgeCommit message (Collapse)AuthorFilesLines
2015-05-28Better fix for #2187.John MacFarlane1-11/+36
* 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`.
2015-05-09Improved warnings when image size can't be determined.John MacFarlane1-2/+5
Closes #1834.
2015-05-09ImageSize: make imageSize return an Either, not a Maybe.John MacFarlane1-2/+4
This will give us better error reporting options. This is part of a fix for #1834.
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2015-04-14Docx Writer: Take TOC title from toc-title metadata fieldNikolay Yakimov1-1/+15
2015-04-01Added "noProof" to docx syntax highlighting SourceCode style.John MacFarlane1-0/+1
2015-03-30Merge pull request #2035 from lierdakil/issue2031John MacFarlane1-0/+5
Docx Writer/Reference: Add keepNext to objects w/ captions
2015-03-29Merge pull request #2038 from lierdakil/docx-hyphen-settingsJohn MacFarlane1-3/+26
Docx Writer: Copy hyphenation settings from reference.docx
2015-03-29Merge pull request #2037 from lierdakil/issue458John MacFarlane1-1/+29
Docx Writer: support for --toc option
2015-03-29Docx Writer: Filter out illegal XML charactersMatthew Pickering1-2/+19
Fixes #1992
2015-03-29Docx Writer: Place toc after abstract, rather than beforeNikolay Yakimov1-1/+1
2015-03-29Docx Writer: Copy hyphenation settings from reference.docxNikolay Yakimov1-3/+26
2015-03-29Docx Writer: Initial support for --toc option (issue #458)Nikolay Yakimov1-1/+29
Creates a "dirty" TOC at the beginning of document, before abstract
2015-03-29Docx Writer: Add a style to figure imagesNikolay Yakimov1-0/+5
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.
2015-03-08Docx Writer: set firstRow information in tablesNikolay Yakimov1-2/+7
2015-03-03Code cleanupNikolay Yakimov1-14/+10
2015-03-01Started moving StyleMap out of writer codeNikolay Yakimov1-46/+25
2015-03-01Update Docx writer for 1cb601d reference.docxNikolay Yakimov1-13/+14
2015-02-24Comment out unused functions to make CI happyNikolay Yakimov1-8/+8
2015-02-24Treat some ambiguous styles as custom for nowNikolay Yakimov1-11/+10
* Author * Abstract * Compact * ImageCaption * TableCaption * DefinitionTerm * Definition * FirstParagraph
2015-02-23Do not lookup custom stylesNikolay Yakimov1-9/+13
2015-02-23Also skip SourceCode style if existsNikolay Yakimov1-9/+12
2015-02-22If --no-highlight is set, remove *Tok styles.Nikolay Yakimov1-2/+10
2015-02-22Prototype fix for #1872Nikolay Yakimov1-4/+7
2015-02-21Initial stab at more involved fix for #1607Nikolay Yakimov1-64/+86
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.
2015-02-12Docx writer: Add footnotes id -1 and 0.Jesse Rosenthal1-1/+17
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.
2015-02-11Docx Writer: Add "BodyText" StyleJesse Rosenthal1-9/+11
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".
2015-02-10Docx Writer: Use FirstParagraph style at beginning.Jesse Rosenthal1-1/+1
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.
2015-02-09Docx Writer: Implement FirstParagraph StyleJesse Rosenthal1-15/+39
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"
2014-12-19Added Text.Pandoc.Compat.Locale to assist with transition to time 1.5.John MacFarlane1-3/+3
2014-12-08Fix for #1641 (docx table captions above tables)Nikolay Yakimov1-2/+3
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.
2014-10-24Docx Writer: Partial fix for #1607Nikolay Yakimov1-7/+35
International heading styles are inferred based on `<w:name val="heading #">` fallback, if there are no en-US "Heading#" styles
2014-10-21DOCX writer: Look in user data dir for archive reference.docx.John MacFarlane1-1/+1
2014-10-05Getting the page width from the reference fileGrégory Bataille1-17/+36
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
2014-09-11Docx writer: Renumber header and footer relationships to avoid collisions.Jesse Rosenthal1-12/+56
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.
2014-08-30Merge branch 'mime' of https://github.com/Aelve/John into Aelve-mimeJohn MacFarlane1-8/+8
Conflicts: src/Text/Pandoc/Writers/Docx.hs
2014-08-26Docx writer: Accomodate GHC 7.4 (no lookupEnv)Jesse Rosenthal1-1/+1
2014-08-25Docx writer: Default to user login and time of change if not given.Jesse Rosenthal1-6/+21
2014-08-25Docx writer: Implement track changes.Jesse Rosenthal1-9/+40
These have default authors and dates of "unknown" and timestamp-zero, respectively.
2014-08-24Hlint changes to Docx writer.John MacFarlane1-22/+19
2014-08-23Docx writer: Bibliography entries get Bibliography style.John MacFarlane1-2/+6
Closes #1559.
2014-08-17Merge pull request #1536 from considerate/masterJohn MacFarlane1-0/+3
Add row width to tables in Docx XML
2014-08-17Docx writer: Fixed regression, bungled list numbering.John MacFarlane1-3/+10
In pandoc 1.13, all lists come out as basic ordered lists. This fixes that bad regression. Closes #1544.
2014-08-17MIME cleanup.Artyom Kazak1-8/+8
* Create a type synonym for MIME type (instead of `String`). * Add `getMimeTypeDef` function. * Avoid recreating MIME type `Map`s every time. * Move “Formula-...” case handling into `getMimeType`.
2014-08-17Simplify row width calculation.Viktor Kronvall1-2/+2
2014-08-17Include row width in table rows.Christoffer Ackelman1-0/+3
Added a property to all table rows where the sum of column widths is specified in pct (fraction of 5000).
2014-08-11Merge pull request #1365 from gbataille/docx-marginJohn MacFarlane1-1/+9
Scale images to fit the page for DOCX
2014-08-04Use texmath 0.7 interface.John MacFarlane1-2/+2
2014-07-30PDF, Docx, EPUB, and ODT writers now automatically use MediaBag.John MacFarlane1-1/+2
The MediaBag is thread through from the reader, with no need to extract to files.
2014-07-29Docx writer: Print subtitle from metadata if present.John MacFarlane1-3/+9
Use Subtitle style. See #1451.