summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/PDF.hs
Commit message (Collapse)AuthorAge
* 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.
* | Allow use of ConTeXt to generate PDFs.John MacFarlane2015-10-20
| | | | | | | | | | | | | | | | pandoc my.md -t context -o my.pdf will now create a PDF using ConTeXt rather than LaTeX. Closes #2463.
* | Use custom Prelude to avoid compiler warnings.John MacFarlane2015-10-14
|/ | | | | | | | | | | | | - 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.
* PDF: Make sure `--latex-engine-opt` goes before the filename...John MacFarlane2015-07-08
| | | | | | | | on the command line. LaTeX needs the argument to come after the options. Closes #1779 - again! Thanks to squisher for pointing out the problem.
* PDF writer: Print temp dir on `--verbose`.John MacFarlane2015-05-20
| | | | This might help diagnose #777.
* Updated copyright notices to -2015. Closes #2111.John MacFarlane2015-04-26
|
* Fixed warning.John MacFarlane2015-04-12
|
* Text.Pandoc.PDF: more comprehensible errors on image conversion.John MacFarlane2015-04-12
| | | | | | | | | | | | | 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.
* Fix issue #969, #1779 by providing --latex-engine-optSumit Sahrawat2015-03-04
|
* don't log Try xelatex if xelatex already in use, closes #1832mb212015-01-11
|
* Added `--verbose` flag for debugging output in PDF production.John MacFarlane2014-12-26
| | | | | Closes #1840. Closes #1653.
* PDF: Catch errors in conversion of images and display message.John MacFarlane2014-08-30
| | | | See #1582.
* PDF Writer: Attempts to convert images to pdf renderable formatsMatthew Pickering2014-08-13
| | | | | | | Now depends on the JuicyPixels library. Will attempt to convert an image (gif, tiff, bmp) to png when converting to pdf.
* PDF, Docx, EPUB, and ODT writers now automatically use MediaBag.John MacFarlane2014-07-30
| | | | | The MediaBag is thread through from the reader, with no need to extract to files.
* Moved withTempDir from PDF to Shared, export from Shared.John MacFarlane2014-07-30
| | | | API change.
* PDF writer: Fixed treatment of data uris for images.John MacFarlane2014-05-28
| | | | Closes #1062.
* Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
|
* Text.Pandoc.PDF: Ensure that temp directories deleted on Windows.John MacFarlane2014-04-05
| | | | | | The PDF is now read as a strict bytestring, ensuring that process ownership will be terminated, so the temp directory can be deleted. Closes #1192.
* PDF: Changes to error reporting, to handle non-UTF8 error output.John MacFarlane2014-03-19
|
* PDF: Use / as path separators in latex input onlyTim Lin2014-03-10
| | | | | | | | | | | | Fixes compile error on Windows for 5040f3e Reverted back to canonical file separators </> in all places except for arguments to the LaTeX builder and in TEXINPUTS See #1151. Note: Temporary directories still fail to be removed in Windows due to call of ByteString.Lazy.readFile creating process ownership of the compiled pdf file.
* PDF: Use / as path separators in tempdir on Windows.John MacFarlane2014-03-10
| | | | | | | | | This is needed for texlive. Note that the / is used only in the body of withTempDir, so when the directory is deleted, the original separators will be used. See #1151.
* PDF: Use / as path separators even on Windows.John MacFarlane2014-03-09
| | | | | This seems to be necessary for texlive. Closes #1151 (again!).
* PDF: Use ; for TEXINPUTS separator on Windows.John MacFarlane2014-02-23
| | | | Closes #1151, I hope. Testing needed.
* HLint: use fromMaybeHenry de Valence2013-12-19
| | | | Replace uses of `maybe x id` with `fromMaybe x`.
* PDF: Minor code cleanup.John MacFarlane2013-10-17
|
* PDF: Add suggestion to use --latex-engine=xelatex on encoding error.John MacFarlane2013-08-11
|
* Options: Changed `writerSourceDir` to `writerSourceURL` (now a Maybe).John MacFarlane2013-08-11
| | | | | | | | | | | | | | | | | | | | | | | Previously we used to store the directory of the first input file, even if it was local, and used this as a base directory for finding images in ODT, EPUB, Docx, and PDF. This has been confusing to many users. It seems better to look for images relative to the current working directory, even if the first file argument is in another directory. writerSourceURL is set to 'Just url' when the first command-line argument is an absolute URL. (So, relative links will be resolved in relation to the first page.) Otherwise, 'Nothing'. The ODT, EPUB, Docx, and PDF writers have been modified accordingly. Note that this change may break some existing workflows. If you have been assuming that relative links will be interpreted relative to the directory of the first file argument, you'll need to make that the current directory before running pandoc. Closes #942.
* Use walk, walkM in place of bottomUp, bottomUpM when possible.John MacFarlane2013-08-10
| | | | They are significantly faster.
* Use pipeProcess in Text.Pandoc.PDF.John MacFarlane2013-08-08
|
* PDF generation improvements.John MacFarlane2013-07-20
| | | | | | | | | | | * `Text.Pandoc.PDF` exports `makePDF` instead of `tex2pdf`. (API change.) * `makePDF` walks the pandoc AST and checks for the existence of images in the local directory. If they are not found, it attempts to find them, either in the directory containing the first source file, or at an absolute URL, or at a URL relative to the base URL of the first command line argument. * Closes #917.
* Text.Pandoc.PDF: put temporary output directory in TEXINPUTS.John MacFarlane2013-07-18
| | | | | This will help later when we try to download external resources. We can put them in the temp directory. See #917.
* PDF: On Windows, create temdir in working directory.John MacFarlane2013-04-26
| | | | | | | | Reason: the path to the system temp directory may contain tildes, which causes problems in LaTeX when the username is more than eight characters. Closes #777.
* PDF: Run latex at least two times.John MacFarlane2012-03-19
| | | | | This ensures that the PDFs will have hyperlinked bookmarks (PDF table of contents that can be displayed in the sidebar).
* PDF: run latex 3 times if --toc specified.John MacFarlane2012-02-19
| | | | Closes #424.
* PDF: Only run latex twice if \tableofcontents is present.John MacFarlane2012-02-07
| | | | | | Note: This will pick up on \tableofcontents even if it's in a verbatim environment. But the worst that can happen is that the document takes a bit longer to build.
* Text.Pandoc.PDF: Simplified tex2pdf.John MacFarlane2012-02-06
| | | | | | | | We no longer try to parse the log file to determine whether latex needs to be rerun. Instead, we run latex twice -- which should be enough for table of contents and hyperrefs. Closes #402.
* pandoc: Better error checking.John MacFarlane2012-01-21
|
* PDF: Use string instead of special TeXProgram type.John MacFarlane2012-01-20
|
* PDF: Better error message.John MacFarlane2012-01-20
|