Commit graph

427 commits

Author SHA1 Message Date
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
John MacFarlane
0bc9b0679b Increased ansi-terminal upper bound. 2013-01-25 12:37:45 -08:00
John MacFarlane
bd645d9ae5 Relaxed old-time version bound, allowing 1.0.*.
I see no reason for the restriction, which requires a recent
Haskell Platform.

The module is only used in make-pandoc-man-pages anyway.
2013-01-25 11:24:52 -08:00
John MacFarlane
e97b8ae946 Version bump to 1.10.0.5. 2013-01-23 19:39:07 -08:00
John MacFarlane
fe337b07f7 Use hsb2hs preprocessor instead of TH for embed_data_files.
This should work on Windows, unlike the TH solution with
file-embed.
2013-01-23 19:26:39 -08:00
John MacFarlane
daeb52d4e0 Eliminated use of TH in test suite. 2013-01-23 19:26:39 -08:00
John MacFarlane
9c299d282f Added Text.Pandoc.Data (non-exported) if embed_data_files selected.
This module just exports the association list of embedded data files,
which is used by Shared.
2013-01-23 19:26:39 -08:00
John MacFarlane
b4232fdbda Updated tested-with in cabal file. 2013-01-21 14:05:36 -08:00
John MacFarlane
93c9a1c167 Version bump to 1.10.0.4. 2013-01-20 19:25:42 -08:00
John MacFarlane
00fe1dba31 Bump version to 1.10.0.3; added further missing fb2 tests.
Updated changelog.
2013-01-20 10:19:08 -08:00
John MacFarlane
155a312a83 Version bump to 1.10.0.2. 2013-01-20 09:43:37 -08:00