Commit graph

209 commits

Author SHA1 Message Date
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
0189997420 Changed mathjax cdn url so it doesn't use https.
(This caused problems when used with --self-contained.)

See #609.
2012-09-12 08:45:02 -07:00
John MacFarlane
8d65651309 Changed strict to markdown_strict. 2012-08-09 22:32:22 -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
41e0075789 Removed --enable, --disable options. 2012-08-09 18:38:02 -07:00
John MacFarlane
a740de0508 Use safeRead instead of using reads directly (various modules). 2012-08-09 08:11:28 -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
8a101cffe3 Support hard_line_breaks markdown extension.
* Added Ext_hard_line_breaks.
* Added section in README on non-pandoc extensions.
* Exported pandocExtensions and strictExtensions in Text.Pandoc.Options.

Closes #514.
2012-08-06 22:14:35 -07:00
John MacFarlane
38c452b342 Added --disable and --enable options for markdown extensions. 2012-07-27 10:49:53 -07:00
John MacFarlane
b98219773b Replaced writerStrict with writerExtensions in WriterOptions.
Still have not implemented individual tests for all the extensions
in the markdown writer.
2012-07-27 09:18:51 -07:00
John MacFarlane
00dc1e715e Moved WriterOptions and associated types Shared -> Options. 2012-07-26 22:59:56 -07:00
John MacFarlane
631e5c16fc pandoc: Set readerExtensions instead of readerStrict. 2012-07-26 18:56:19 -07:00
John MacFarlane
acde1e82d2 Changed reader parameters from ParserState to ReaderOptions. 2012-07-25 22:35:41 -07:00
John MacFarlane
9b5d2031c7 Restored stateStandalone as readerStandalone.
It is indeed needed by the RST reader.
2012-07-25 22:05:06 -07:00
John MacFarlane
2654da3823 Moved stateApplyMacros, stateIndentedCodeClasses to ReaderOptions. 2012-07-25 22:05:06 -07:00
John MacFarlane
070b968ae0 stateCitations -> readerCitations. 2012-07-25 22:05:06 -07:00
John MacFarlane
856aa8c244 Moved stateLiterateHaskell to readerLiterateHaskell in Options. 2012-07-25 22:05:06 -07:00
John MacFarlane
1dba82f25e Got rid of stateStandalone, which was hardly used anyway.
The only possible effect will be with rst fragments that
begin with an rst title block, which will now cause the
header transform.
2012-07-25 20:08:42 -07:00
John MacFarlane
95570ba34c Moved stateOldDashes to readerOldDashes in ReaderOptions. 2012-07-25 12:37:04 -07:00
John MacFarlane
335cd5de4d Moved stateTabStop to readerTabStop in ReaderOptions. 2012-07-25 12:31:16 -07:00
John MacFarlane
0d4424c21c Moved stateColumns to readerColumns in ReaderOptions. 2012-07-25 11:51:33 -07:00
John MacFarlane
ef0619cc6d Moved ParseRaw from ParserState to ReaderOptions. 2012-07-25 11:43:56 -07:00
John MacFarlane
dfa19061ab Options -> ReaderOptions.
Better to keep reader and writer options separate.
2012-07-25 11:08: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
308436996e Use catch from Control.Exception to avoid warnings. 2012-07-24 19:38:16 -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
11884d6ebf Removed unneeded import. 2012-07-24 09:59:06 -07:00
John MacFarlane
999edd9608 Changed signatures of writeODT, writeDocx, writeEPUB.
These now take WriterOptions and Pandoc only.
The extra parameters for epub stylesheet, epub fonts,
reference Docx, and reference ODT have been removed, since
these things are now in WriterOptions.

Note:  breaking API change!
2012-07-24 09:56:00 -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
5be6bf07d2 Make --ascii work properly with --self-contained.
Closes #568.
2012-07-19 12:45:26 -07:00
John MacFarlane
5c56165555 -V option: Add variables to beginning of list, not end.
This means that duplicate variables specified later on the command
line take precedence.

It also allows the default `-slidy-url` to be overridden even when
`--self-contained` is used (provided the `-V` comes after
`--self-contained`.  Previously this could not be done.  Note
that when `--self-contained` is used, the `slidy-url` variable is
set to `slidy` so that local copies are used.
2012-07-03 21:59:46 -07:00
John MacFarlane
4cf3aaecde Test for base 4.4.0 instead of 4.5.0 for argument/filename encoding. 2012-06-25 14:27:22 -07:00
John MacFarlane
cc39c313c5 Don't encode/decode file paths if base >= 4.5.
Prior to base 4.5 (and perhaps earlier - check), filepaths and command
line arguments were treated as unencoded lists of bytes, not unicode
strings, so we had to work around that by encoding and decoding
them.  This commit adds CPP checks for base 4.5 that disable the
encoding/decoding.

Fixes a bug with multilingual filenames when pandoc was compiled
with ghc 7.4. Closes #540.
2012-06-24 10:58:15 +02:00
Jonas Smedegaard
61f8dd4da8 Add support for Slideous output. 2012-05-24 10:31:18 +02:00
John MacFarlane
b2340cd874 Added 'zenburn' highlight style from highlighting-kate.
Depend on h-k 0.5.0.6.
2012-05-17 18:54:41 -07:00
John MacFarlane
5f889b9396 Added writerTeXLigatures to WriterOptions, --no-tex-ligatures option.
This is useful for those who want to use advanced OpenType features
with xelatex/lualatex.
2012-05-11 23:00:46 -07:00
John MacFarlane
c77e0c5d77 Input files with .db extension treated as docbook by default. 2012-04-14 21:56:16 -07:00
John MacFarlane
d4d9504950 Changed -V so that you can specify a key without a value.
Such keys get the value `true`.
2012-03-09 10:45:01 -08:00
John MacFarlane
9766b532f3 Added beamer+lhs as output format. 2012-03-09 10:32:32 -08:00
John MacFarlane
9ef7ecd47c Print texmath version in --version output. 2012-02-11 16:21:37 -08:00
John MacFarlane
bec9485d93 Re-added the --ascii option.
Now it is implemented in pandoc.hs, not in the HTML writer.
2012-02-05 14:58:55 -08:00
John MacFarlane
550b931c3c Text.Pandoc.XML: Export fromEntities.
Remove old 'deEntities' from pandoc.hs.
2012-02-05 14:37:33 -08:00
John MacFarlane
ce9f5f36c8 pandoc: Treat html5+lhs as an html format. 2012-02-05 09:58:16 -08:00
John MacFarlane
75485c2f11 Complete rewrite of LaTeX reader.
* The new reader is more robust, accurate, and extensible.
  It is still quite incomplete, but it should be easier
  now to add features.

* Text.Pandoc.Parsing: Added withRaw combinator.

* Markdown reader: do escapedChar before raw latex inline.
  Otherwise we capture commands like \{.

* Fixed latex citation tests for new citeproc.

* Handle \include{} commands in latex.
  This is done in pandoc.hs, not the (pure) latex reader.
  But the reader exports the needed function, handleIncludes.

* Moved err and warn from pandoc.hs to Shared.

* Fixed tests - raw tex should sometimes have trailing space.

* Updated lhs-test for highlighting-kate changes.
2012-02-04 09:56:43 -08:00
John MacFarlane
928b1380f3 Change copyright date. 2012-01-31 08:59:19 -08:00
John MacFarlane
8f1bfec7b9 Added --epub-embed-font option.
* This can be repeated for multiple fonts.
* Added parameter for fonts to embed to writeEPUB.
* Added ttf, otf to Mime types in Text.Pandoc.MIME.
2012-01-30 13:09:52 -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
5fc6669be6 Added --atx-headers option. 2012-01-26 23:55:37 -08:00