aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/PDF.hs
AgeCommit message (Collapse)Author
2017-06-18In producing PDFs, warn if the font is missing some characters.John MacFarlane
* Added `MissingCharacter` to `LogMessage` in Text.Pandoc.Logging. * Parse the (xe)latex log for missing character warnings and issue the warning. Closes #3742.
2017-06-11Switched Writer types to use Text.John MacFarlane
* 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-20PDF: Got --resource-path working with pdf output.John MacFarlane
See #852.
2017-05-20PDF: better error message for non-converted svg images.John MacFarlane
2017-05-20PDF: Refactoring, makePDF is now in PandocIO [API change].John MacFarlane
2017-05-13Update dates in copyright noticesAlbert Krewinkel
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-07Rename fillMedia -> fillMediaBag.John MacFarlane
2017-05-07PDF: use fillMedia and extractMedia to extract media to tmp dir.John MacFarlane
This reduces code duplication. We should be able to do something similar in ODT, Docx, EPUB writers.
2017-03-26PDF: when running pdfroff, don't do second pass to relocate toc.John MacFarlane
2017-03-25Ms writer: Implement header identifiers and internal links.John MacFarlane
2017-03-24PDF via groff ms: use -t and -KUTF-8 options to pdfroff.John MacFarlane
2017-03-23Allow creation of pdf via groff ms and pdfroff.John MacFarlane
pandoc -t ms -o output.pdf input.txt
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane
2017-02-25Fetch images when generating PDF via context.John MacFarlane
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.
2017-02-24Removed unnecessary import.John MacFarlane
2017-02-24Removed useless TEXINPUTS stuff for context2pdf.John MacFarlane
mkiv context doesn't use TEXINPUTS.
2017-02-24Shared: remove 'warn'.John MacFarlane
PDF writer: Use 'report' instead of 'warn', make it sensitive to verbosity settings.
2017-02-23PDF: make sure that verbosity is respected when we fetch items.John MacFarlane
2017-02-10Added Text.Pandoc.Logging (exported module).John MacFarlane
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.
2017-01-25Removed readerVerbosity and writerVerbosity.John MacFarlane
API change. Also added a verbosity parameter to makePDF.
2017-01-25Changes to verbosity in writer and reader options.John MacFarlane
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.
2017-01-25Removed writerMediaBag from WriterOpts.John MacFarlane
...since this is now handled through PandocMonad. Added an explicit MediaBag parameter to makePDF and makeSelfContained.
2017-01-25Text.Pandoc.Shared: Removed fetchItem, fetchItem'.John MacFarlane
Made changes where these are used, so that the version of fetchItem from PandocMonad can be used instead.
2017-01-25PDF: put makePDF in MonadIO.John MacFarlane
2017-01-25Process.pipeProcess: stream stderr rather than capturing.John MacFarlane
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.
2017-01-25Convert all writers to use PandocMonad.Jesse Rosenthal
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.
2016-09-02Remove Compat.MonoidJesse Rosenthal
This was only necessary for GHC versions with base below 4.5 (i.e., ghc < 7.4).
2016-09-02PDF: Don't crash with nonexistent image.John MacFarlane
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.
2016-03-22Updated copyright dates to include 2016.1.17.0.2John MacFarlane
2016-01-04Fixed v1.16 reversion with --latex-engine.John MacFarlane
In 1.16 --latex-engine raises an error if a full path is given. This commit fixes this reversion. Closes #2618.
2015-12-21Improved treatment of margins in wkhtmltopdf.John MacFarlane
2015-12-21Allow setting margins from metadata variables for wkhtmltopdf.John MacFarlane
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.
2015-12-21pdf via wkhtmltopdf: take `title` and `page-size` from metadata.John MacFarlane
Adjusted default `page-size` to `letter`, to match current LaTeX template.
2015-12-21Added preliminary support for PDF creation via wkhtmltopdf.John MacFarlane
To use this: pandoc -t html5 -o result.pdf (and add `--mathjax` if you have math.)
2015-11-22hlint fixesJohn MacFarlane
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane
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.
2015-11-09Restored Text.Pandoc.Compat.Monoid.John MacFarlane
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.
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-10-20Allow use of ConTeXt to generate PDFs.John MacFarlane
pandoc my.md -t context -o my.pdf will now create a PDF using ConTeXt rather than LaTeX. Closes #2463.
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane
- 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.
2015-08-05PDF: Modified for new image size attributes parameter.John MacFarlane
(mb21)
2015-07-08PDF: Make sure `--latex-engine-opt` goes before the filename...John MacFarlane
on the command line. LaTeX needs the argument to come after the options. Closes #1779 - again! Thanks to squisher for pointing out the problem.
2015-05-20PDF writer: Print temp dir on `--verbose`.John MacFarlane
This might help diagnose #777.
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane
2015-04-12Fixed warning.John MacFarlane
2015-04-12Text.Pandoc.PDF: more comprehensible errors on image conversion.John MacFarlane
Closes #2067. EPS can't be supported without shelling out to something like ImageMagick, but at least we can avoid mysterious error messages. We now get: pandoc: Unable to convert `circle.eps' for use with pdflatex. ! Package pdftex.def Error: File `circle-eps-converted-to.pdf' not found. which seems more straightforward.
2015-03-04Fix issue #969, #1779 by providing --latex-engine-optSumit Sahrawat
2015-01-11don't log Try xelatex if xelatex already in use, closes #1832mb21
2014-12-26Added `--verbose` flag for debugging output in PDF production.John MacFarlane
Closes #1840. Closes #1653.