summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
Commit message (Collapse)AuthorAge
* Org writer: reduce to two spaces after bulletsAlbert Krewinkel2017-02-04
| | | | | | | | The org writer was inserting two spaces after list bullets. Emacs Org-mode defaults to a single space, so behavior is changed to reflect this. Closes: #3417
* Markdown writer: Better escaping when +smart.John MacFarlane2017-02-04
|
* Implemented +/-smart in rst writer.John MacFarlane2017-02-04
| | | | Moved unsmartify to Writers.Shared.
* HTML and DocBook writers: fix internal links with writerIdentifierPrefix opt ↵Mauro Bieg2017-02-03
| | | | | (#3398) closes #3397
* Org.hs: remove misleading commentAlexander Krotov2017-02-02
| | | This comment is likely copied from RST.hs where 'refs' variable indeed exists, but makes no sense here.
* Reduce state in Org writer (#3404)Alexander Krotov2017-02-01
|
* `--mathml` and MathML in HTMLMathMethod longer take an argument.John MacFarlane2017-01-30
| | | | | The argument was for a bridge javascript that used to be necessary in 2004. We have removed the script already.
* LaTeX writer: export writeBeamer.John MacFarlane2017-01-28
| | | | Removed writerBeamer from WriterOptions.
* HTML: export separate functions for slide formats.John MacFarlane2017-01-27
| | | | | | writeS5, writeSlideous, writeRevealJs, writeDZSlides, writeSlidy. Removed writerSlideVariant from WriterOptions.
* HTML writer: export writeHtmlStringForEPUB.John MacFarlane2017-01-27
| | | | Options: Remove writerEPUBVersion.
* Split writeDocbook into writeDocbook4, writeDocbook5.John MacFarlane2017-01-26
| | | | | | | Removed writerDocbookVersion in WriterOptions. Renamed default.docbook template to default.docbook4. Allow docbook4 as an output format. But alias docbook = docbook4.
* EPUB writer: split writeEPUB into writeEPUB2, writeEPUB3.John MacFarlane2017-01-26
| | | | Also include explicit epub2 output format in CLI tool.
* Provide explicit separate functions for HTML 4 and 5.John MacFarlane2017-01-25
| | | | | | | | | * Text.Pandoc.Writers.HTML: removed writeHtml, writeHtmlString, added writeHtml4, writeHtml4String, writeHtml5, writeHtml5String. * Removed writerHtml5 from WriterOptions. * Renamed default.html template to default.html4. * "html" now aliases to "html5"; to get the old HTML4 behavior, you must now specify "-t html4".
* Cleanups for rebase.John MacFarlane2017-01-25
|
* Removed writerHighlight; made writerHighlightStyle a Maybe.John MacFarlane2017-01-25
| | | | | | API change. For no highlighting, set writerHighlightStyle to Nothing.
* Revert "Added page breaks into Pandoc."John MacFarlane2017-01-25
| | | | This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
* Fixed shadowing warnings.John MacFarlane2017-01-25
|
* Removed writerIgnoreNotes.John MacFarlane2017-01-25
| | | | | | | | | Instead, just temporarily remove notes when generating TOC lists in HTML and Markdown (as we already did in LaTeX). Also export deNote from Text.Pandoc.Shared. API change in Shared and Options.WriterOptions.
* Removed writerTeXLigatures.John MacFarlane2017-01-25
| | | | | | Make `smart` extension work in LaTeX/ConTeXt writers instead. Instead of `-t latex --no-tex-ligatures`, do `-t latex-smart`.
* Make the `smart` extension affect the Markdown writer.John MacFarlane2017-01-25
| | | | | | | | | | | | | | Thus, to "unsmartify" something that has been parsed as smart by pandoc, you can use `-t markdown+smart`, and straight quotes will be produced instead of curly quotes, etc. Example: % pandoc -f latex -t markdown+smart ``hi''---ok ^D "hi"---ok
* Fixed something small that broke in rebase.John MacFarlane2017-01-25
|
* Text.Pandoc.Shared: Removed fetchItem, fetchItem'.John MacFarlane2017-01-25
| | | | | Made changes where these are used, so that the version of fetchItem from PandocMonad can be used instead.
* Removed `--normalize` option and normalization functions from Shared.John MacFarlane2017-01-25
| | | | | | | | | | | | | * Removed normalize, normalizeInlines, normalizeBlocks from Text.Pandoc.Shared. These shouldn't now be necessary, since normalization is handled automatically by the Builder monoid instance. * Remove `--normalize` command-line option. * Don't use normalize in tests. * A few revisions to readers so they work well without normalize.
* Class: Removed getDefaultReferenceDocx/ODT from PandocMonad.John MacFarlane2017-01-25
| | | | | We don't need these, since the default docx and odt can be retrieved using `readDataFile datadir "reference.docx"` (or odt).
* Class: removed 'fail' from PandocMonad.John MacFarlane2017-01-25
| | | | | | Do we need this? I don't see why. There's a name clash which would better be avoided.
* Simplified reference-docx/reference-odt to reference-doc.John MacFarlane2017-01-25
| | | | | | | | | | | | * Text.Pandoc.Options.WriterOptions: removed writerReferenceDocx and writerReferenceODT, replaced them with writerReferenceDoc. This can hold either an ODT or a Docx. In this way, writerReferenceDoc is like writerTemplate, which can hold templates of different formats. [API change] * Removed `--reference-docx` and `--reference-odt` options. * Added `--reference-doc` option.
* Remove now-unnecessary lifts in Markdown writer.John MacFarlane2017-01-25
| | | | Other writers still TBD.
* Class: rename addWarning[WithPos] to warning[WithPos].John MacFarlane2017-01-25
| | | | | | | There's already a function addWarning in Parsing! Maybe we can dispense with that now, but I still like 'warning' better as a name.
* Class: Renamed 'warn' to 'addWarning' and consolidated RTF writer.John MacFarlane2017-01-25
| | | | | | | | * 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]
* Make sure texMathToInlines issues warning.John MacFarlane2017-01-25
|
* Refactored math conversion in writers.John MacFarlane2017-01-25
| | | | | | | | | | | * 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.
* Fix rebasing errors.Jesse Rosenthal2017-01-25
|
* Unify Errors.Jesse Rosenthal2017-01-25
|
* Deleted whitespace at end of source lines.John MacFarlane2017-01-25
|
* Fixed regression in OPML writer.John MacFarlane2017-01-25
| | | | | OPML writer should note include `_notes` attribute when there's no content.
* Texinfo writer: restore former behavior for headers level > 4.John MacFarlane2017-01-25
| | | | | | | The recent changes made the writer fail with an error if it encountered a header with level 5. Better to do as we did before and just print a paragraph in that case. Eventually we should emit a warning here.
* Fixes to compile after rebase.John MacFarlane2017-01-25
|
* Implement Errors in PandocMonadJesse Rosenthal2017-01-25
| | | | | | | | | | | | | | | 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.
* Convert all writers to use PandocMonad.Jesse Rosenthal2017-01-25
| | | | | | | | | | | | | | | Since PandocMonad is an instance of MonadError, this will allow us, in a future commit, to change all invocations of `error` to `throwError`, which will be preferable for the pure versions. At the moment, we're disabling the lua custom writers (this is temporary). This requires changing the type of the Writer in Text.Pandoc. Right now, we run `runIOorExplode` in pandoc.hs, to make the conversion easier. We can switch it to the safer `runIO` in the future. Note that this required a change to Text.Pandoc.PDF as well. Since running an external program is necessarily IO, we can be clearer about using PandocIO.
* Convert writers to use PandocMonad typeclass.Jesse Rosenthal2017-01-25
| | | | Instead of Free Monad with runIO
* Free: Remove readFileUTF8.Jesse Rosenthal2017-01-25
| | | | This is just defined in term of a bytestring, so we convert when necessary.
* Remove readFileStrict.Jesse Rosenthal2017-01-25
| | | | We only used it once, and then immediately converted to lazy.
* Remove IO UUID functions.Jesse Rosenthal2017-01-25
|
* ODT Writer: fix compiler complaint.Jesse Rosenthal2017-01-25
|
* Finish pure writer of FB2.Jesse Rosenthal2017-01-25
|
* FB2 writer: Rewrite image-fetching to use fetchItem.Jesse Rosenthal2017-01-25
| | | | | This uses the function from shared, which will allow us to convert it over to the free monad.
* Continue refactoring FB2 writer.Jesse Rosenthal2017-01-25
|
* FB2 writer: bring functions to toplevel.Jesse Rosenthal2017-01-25
| | | | | | This is the first of a number of changes to bring the FB2 writer a bit closer to the idioms used elsewhere in pandoc, so it can be more easily converted to using the pure functions from Free.
* Make pure rtf writer using free.Jesse Rosenthal2017-01-25
|
* Implement runTest functions.Jesse Rosenthal2017-01-25
| | | | | These work with a State monad and a Reader monad to produce deterministic results. It can probably be simplified somewhat.