Commit graph

73 commits

Author SHA1 Message Date
John MacFarlane
c93d069d49 Add default abbreviations file (data/abbreviations).
This contains a list of strings that will be recognized by pandoc's
Markdown parser as abbreviations.  (A nonbreaking space will
be inserted after the period, preventing a sentence space in
formats like LaTeX.)

Users can override the default by putting a file abbreviations
in their user data directory (`~/.pandoc` on *nix).
2017-03-16 22:16:41 +01:00
John MacFarlane
2fe806e9ac Added --abbreviations=FILE option for custom abbreviations file. 2017-03-16 21:45:50 +01:00
John MacFarlane
896affd058 Re-enable support for custom lua writers.
Closes #3495.
2017-03-07 15:27:45 +01:00
John MacFarlane
e256c8ce17 Stylish-haskell automatic formatting changes. 2017-03-04 13:03:41 +01:00
John MacFarlane
17ce813060 hlint refactoring. 2017-03-04 12:02:16 +01:00
John MacFarlane
c7e2c718eb Removed --epub-stylesheet; use --css instead.
* Removed writerEpubStylesheet in WriterOptions.
* Removed `--epub-stylesheet` option.
* Allow `--css` to be used with epub.
* Allow multiple stylesheets to be used.
* Stylesheets will be taken both from `--css` and from
  the `stylesheet` metadata field (which can contain either
  a file path or a list of them).

Closes #3472, #847.
2017-02-27 21:29:16 +01:00
John MacFarlane
737d954a59 App: reverse optInputFiles so they come out in right order in templates. 2017-02-25 23:47:19 +01:00
Roland Hieber
699d289cc5 Add sourcefile and outputfile template variables (#3439)
Closes #3431.
2017-02-25 23:15:56 +01:00
John MacFarlane
3a1a50a45f Make --ascii work with DocBook output too. 2017-02-25 13:35:34 +01:00
John MacFarlane
e08e93e844 Use PandocIOError in Class. 2017-02-23 16:21:59 +01:00
John MacFarlane
2bbf98a613 Put makeSelfContained in PandocMonad instead of IO.
This removes the need to pass MediaBag around and improves
exceptions.  It also opens up the possibility of using
makeSelfContained purely.
2017-02-23 15:06:25 +01:00
John MacFarlane
172320ac66 Added Functor constraint to keep ghc 7.8.4 happy. 2017-02-20 16:34:33 +01:00
John MacFarlane
48c78713c8 Rename logMessagesToJSON -> encodeLogMessages. 2017-02-11 22:58:22 +01:00
John MacFarlane
92a5445aa1 Logging: export logMessagesToJSON.
Use a deterministic order for fields.
2017-02-11 20:13:33 +01:00
John MacFarlane
a6c649cfc8 Added --log option to save log messages in JSON format to a file.
See #3392.
2017-02-11 09:59:54 +01:00
John MacFarlane
76c55466d3 Use new warnings throughout the code base. 2017-02-11 00:14:44 +01:00
John MacFarlane
47a16065c4 Removed --parse-raw and readerParseRaw.
These were confusing.

Now we rely on the +raw_tex or +raw_html extension with latex
or html input.

Thus, instead of

    --parse-raw -f latex

we use

    -f latex+raw_tex

and instead of

     --parse-raw -f html

we use

    -f html+raw_html
2017-02-06 23:33:23 +01:00
John MacFarlane
c604371aa4 Fix import 2017-02-06 17:03:03 +01:00
John MacFarlane
4cdb1a0891 Changed year on copyright message. 2017-02-06 14:53:31 +01:00
John MacFarlane
37e579581a Consolidated file arguments into Opt. 2017-02-06 14:52:16 +01:00
John MacFarlane
67dc15771d Further refactoring of App.
Moved option parsing code into App.
pandoc.hs is now a 2-liner.
2017-02-06 14:46:48 +01:00
John MacFarlane
b4ccb70893 Fix an unneeded import warning. 2017-02-05 23:12:58 +01:00
John MacFarlane
0bbea0cc76 Split pandoc.hs into a module, Text.Pandoc.App, and a small program.
The App module provides a function that does a pandoc conversion,
based on option settings.  The program (pandoc.hs) now does nothing
more than parse options and pass them to this function, which can
easily be used by other applications (e.g. a GUI wrapper).

The Opt structure has been further simplified.

API changes:

* New exposed module Text.Pandoc.App
* Text.Pandoc.Highlighting has been exposed.
* highlightingStyles has been moved to Text.Pandoc.Highlighting.
2017-02-05 21:58:45 +01:00