aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/RTF.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2019-01-04RTF writer: use toTableOfContents from T.P.W.Shared.John MacFarlane1-17/+2
2018-11-22RTF writer: fix warnings for skipped raw inlines.John MacFarlane1-1/+1
2018-09-24RTF writer: Fix build failure with ghc-8.6.1 caused by missing MonadFail ↵Jonas Scholl1-2/+4
instance.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-01-19hlint code improvements.John MacFarlane1-4/+4
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-11-01hlintAlexander Krotov1-1/+1
2017-10-29hlint suggestions.John MacFarlane1-28/+27
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane1-1/+1
2017-09-30Removed writerSourceURL, add source URL to common state.John MacFarlane1-1/+1
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`.
2017-06-26Use `table-of-contents` for contents of toc, make `toc` a boolean.John MacFarlane1-1/+5
Changed markdown, rtf, and HTML-based templates accordingly. This allows you to set `toc: true` in the metadata; this previously produced strange results in some output formats. Closes #2872. For backwards compatibility, `toc` is still set to the toc contents. But it is recommended that you update templates to use `table-of-contents` for the toc contents and `toc` for a boolean flag.
2017-06-20Writers: adjusted for renderTemplate' changes.John MacFarlane1-3/+4
Now we raise a proper error on template failure.
2017-06-11Switched Writer types to use Text.John MacFarlane1-2/+5
* XML.toEntities: changed type to Text -> Text. * Shared.tabFilter -- fixed so it strips out CRs as before. * Modified writers to take Text. * Updated tests, benchmarks, trypandoc. [API change] Closes #3731.
2017-05-13Update dates in copyright noticesAlbert Krewinkel1-2/+2
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-05-02Added PandocResourceNotFound error.John MacFarlane1-4/+1
Use this instead of PandocIOError when a resource is not found in path. This improves the error message in this case, see #3629.
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-18/+18
2017-02-24Use catchError instead of runExceptT.John MacFarlane1-38/+45
2017-02-22imageSize interface changemb211-1/+1
`imageSize img` is now `imageSize opts img`
2017-02-17Added warnings for non-rendered blocks to some writers.John MacFarlane1-4/+8
2017-02-11Use new warnings throughout the code base.John MacFarlane1-8/+7
2017-01-25Revert "Added page breaks into Pandoc."John MacFarlane1-1/+0
This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
2017-01-25Text.Pandoc.Shared: Removed fetchItem, fetchItem'.John MacFarlane1-3/+4
Made changes where these are used, so that the version of fetchItem from PandocMonad can be used instead.
2017-01-25Class: rename addWarning[WithPos] to warning[WithPos].John MacFarlane1-6/+6
There's already a function addWarning in Parsing! Maybe we can dispense with that now, but I still like 'warning' better as a name.
2017-01-25Class: Renamed 'warn' to 'addWarning' and consolidated RTF writer.John MacFarlane1-15/+19
* Renaming Text.Pandoc.Class.warn to addWarning avoids conflict with Text.Pandoc.Shared.warn. * Removed writeRTFWithEmbeddedImages from Text.Pandoc.Writers.RTF. This is no longer needed; we automatically handle embedded images using the PandocM functions. [API change]
2017-01-25Refactored math conversion in writers.John MacFarlane1-112/+147
* Remove exported module `Text.Pandoc.Readers.TeXMath` * Add exported module `Text.Pandoc.Writers.Math` * The function `texMathToInlines` now lives in `Text.Pandoc.Writers.Math` * Export helper function `convertMath` from `Text.Pandoc.Writers.Math` * Use these functions in all writers that do math conversion. This ensures that warnings will always be issued for failed math conversions.
2017-01-25Unify Errors.Jesse Rosenthal1-1/+2
2017-01-25Implement Errors in PandocMonadJesse Rosenthal1-5/+6
Errors can be thrown purely with `throwError`. At the moment there are only three kinds of errors: 1. PandocFileReadError FilePath (for problems reading a file from the filesystem) 2. PandocShouldNeverHappenError String (for stuff that should never happen but we need to pattern-match anyway) 3. PandocSomeError String (a grab bag of everything else) Of course, we need to subdivide the third item in this list.
2017-01-25Convert writers to use PandocMonad typeclass.Jesse Rosenthal1-9/+4
Instead of Free Monad with runIO
2017-01-25Make pure rtf writer using free.Jesse Rosenthal1-4/+13
2017-01-25Adds support for pagebreaks (when it makes sense)Hubert Plociniczak1-1/+2
Update all writers to take into account page breaks. A straightforwad, far from complete, implementation of page breaks in selected writers. Readers will have to follow in the future as well.
2016-11-30Options: Removed writerStandalone, made writerTemplate a Maybe.John MacFarlane1-5/+5
Previously setting writerStandalone = True did nothing unless a template was provided in writerTemplate. Now a fragment will be generated if writerTemplate is Nothing; otherwise, the specified template will be used and standalone output generated. [API change]
2016-10-13Add support for the LineBlock element to writersAlbert Krewinkel1-0/+2
The following markup features are used to output the lines of the `LineBlock` element: - AsciiDoc: a `[verse]` block, - ConTeXt: text surrounded by `\startlines` and `\endlines`, - HTML: `div` with an per-element style setting to interpret the content as pre-wrapped, - Markdown: line blocks if the `line_blocks` extension is enabled, a simple paragraph with hard linebreaks otherwise, - Org: VERSE block, - RST: a line block, and - all other formats: a paragraph, containing hard linebreaks between lines. Custom lua writers should be updated to use the `LineBlock` element.
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane1-0/+1
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.
2015-08-07Updated readers, writers and README for link attributemb211-1/+1
2015-08-07Updated readers and writers for new image attribute parameter.John MacFarlane1-6/+6
(mb21)
2015-05-09Improved warnings when image size can't be determined.John MacFarlane1-1/+4
Closes #1834.
2015-05-09ImageSize: make imageSize return an Either, not a Maybe.John MacFarlane1-3/+3
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
2014-12-15Text.Pandoc.Writers.RTF: Add blankline at end of outputMatthew Pickering1-1/+3
Closes #1732
2014-07-30RTF writer: Improved image embedding.John MacFarlane1-1/+12
Use calculated sizes.
2014-07-30RTF writer: refactored image embedding, using fetchItem'.John MacFarlane1-26/+21
2014-07-19Renamed readTeXMath' to avoid name conflict with texmath 0.6.7Matthew Pickering1-1/+1
Also removed deprecated readTeXMath.
2014-07-13RTF writer: Avoid extra paragraph tags in metadata.John MacFarlane1-2/+10
Closes #1421.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2014-03-24RTF writer: Fixed tables cells containing paragraphs.John MacFarlane1-1/+1
This moves \intbl after \pard.
2013-11-01TexMath: Export readTeXMath', which attends to display/inline.John MacFarlane1-1/+1
Deprecate readTeXMath, and use readTeXMath' in all the writers. Require texmath >= 0.6.5.
2013-10-16Use isURI instead of isAbsoluteURI.John MacFarlane1-2/+2
It allows fragments identifiers.
2013-08-10Use walk, walkM in place of bottomUp, bottomUpM when possible.John MacFarlane1-2/+2
They are significantly faster.