Commit graph

76 commits

Author SHA1 Message Date
John MacFarlane
43448d7d53 Preliminary changes for epub3 format.
* EPUB writer now exports writeEPUB2 and writeEPUB3.
* 'epub' output format is epub v2, while 'epub3'
  is v3.
2012-11-02 17:46:22 -07:00
John MacFarlane
3d361b2101 Added basic mediawiki reader.
Text.Pandoc.Readers.MediaWiki module,
tests/mediawiki-reader.{txt,native}.
2012-09-12 09:05:10 -07:00
John MacFarlane
8d65651309 Changed strict to markdown_strict. 2012-08-09 22:32:22 -07:00
John MacFarlane
05216d2919 Fixed handling of default extensions, so they don't override +options. 2012-08-09 20:41:50 -07:00
John MacFarlane
0cb7362f62 Removed --strict, added extensions to writer/reader names.
* The `--strict` option has been removed.
* Instead of using `--strict`, one can now use `strict` instead of
  `markdown` as an input or output format name.
* The `--enable` and `--disable` optinos have been removed.
* It is now possible to enable or disable specific extensions
  by appending them (with '+' or '-') to the writer or reader
  name.  For example `pandoc -f markdown-footnotes+hard_line_breaks`.
* The lhs extensions are now implemented this way, too; you can
  use either `+lhs` or `+literate_haskell`.
2012-08-09 20:24:05 -07:00
John MacFarlane
71e0c206c1 Added getReader, getWriter to Text.Pandoc. 2012-08-09 19:11:19 -07:00
John MacFarlane
a740de0508 Use safeRead instead of using reads directly (various modules). 2012-08-09 08:11:28 -07:00
John MacFarlane
244dae8da8 Added parseFormatSpec to Text.Pandoc. 2012-08-09 07:42:40 -07:00
John MacFarlane
dfa4b76630 Changes to literate haskell options.
- Removed writerLiterateHaskell from WriterOptions.
- Removed readerLiterateHaskell from ReaderOptions.
- Added Ext_literate_haskell to Extensions.  Test for this
  instead of the above.
- Removed failUnlessLHS from Shared.

Note:  At this point, +lhs and .lhs extension no longer has any effect.
Need to fix.
2012-08-08 23:18:19 -07:00
John MacFarlane
00dc1e715e Moved WriterOptions and associated types Shared -> Options. 2012-07-26 22:59:56 -07:00
John MacFarlane
acde1e82d2 Changed reader parameters from ParserState to ReaderOptions. 2012-07-25 22:35:41 -07:00
John MacFarlane
856aa8c244 Moved stateLiterateHaskell to readerLiterateHaskell in Options. 2012-07-25 22:05:06 -07:00
John MacFarlane
da3702357d Put smart, strict in separate options field in state.
This is the beginning of a larger transition that will make
Options, not ParserState, the parameter of the read functions.
(Options will also be used in writers, in place of WriterOptions.)

Next step is to remove strict, replacing it with granular
tests for different extensions.
2012-07-25 10:45:45 -07:00
John MacFarlane
e6c76525b2 Text.Pandoc: writers now an assoc list of String, Writer.
A Writer can be a PureStringWriter, an IOStringWriter, or
an IOByteStringWriter.  ALL writers are now in the 'writers'
list, including the binary writers and fb2 writer.  Code simplified
at end of pandoc.hs.
2012-07-24 19:05:38 -07:00
John MacFarlane
fb6e798917 Set writerTableOfContents for s5 in Text.Pandoc, not pandoc.hs. 2012-07-23 22:58:16 -07:00
John MacFarlane
1bd0c47968 Set writerSlideVariant in Text.Pandoc rather than pandoc.hs. 2012-07-23 22:53:35 -07:00
Sergey Astanin
b39597a910 Added a new FictionBook2 (FB2) writer. 2012-07-22 11:13:14 -07:00
John MacFarlane
2351f7a112 Provide Data.Default instances for ParserState and WriterOptions.
Now you can use def (which is re-exported by Text.Pandoc) instead of
defaultParserState or defaultWriterOptions.  For now, these
are still defined too, so existing code need not change.

Closes #546.
2012-07-19 12:38:54 -07:00
Jonas Smedegaard
61f8dd4da8 Add support for Slideous output. 2012-05-24 10:31:18 +02:00
John MacFarlane
d0d101d840 Export readDocBook in Text.Pandoc. 2012-05-12 19:29:39 -07:00
John MacFarlane
d339b29967 Added skeleton of basic docbook reader. 2012-04-14 16:44:21 -07:00
John MacFarlane
9766b532f3 Added beamer+lhs as output format. 2012-03-09 10:32:32 -08:00
John MacFarlane
8abe08d6d4 Made beamer an output format, removed pdf as output format.
Removed `--beamer` option; instead, use `beamer` as output format.
There is no longer a `pdf` output format; instead, pandoc tries
to produce a pdf if the output file has a `.pdf` extension.
(The output format can be latex -- the default for pdf output,
latex+lhs, or beamer.)

This seems more consistent with the way pandoc currently works
(e.g. we have an `html5` output format, not an `--html5` option).
2012-01-28 11:41:26 -08:00
John MacFarlane
f7ed8d5ddc Doc fixes in Text.Pandoc. 2012-01-24 20:49:05 -08:00
John MacFarlane
8aa3d1cccc Text.Pandoc: Added ToFilter instance for a -> [a] types. 2012-01-24 11:50:35 -08:00
John MacFarlane
2e62ec096f Added ToJsonFilter class, deprecated old jsonFilter function. 2012-01-24 09:06:19 -08:00
John MacFarlane
e721c7428e Removed beamer output format; added --beamer option. 2012-01-21 14:49:26 -08:00
John MacFarlane
ba81cda7f1 Added Docx writer.
* New module `Text.Pandoc.Docx`.
* New output format `docx`.
* Added reference.docx.
* New option `--reference-docx`.

The writer includes support for highlighted code blocks
and math (which is converted from TeX to OMML using
texmath's new OMML module).
2012-01-19 12:10:49 -08:00
John MacFarlane
cdb01e6d54 Made html5 and html5+lhs output formats.
Deprecated the `--html5`/`-5` flag. Use the output format
instead.
2011-12-29 13:39:03 -08:00
John MacFarlane
ea39a607ed Added 'beamer' as an output format.
Beamer output uses the default LaTeX template, with some
customizations via variables.

Added `writerBeamer` to `WriterOptions`.

Added `--beamer` option to `markdown2pdf`.
2011-12-29 13:26:04 -08:00
John MacFarlane
1561d51cc5 Renamed to AsciiDoc. Fixed display math and escapes.
AsciiDoc does not seem to have consistent escaping rules.
2011-11-18 21:09:49 -08:00
John MacFarlane
fc1c17b174 Added an asciidoc writer (partial).
Still TODO:

- documentation in README
- add default.asciidoc to templates/
- lists
- tables
- proper escaping
- footnotes with blank lines - print separately at end?
  currently they are just ignored.
- fix header (date gives weird result on pandoc README)
2011-11-16 19:14:55 -08:00
John MacFarlane
9b37c9cc35 Added dzslides output option.
* Added DZSlides to HTMLSlideVariant.
* Added support for dzslides in HTML writer.
* Added dzslides template.
2011-10-01 23:02:24 -07:00
John MacFarlane
382564ed9e RTF writer: Embed images when possible.
* Resolves Issue #275.
* PNG and JPEG supported.
* Export rtfEmbedImage.
2011-01-28 08:42:04 -08:00
John MacFarlane
ea5cd35004 Text.Pandoc: Added jsonFilter for easy construction of scripts.
Here's an example of its use:

-- removelinks.hs - removes links from document
import Text.Pandoc

main = interact $ jsonFilter $ bottomUp removeLink

removeLink :: Inline -> Inline
removeLink (Link xs _) = Emph xs
removeLink x = x
2011-01-22 17:53:16 -08:00
John MacFarlane
6b50778b2a Export readNative in Text.Pandoc.Shared. 2011-01-20 08:52:59 -08:00
John MacFarlane
e1f3c6058e Added Text.Pandoc.Readers.Native (readNative).
readNative can now read full pandoc documents, block lists, blocks,
inline lists, or inlines.  It will interpret

Str "hi"

as if it were

Pandoc (Meta [] [] []) [Plain [Str "hi"]]

This should make testing easier.
2011-01-19 18:36:27 -08:00
John MacFarlane
fd79417825 Fixed the parser for rst+lhs - set stateLiterateHaskell. 2011-01-14 22:38:02 -08:00
John MacFarlane
33ff2fed21 Text.Pandoc: Improved readers, writers lists for lhs variants.
Now the lhs variants set the needed literate Haskell flag in
parser state and writer options.
2011-01-11 20:23:43 -08:00
John MacFarlane
10d85f8b0b Use functions from Text.Pandoc.Generic instead of processWith(M). 2010-12-24 13:39:27 -08:00
Nathan Gass
48600fd547 Added support to write natbib or biblatex citations in latex output. 2010-12-13 20:41:37 -08:00
John MacFarlane
f5c2082304 Added JSON reader and writer.
The JSON reader is about 20x faster than the native reader.
So this can be a good way to serialize a pandoc document.
2010-12-11 00:06:03 -08:00
John MacFarlane
9602f73f2a Moved 'readers' and 'writers' to Text.Pandoc.
This allows library users to avoid repetitive case statements...
2010-12-10 17:30:32 -08:00
Puneeth Chaganti
921e2b6e67 Added Org-mode writer
+ Added Text/Pandoc/Writers/Org.hs
    + Added to pandoc.cabal
    + Added to pandoc.hs and Text/Pandoc.hs exports.
2010-12-04 15:57:39 +05:30
paul.rivier
d532c72c5b Basic Textile Reader 2010-12-03 23:10:50 -08:00
John MacFarlane
c989bf028f Merge branch 'textile'
Conflicts:
	README
	man/man1/pandoc.1.md
	pandoc.cabal
2010-11-27 10:52:44 -08:00
John MacFarlane
01a191709e Moved Text.Pandoc.Writers.S5 -> Text.Pandoc.S5.
Now it doesn't export a writer, just some CSS and JS.
2010-07-22 23:37:06 -07:00
John MacFarlane
a11b530935 Moved s5 writing from S5 module to HTML.
Now s5 is handled in more or less the same way as slidy,
as a variant of HTML.
2010-07-22 22:58:48 -07:00
John MacFarlane
a3051b8acb Export HTMLSlideVariant in Text.Pandoc. 2010-07-22 17:12:57 -07:00
John MacFarlane
3548bf6d9c Moved Pandoc prettyprinting code from Shared to new Native writer.
+ Text.Pandoc.Writers.Native
+ The function prettyPandoc is now gone.  Use writeNative instead.
2010-07-05 00:06:27 -07:00