summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/PDF.hs
Commit message (Collapse)AuthorAge
* hlint suggestions.John MacFarlane2017-10-27
|
* hlint changes.John MacFarlane2017-10-27
|
* Automatic reformating by stylish-haskell.John MacFarlane2017-10-27
|
* makePDF: add argument for pdf options, remove writerPdfArgs.John MacFarlane2017-10-26
| | | | | - Removed writerPdfArgs from WriterOptions (API change). - Added parameter for pdf args to makePDF.
* Removed Verbosity and MediaBag params from makePDF.John MacFarlane2017-09-30
| | | | | They can be obtained from CommonState since we're in PandocIO.
* Removed writerSourceURL, add source URL to common state.John MacFarlane2017-09-30
| | | | | | | | | | | | | | | | | | 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`.
* Support for PDF generation via `weasyprint` and `prince` (#3909)Mauro Bieg2017-09-11
| | | | | | | * Rename --latex-engine to --pdf-engine * In `Text.Pandoc.Options.WriterOptions`, rename `writerLaTeXEngine` to `writerPdfEngine` and `writerLaTeXArgs` to `writerPdfArgs`. * Add support for `weasyprint` and `prince`, in addition to `wkhtmltopdf`, for PDF generation via HTML (closes #3906). * `Text.Pandoc.PDF.html2pdf`: use stdin instead of intermediate HTML file
* Fix import in PDF.John MacFarlane2017-08-16
|
* Remove initial check for pdf creating program.John MacFarlane2017-08-15
| | | | | | | | | | | | | | Instead, just try running it and raise the exception if it isn't found at that point. This improves things for users of Cygwin on Windows, where the executable won't be found by `findExecutable` unless `.exe` is added. The same exception is raised as before, but at a later point. Closes #3819.
* Support svg in PDF output, converting with rsvg2pdf.John MacFarlane2017-08-09
| | | | Closes #1793.
* In producing PDFs, warn if the font is missing some characters.John MacFarlane2017-06-18
| | | | | | | | * Added `MissingCharacter` to `LogMessage` in Text.Pandoc.Logging. * Parse the (xe)latex log for missing character warnings and issue the warning. Closes #3742.
* Switched Writer types to use Text.John MacFarlane2017-06-11
| | | | | | | | | | | * 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.
* PDF: Got --resource-path working with pdf output.John MacFarlane2017-05-20
| | | | See #852.
* PDF: better error message for non-converted svg images.John MacFarlane2017-05-20
|
* PDF: Refactoring, makePDF is now in PandocIO [API change].John MacFarlane2017-05-20
|
* Update dates in copyright noticesAlbert Krewinkel2017-05-13
| | | | | This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
* Rename fillMedia -> fillMediaBag.John MacFarlane2017-05-07
|
* PDF: use fillMedia and extractMedia to extract media to tmp dir.John MacFarlane2017-05-07
| | | | | This reduces code duplication. We should be able to do something similar in ODT, Docx, EPUB writers.
* PDF: when running pdfroff, don't do second pass to relocate toc.John MacFarlane2017-03-26
|
* Ms writer: Implement header identifiers and internal links.John MacFarlane2017-03-25
|
* PDF via groff ms: use -t and -KUTF-8 options to pdfroff.John MacFarlane2017-03-24
|
* Allow creation of pdf via groff ms and pdfroff.John MacFarlane2017-03-23
| | | | pandoc -t ms -o output.pdf input.txt
* Stylish-haskell automatic formatting changes.John MacFarlane2017-03-04
|
* Fetch images when generating PDF via context.John MacFarlane2017-02-25
| | | | | | | | To do this, we create the temp directory as a subdirectory of the working directory. Since context mk IV by default looks for images in the parent directory, this works. Closes #3380.
* Removed unnecessary import.John MacFarlane2017-02-24
|
* Removed useless TEXINPUTS stuff for context2pdf.John MacFarlane2017-02-24
| | | | mkiv context doesn't use TEXINPUTS.
* Shared: remove 'warn'.John MacFarlane2017-02-24
| | | | | PDF writer: Use 'report' instead of 'warn', make it sensitive to verbosity settings.
* PDF: make sure that verbosity is respected when we fetch items.John MacFarlane2017-02-23
|
* Added Text.Pandoc.Logging (exported module).John MacFarlane2017-02-10
| | | | | | | | | | | | This now contains the Verbosity definition previously in Options, as well as a new LogMessage datatype that will eventually be used instead of raw strings for warnings. This will enable us, among other things, to provide machine-readable warnings if desired. See #3392.
* Removed readerVerbosity and writerVerbosity.John MacFarlane2017-01-25
| | | | | | API change. Also added a verbosity parameter to makePDF.
* Changes to verbosity in writer and reader options.John MacFarlane2017-01-25
| | | | | | | | | | | | | | API changes: Text.Pandoc.Options: * Added Verbosity. * Added writerVerbosity. * Added readerVerbosity. * Removed writerVerbose. * Removed readerTrace. pandoc CLI: The `--trace` option sets verbosity to DEBUG; the `--quiet` option sets it to ERROR, and the `--verbose` option sets it to INFO. The default is WARNING.
* Removed writerMediaBag from WriterOpts.John MacFarlane2017-01-25
| | | | | | ...since this is now handled through PandocMonad. Added an explicit MediaBag parameter to makePDF and makeSelfContained.
* 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.
* PDF: put makePDF in MonadIO.John MacFarlane2017-01-25
|
* Process.pipeProcess: stream stderr rather than capturing.John MacFarlane2017-01-25
| | | | | | | | | | | Signature of pipeProcess has changed: the return value is now IO (ExitCode, ByteString) -- with only stdout. Stderr is just inherited from the parent. This means that stderr from filters will now be streamed as the filters are run. Closes #2729.
* 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.
* Remove Compat.MonoidJesse Rosenthal2016-09-02
| | | | | This was only necessary for GHC versions with base below 4.5 (i.e., ghc < 7.4).
* PDF: Don't crash with nonexistent image.John MacFarlane2016-09-02
| | | | | | | | | | Instead, emit the alt text, emphasized. This accords with what the ODT writer currently does. The user will still get a warning about a nonexistent image, but will no longer get a LaTeX crash. Closes #3100.
* Updated copyright dates to include 2016.John MacFarlane2016-03-22
|
* Fixed v1.16 reversion with --latex-engine.John MacFarlane2016-01-04
| | | | | In 1.16 --latex-engine raises an error if a full path is given. This commit fixes this reversion. Closes #2618.
* Improved treatment of margins in wkhtmltopdf.John MacFarlane2015-12-21
|
* Allow setting margins from metadata variables for wkhtmltopdf.John MacFarlane2015-12-21
| | | | | | Variables margin-top, margin-bottom, margin-left, margin-right. Setting them with css inside @page doesn't seem to work, at least with the released wkhtmltopdf.
* pdf via wkhtmltopdf: take `title` and `page-size` from metadata.John MacFarlane2015-12-21
| | | | | Adjusted default `page-size` to `letter`, to match current LaTeX template.
* Added preliminary support for PDF creation via wkhtmltopdf.John MacFarlane2015-12-21
| | | | | | | | To use this: pandoc -t html5 -o result.pdf (and add `--mathjax` if you have math.)
* hlint fixesJohn MacFarlane2015-11-22
|
* Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane2015-11-19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * PDF: Modified for new image size attributes parameter.John MacFarlane2015-08-05
| | | | | | | | (mb21)
* | Restored Text.Pandoc.Compat.Monoid.John MacFarlane2015-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane2015-11-09
| | | | | | | | This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
* | Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane2015-11-08
| | | | | | | | | | | | | | This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.