aboutsummaryrefslogtreecommitdiff
path: root/pandoc.cabal
AgeCommit message (Collapse)AuthorFilesLines
2017-07-21Added TikiWiki reader (#3800)rlpowell1-8/+10
Added TikiWiki reader, including tests and documentation. It's probably not *complete*, but it works pretty well, handles all the basics (and some not-so-basics).
2017-07-13Use foldrWithKey instead of deprecated foldWithKey.John MacFarlane1-2/+2
2017-07-07Rewrote LaTeX reader with proper tokenization.John MacFarlane1-0/+1
This rewrite is primarily motivated by the need to get macros working properly. A side benefit is that the reader is significantly faster (27s -> 19s in one benchmark, and there is a lot of room for further optimization). We now tokenize the input text, then parse the token stream. Macros modify the token stream, so they should now be effective in any context, including math. Thus, we no longer need the clunky macro processing capacities of texmath. A custom state LaTeXState is used instead of ParserState. This, plus the tokenization, will require some rewriting of the exported functions rawLaTeXInline, inlineCommand, rawLaTeXBlock. * Added Text.Pandoc.Readers.LaTeX.Types (new exported module). Exports Macro, Tok, TokType, Line, Column. [API change] * Text.Pandoc.Parsing: adjusted type of `insertIncludedFile` so it can be used with token parser. * Removed old texmath macro stuff from Parsing. Use Macro from Text.Pandoc.Readers.LaTeX.Types instead. * Removed texmath macro material from Markdown reader. * Changed types for Text.Pandoc.Readers.LaTeX's rawLaTeXInline and rawLaTeXBlock. (Both now return a String, and they are polymorphic in state.) * Added orgMacros field to OrgState. [API change] * Removed readerApplyMacros from ReaderOptions. Now we just check the `latex_macros` reader extension. * Allow `\newcommand\foo{blah}` without braces. Fixes #1390. Fixes #2118. Fixes #3236. Fixes #3779. Fixes #934. Fixes #982.
2017-06-30Use latest texmath.John MacFarlane1-1/+1
2017-06-25Moved BCP47 specific functions from Writers.Shared to new module.John MacFarlane1-0/+1
Text.Pandoc.BCP47 (unexported, internal module). `getLang`, `Lang(..)`, `parseBCP47`.
2017-06-20Added mention of vimwiki raeder more places.John MacFarlane1-7/+7
2017-06-19Added Vimwiki reader (#3705).Yuchen Pei1-0/+2
* New module Text.Pandoc.Readers.Vimwiki, exporting readVimwiki [API change]. * New input format `vimwiki`. * New data file, `data/vimwiki.css`, for displaying the HTML produced by this reader and pandoc's HTML writer in the style of vimwiki's own HTML export.
2017-06-19Mention muse reader in README, MANUAL, debian control, cabal description.John MacFarlane1-2/+2
2017-06-19Add Muse reader (#3620)Alexander Krotov1-0/+2
2017-06-17Allow QuickCheck 2.10John MacFarlane1-1/+1
2017-06-17Relax time and process in preparation for GHC 8.2 (#3739)Bartosz Nitka1-3/+3
GHC 8.2 is very likely to ship with process-1.6.0.0 and time-1.8.0.1. Consult: https://ghc.haskell.org/trac/ghc/wiki/Commentary/Libraries/VersionHistory
2017-06-10Fixed weigh-pandoc for Text readers.John MacFarlane1-0/+1
2017-06-10Fixed benchmark to work with Text readers.John MacFarlane1-0/+1
2017-06-04Remove cpphs build requirement -- it is no longer needed.John MacFarlane1-3/+0
It was required when we used hsb2hs but no longer seemes needed with file-embed.
2017-05-28Update criterion upper bound.John MacFarlane1-1/+1
2017-05-20Improve SVG image size code.Marc Schreiber1-0/+4
The old code made some unwise assumptions about how the svg file would look. See #3580.
2017-05-16Org reader: put tree parsing code into dedicated moduleAlbert Krewinkel1-0/+1
2017-05-14Org reader: add basic file inclusion mechanismAlbert Krewinkel1-0/+3
Support for the `#+INCLUDE:` file inclusion mechanism was added. Recognized include types are *example*, *export*, *src*, and normal org file inclusion. Advanced features like line numbers and level selection are not implemented yet. Closes: #3510
2017-05-07Remove https flag.John MacFarlane1-10/+4
Supporting two completely different libraries for fetching from URLs makes it difficult to trap errors, because of different error types expected from the libraries. There's no clear reason not to build with these https-capable libraires.
2017-04-26API change: move writer functions to Text.Pandoc.WritersAlbert Krewinkel1-0/+1
Writer helper functions were defined in the top-level Text.Pandoc module. These functions are moved to the Writer submodule as to enable reuse in other submodules.
2017-04-26API change: move reader functions to Text.Pandoc.ReadersAlbert Krewinkel1-0/+1
Reader helper functions were defined in the top-level Text.Pandoc module. These functions are moved to the Readers submodule as to enable reuse in other submodules.
2017-04-22Allow aeson 1.2.0.0.John MacFarlane1-1/+1
2017-04-22Use skylighitng >= 0.3.3.John MacFarlane1-2/+2
2017-04-14Lua filter: allow shorthand functions for math and quotedAlbert Krewinkel1-4/+1
Allow to use functions named `SingleQuoted`, `DoubleQuoted`, `DisplayMath`, and `InlineMath` in filters.
2017-04-14Avoid repeating StackValue instances definitionsAlbert Krewinkel1-0/+1
The lua filters and custom lua writer system defined very similar StackValue instances for strings and tuples. These instance definitions are extracted to a separate module to enable sharing.
2017-04-14Extract lua helper functions into Lua.Util moduleAlbert Krewinkel1-0/+1
2017-04-14Drop dependency on hslua-aesonAlbert Krewinkel1-1/+0
Pushing values to the lua stack via custom functions is faster and more flexible.
2017-04-06Ensure correctness of StackValue instancesAlbert Krewinkel1-0/+1
2017-04-03Merge pull request #3550 from tarleb/lua-readers-submoduleJohn MacFarlane1-2/+4
Lua module: add readers submodule
2017-04-02Revert "Revert "Use file-embed instead of hsb2hs to embed data files.""John MacFarlane1-1/+1
This reverts commit 1fa15c225b515e1fa1c6566f90f1be363a4d770f.
2017-04-02Text.Pandoc.App: Throw errors rather than exiting.John MacFarlane1-1/+0
These are caught (and lead to exit) in pandoc.hs, but other uses of Text.Pandoc.App may want to recover in another way. Added PandocAppError to PandocError (API change). This is a stopgap: later we should have a separate constructor for each type of error. Also fixed uses of 'exit' in Shared.readDataFile, and removed 'err' from Shared (API change). Finally, removed the dependency on extensible-exceptions. See #3548.
2017-04-02Lua module: add readers submoduleAlbert Krewinkel1-2/+4
Plain text readers are exposed to lua scripts via the `pandoc.reader` submodule, which is further subdivided by format. Converting e.g. a markdown string into a pandoc document is possible from within lua: doc = pandoc.reader.markdown.read_doc("Hello, World!") A `read_block` convenience function is provided for all formats, although it will still parse the whole string but return only the first block as the result. Custom reader options are not supported yet, default options are used for all parsing operations.
2017-04-01Allow a theme file as argument to `--highlight-style`.John MacFarlane1-0/+2
Also include a sample, `default.theme`, in `data/`.
2017-03-30Add JATS to description in pandoc.cabal.John MacFarlane1-1/+1
2017-03-30Automatically include URI-encoded jats.csl for jats output.John MacFarlane1-0/+2
This way people can do pandoc -s -t jats --filter pandoc-citeproc and it will just work. If they want to specify a stylesheet, they still can.
2017-03-30Added JATS writer.John MacFarlane1-0/+3
* New module Text.Pandoc.Writer.JATS exporting writeJATS. * New output format `jats`. * Added tests. * Revised manual.
2017-03-28Added default.jats template.John MacFarlane1-0/+1
This is copied from Martin Fenner's pandoc-jats project: https://github.com/mfenner/pandoc-jats
2017-03-27Add auxiliary files for command test for #3530 to pandoc.cabal.John MacFarlane1-0/+2
Otherwise builds fail.
2017-03-26Revert "Use file-embed instead of hsb2hs to embed data files."John MacFarlane1-1/+1
This reverts commit 10d91c147968d2e4d63b99b5b0342624827f416f.
2017-03-26Use file-embed instead of hsb2hs to embed data files.John MacFarlane1-1/+1
I think template haskell is robust enough now across platforms that this will work. Motivation: file-embed gives us better dependency tracking: if a data file changes, ghc/stack/cabal know to recompile the Data module. This also removes hsb2hs as a build dependency.
2017-03-24Ensure compatibility with hslua 0.5.*Albert Krewinkel1-1/+2
The 0.5.0 release of hslua fixes problems with lua C modules on linux. The signature of the `loadstring` function changed, so a compatibility wrapper is introduced to allow both 0.4.* and 0.5.* versions to be used.
2017-03-23Allow creation of pdf via groff ms and pdfroff.John MacFarlane1-4/+5
pandoc -t ms -o output.pdf input.txt
2017-03-23Initial addition of groff ms writer.John MacFarlane1-1/+5
* New module: Text.Pandoc.Writers.Ms. * New template: default.ms. * The writer uses texmath's new eqn writer to convert math to eqn format, so a ms file produced with this writer should be processed with `groff -ms -e` if it contains math.
2017-03-20Added two lua test files to extra-source-files in pandoc.cabal.John MacFarlane1-0/+2
This was caught by our new .travis.yml, which builds from an extracted sdist tarball instead of the repository.
2017-03-20Lua filters (#3514)Albert Krewinkel1-0/+7
* Add `--lua-filter` option. This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed. Note that lua filters are all applied after regular filters, regardless of their position on the command line. * Add Text.Pandoc.Lua, exporting `runLuaFilter`. Add `pandoc.lua` to data files. * Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module. * Add Tests.Lua to tests. * Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters. * Document in MANUAL.txt.
2017-03-16Added test for #256.John MacFarlane1-0/+1
2017-03-16Add default abbreviations file (data/abbreviations).John MacFarlane1-0/+2
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-15Removed another unused cabal dependency.John MacFarlane1-1/+0
2017-03-15Removed some unnecessary build-depends.John MacFarlane1-8/+3
2017-03-15Use tasty-golden for golden tests in Old.John MacFarlane1-0/+2