Commit graph

437 commits

Author SHA1 Message Date
John MacFarlane
802dc9a8b9 Added Text.Pandoc.Compat.Monoid.
This allows pandoc to compile with base < 4.5, where Data.Monoid
doesn't export `<>`.  Thanks to Dirk Ullirch for the patch.
2013-08-08 10:41:39 -07:00
John MacFarlane
b1be9cfaef Require latest version of texmath.
Closes #935.
2013-08-05 18:41:33 -07:00
John MacFarlane
2d6e0b1530 Remove CPP from default-extensions; add pragmas to modules as needed. 2013-08-04 14:12:13 -07:00
John MacFarlane
a24409d43e pandoc.cabal: Removed support for ghc version < 7.2.
There is no point to supporting them, since pandoc-types
requires at least ghc 7.2 for GHC generics.
2013-08-03 16:44:54 -07:00
John MacFarlane
2e5edbb278 Revert "Added --filter option."
This reverts commit 85dacbb282.
2013-07-23 23:17:07 -07:00
John MacFarlane
85dacbb282 Added --filter option.
This makes it easier to use JSON filters.  Instead of
doing

    pandoc -t json | ./filter | pandoc -f json

you can just do

    pandoc --filter ./filter
2013-07-23 23:02:47 -07:00
John MacFarlane
7f15d888f6 Require highlighting-kate 0.5.5.
0.5.4 has a serious memory leak that affects the mandoc parser.
See highlighting-kate#34.
2013-07-22 16:14:47 -07:00
John MacFarlane
ed714b1b52 cabal: Added http-conduit flag, which allows fetching https resources.
It also brings in a large number of dependencies (http-conduit and its
dependencies), which is why for now it is an optional flag.

Closes #820.
2013-07-04 23:13:37 -07:00
John MacFarlane
e973bbbbc8 Markdown reader: Better error messages for yaml headers. 2013-07-02 09:23:43 -07:00
John MacFarlane
956425709d Created Text.Pandoc.Writers.Shared, improved metaToJSON.
* Text.Pandoc.Writers.Shared contains shared functions used
  only in writers.
* metaToJSON now takes a WriterOptions parameter, and will
  return an empty object if standalone is not specified.
2013-07-01 20:47:26 -07:00
John MacFarlane
f939dbdcc5 Require highlighting-kate 0.5.4. 2013-06-26 20:53:38 -07:00
John MacFarlane
f869f7e08d Use new flexible metadata type.
* Depend on pandoc 1.12.
* Added yaml dependency.
* `Text.Pandoc.XML`: Removed `stripTags`.  (API change.)
* `Text.Pandoc.Shared`:  Added `metaToJSON`.
  This will be used in writers to create a JSON object for use
  in the templates from the pandoc metadata.
* Revised readers and writers to use the new Meta type.
* `Text.Pandoc.Options`: Added `Ext_yaml_title_block`.
* Markdown reader:  Added support for YAML metadata block.
  Note that it must come at the beginning of the document.
* `Text.Pandoc.Parsing.ParserState`:  Replace `stateTitle`,
  `stateAuthors`, `stateDate` with `stateMeta`.
* RST reader:  Improved metadata.
  Treat initial field list as metadata when standalone specified.
  Previously ALL fields "title", "author", "date" in field lists
  were treated as metadata, even if not at the beginning.
  Use `subtitle` metadata field for subtitle.
* `Text.Pandoc.Templates`:  Export `renderTemplate'` that takes a string
  instead of a compiled template..
* OPML template:  Use 'for' loop for authors.
* Org template: '#+TITLE:' is inserted before the title.
  Previously the writer did this.
2013-06-24 20:29:41 -07:00
John MacFarlane
e32a8f5981 Revised Text.Pandoc.Templates to accept JSON contexts.
Currently the library is set up with a shim for association
lists, for compatibility, but this can change when the writers
are changed.

New export: `varListToJSON`.

Removed `Empty`.

Simplified template type to a newtype.
2013-06-24 20:27:37 -07:00
John MacFarlane
5f4a32e465 Use aeson for json.
Benchmarked:  about twice as slow as json!
2013-06-24 20:27:37 -07:00
John MacFarlane
b664068221 Set default stack size to 16M.
This is needed for some large conversions, esp. if pandoc
is compiled with 64-bit ghc.
2013-05-29 12:29:38 -07:00
John MacFarlane
f42ffcb710 Bump upper bound for criterion. 2013-05-07 20:42:38 -07:00
John MacFarlane
fa978e1365 Use latest highlighting-kate and texmath.
Closes #849.
2013-05-07 20:22:09 -07:00
John MacFarlane
9d01c45b01 Version bump to 1.11.2. 2013-05-01 12:54:19 -07:00
John MacFarlane
26fefa040a PDF: On Windows, create temdir in working directory.
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.
2013-04-26 20:36:06 -07:00
John MacFarlane
cecceee0d3 Added Text.Pandoc.Asciify utility module.
This has functions to create ascii-only versions of identifiers.
2013-04-23 20:10:24 -07:00
John MacFarlane
7d7bc2cb79 Added CONTRIBUTING.md. 2013-04-14 20:42:01 -07:00
John MacFarlane
4fa2a94759 Added Text.Pandoc.Writers.Custom, --print-custom-lua-writer.
pandoc -t data/sample.lua

will load the script sample.lua and use it as a custom writer.
data/sample.lua is provided as an example.

Added `--print-custom-lua-writer` option to print the sample
script.
2013-04-14 00:31:39 -05:00
John MacFarlane
0b85ad7546 Added stubs for haddock reader tests.
Modify tests/haddock-reader.haddock and
tests/haddock-reader.native.
2013-03-28 15:58:09 -07:00
John MacFarlane
5a20f3a9c3 Mention haddock reader in cabal description. 2013-03-28 15:31:15 -07:00
David Lazar
18459b95ba Add reader for Haddock markup based on Haddock's own lexer/parser. 2013-03-28 14:53:10 -07:00
John MacFarlane
ba1e74dcd7 Removed blaze_html_0_5 flag, require blaze-html >= 0.5.
Reason:  < 0.5 does not provide a monoid instance for Attribute,
which is now needed by the HTML writer.

Closes #803.
2013-03-26 11:38:50 -07:00
John MacFarlane
942b7b8f9c Slidy: Use slidy.js rather than slidy.js.gz.
Reason:  some browsers have trouble with the gzipped js file,
at least on the local file system.

Closes #795.
2013-03-25 19:48:42 -07:00
John MacFarlane
572457f8a9 Documented revealjs in README and pandoc.cabal description. 2013-03-23 21:48:39 -04:00
John MacFarlane
6b4a72f633 Added default.revealjs template to cabal file. 2013-03-23 21:31:15 -04:00
John MacFarlane
5b4d239b85 Added OPML template, tests.
Minor fixes to OPML writer.
Improved OPML reader tests.
2013-03-20 10:17:59 -07:00
John MacFarlane
69acb47a34 Added Text.Pandoc.Writers.OPML.
TODO:

* Document in README
* Add tests
* Add template (and add template to cabal file)
2013-03-19 22:49:44 -07:00
John MacFarlane
74d53f4347 Added Text.Pandoc.Readers.OPML, exporting readOPML.
The _note attribute is supported.  This is unofficial, but
used e.g. in OmniOutliner and supported by multimarkdown.
We treat the contents as markdown blocks under a section
header.

Added to documentation and tests.
2013-03-19 20:22:14 -07:00
John MacFarlane
cae52ecc31 Revert "LaTeX reader: citation handling changes."
This reverts commit f7229b1473.
2013-03-17 08:48:29 -07:00
John MacFarlane
0e40355059 Version bump to 1.11.1. 2013-03-16 15:55:43 -07:00
John MacFarlane
762258b233 Version bump to 1.11.0.1. 2013-03-16 15:48:34 -07:00
John MacFarlane
6e8209f6b2 Bumped QuickCheck version bound. 2013-03-16 15:32:54 -07:00
John MacFarlane
f7229b1473 LaTeX reader: citation handling changes.
Previously, a LaTeX citation would always be parsed as a Citation
element, with the raw LaTeX in the [Inline] part.

Now, the LaTeX citation is parsed as a Citation element only if
`--biblio` was specified (i.e. only if there is a nonempty set
of references in readerReferences).  Otherwise it is parsed as
raw LaTeX.

This will make it possible to simplify some things in the markdown
writer.  It also makes the LaTeX reader behave more like the Markdown
reader.
2013-03-09 10:33:25 -08:00
John MacFarlane
4e2e088feb Bump syb version to < 0.5. 2013-03-06 13:06:35 -08:00
John MacFarlane
3b63cb0903 Hide Text.Pandoc.Highlighting.
* Moved code for translating listings language names to
  highlighting-kate names and back from LaTeX reader to Highlighting.
* Text.Pandoc.Highlighting no longer exposed (API change)
* Text.Pandoc.Highlighting exports toListingsLang, fromListingsLang
2013-03-05 22:09:42 -08:00
John MacFarlane
fd657986cc pandoc.cabal: Require latest h-k, texmath, citeproc-hs, zip-archive.
Pandoc will compile with older versions, but there will be bugs
relating to these functions.  Making the current versions dependencies
is the only way to get packages updated in the distros.
2013-03-04 17:15:51 -08:00
John MacFarlane
9453995cbf Allow compilation with blaze-html 0.6. 2013-02-19 18:45:41 -08:00
John MacFarlane
1a22709ff9 Increased upper bound for Diff. 2013-02-13 08:20:02 -08:00
John MacFarlane
6d95984626 Version bump to 1.11, Text.Pandoc.Parsing no longer exposed. 2013-02-12 20:14:43 -08:00
John MacFarlane
55fed3ca9c Version to 1.10.1.1 since we no longer have API change. 2013-02-09 19:07:27 -08:00
John MacFarlane
78759cfd42 Revert "Hide module Text.Pandoc.Parsing."
This reverts commit 18a5c9a8bf.

We want to do this eventually, but as it requires a major version
bump, let's wait til later.
2013-02-09 19:04:55 -08:00
John MacFarlane
1aa74199cf Revert "Hide module Text.Pandoc.Highlighting."
This reverts commit 01753ead71.

We need it after all in pandoc.hs.
2013-02-05 19:34:08 -08:00
John MacFarlane
4cff7ba817 Version bump to 1.11 due to API changes. 2013-02-05 19:27:55 -08:00
John MacFarlane
01753ead71 Hide module Text.Pandoc.Highlighting.
This is really an auxiliary module.
2013-02-05 19:07:59 -08:00
John MacFarlane
18a5c9a8bf Hide module Text.Pandoc.Parsing. 2013-02-05 19:06:33 -08:00
John MacFarlane
f3b1b8e720 Version bump to 1.10.1. 2013-01-28 10:54:34 -08:00