aboutsummaryrefslogtreecommitdiff
path: root/pandoc.hs
AgeCommit message (Collapse)AuthorFilesLines
2013-09-01Change for latest pandoc-citeproc.John MacFarlane1-1/+1
2013-09-01Restore --bibliography, --csl, --citation-abbreviations.John MacFarlane1-0/+27
These are now implemented as: --bibliography FILE => --metadata bibliography=FILE --filter pandoc-citeproc --csl FILE => --metadata csl=FILE --citation-abbreviations FILE => --metadata csl-abbreviations=FILE
2013-09-01Added `--metadata/-M` option.John MacFarlane1-7/+23
This is like `--variable/-V`, but actually adds to metadata, not just variables.
2013-08-25Added `-F` as shortcut for `--filter`.John MacFarlane1-1/+1
2013-08-24Removed dependency on citeproc-hs.John MacFarlane1-65/+3
Going forward we'll use pandoc-citeproc, as an external filter. The `--bibliography`, `--csl`, and `--citation-abbreviation` fields have been removed. Instead one must include `bibliography`, `csl`, or `csl-abbrevs` fields in the document's YAML metadata. The filter can then be used as follows: pandoc --filter pandoc-citeproc The `Text.Pandoc.Biblio` module has been removed. Henceforth, `Text.CSL.Pandoc` from pandoc-citations can be used by library users. The Markdown and LaTeX readers now longer format bibliographies and citations. That must be done using `processCites` or `processCites'` from Text.CSL.Pandoc. All bibliography-related fields have been removed from `ReaderOptions` and `WriterOptions`: `writerBiblioFiles`, `readerReferences`, `readerCitationStyle`. API change.
2013-08-24Improved error reporting on filters.John MacFarlane1-5/+5
Avoid showing spurious output and avoid double error messages.
2013-08-14Print stderr output of filters to stderr.John MacFarlane1-3/+3
2013-08-13Added module for writing python scripts, with several examples.John MacFarlane1-6/+8
See scripts subdirectory.
2013-08-13Removed `--print-sample-lua-writer`, added `--print-default-data-file`.John MacFarlane1-9/+10
Closes #943.
2013-08-11Options: Changed `writerSourceDir` to `writerSourceURL` (now a Maybe).John MacFarlane1-5/+7
Previously we used to store the directory of the first input file, even if it was local, and used this as a base directory for finding images in ODT, EPUB, Docx, and PDF. This has been confusing to many users. It seems better to look for images relative to the current working directory, even if the first file argument is in another directory. writerSourceURL is set to 'Just url' when the first command-line argument is an absolute URL. (So, relative links will be resolved in relation to the first page.) Otherwise, 'Nothing'. The ODT, EPUB, Docx, and PDF writers have been modified accordingly. Note that this change may break some existing workflows. If you have been assuming that relative links will be interpreted relative to the directory of the first file argument, you'll need to make that the current directory before running pandoc. Closes #942.
2013-08-08Pass writename as argument to filters.John MacFarlane1-6/+11
This way filters can figure out what the target format is and react appropriately. Example: #!/usr/bin/env runghc import Text.Pandoc.JSON import Data.Char main = toJSONFilter cap where cap (Just "html") (Str xs) = Str $ map toUpper xs cap _ x = x This capitalizes text only for html output.
2013-08-08Revert "Revert "Added `--filter` option.""John MacFarlane1-4/+21
This reverts commit 2e5edbb27837372f658b1abbe05371be57415847.
2013-07-23Revert "Added `--filter` option."John MacFarlane1-21/+4
This reverts commit 85dacbb282f34dc45a810d7c7b5a2d639b70e1f5.
2013-07-23Added `--filter` option.John MacFarlane1-4/+21
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-20PDF generation improvements.John MacFarlane1-2/+2
* `Text.Pandoc.PDF` exports `makePDF` instead of `tex2pdf`. (API change.) * `makePDF` walks the pandoc AST and checks for the existence of images in the local directory. If they are not found, it attempts to find them, either in the directory containing the first source file, or at an absolute URL, or at a URL relative to the base URL of the first command line argument. * Closes #917.
2013-07-14Initial work to create dokuwiki writer (#386)Clare Macrae1-0/+1
In this first version, all dokuwiki files are straight copies of the media wiki counterparts.
2013-07-03`--toc-level` no longer implies `--toc`.John MacFarlane1-2/+1
Reason: EPUB users who don't want a visible TOC may still want to set the TOC level for in the book navigation.
2013-04-26pandoc `--help` now says something about pdf output.John MacFarlane1-2/+4
Closes #720.
2013-04-14Added `Text.Pandoc.Writers.Custom`, `--print-custom-lua-writer`.John MacFarlane1-0/+8
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-08Have `--help` print in and out formats in alphabetical order.John MacFarlane1-3/+3
2013-03-23Reveal.js improvements.John MacFarlane1-1/+1
Changed name to revealjs (from reveal_js). Set revealjs-url template variable to 'reveal.js' by default.
2013-03-21Added basic support for reveal.js.Jamie F. Olson1-1/+1
Support unordered and ordered lists with "fragment" elements. Modified by JGM to remove the --reveal_js-url command-line option. Instead use -V reveal_js-url=... as with slidy and the other slide formats. Also cleaned up the list code in the HTML writer.
2013-03-19Added Text.Pandoc.Writers.OPML.John MacFarlane1-0/+1
TODO: * Document in README * Add tests * Add template (and add template to cabal file)
2013-03-19Added Text.Pandoc.Readers.OPML, exporting readOPML.John MacFarlane1-0/+1
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-16Fixed numbering mismatch between TOC and sections in HTML.John MacFarlane1-3/+3
Also made `--number-offset` affect TOC numbering as well as section numbering, as it should have all along. Closes #789.
2013-03-05Hide Text.Pandoc.Highlighting.John MacFarlane1-1/+1
* 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-02-23`--number-from` -> `--number-offset`John MacFarlane1-11/+11
Also `writerNumberFrom` -> `writeNumberOffset`. The offset is a list of numbers (0 by default). These are added to the section, subsection, etc. numbers that would have been generated automatically.
2013-02-22`--number-from` implies `--number-sections`.John MacFarlane1-1/+2
2013-02-21Added `--number-from` option and `writerNumberFrom`.John MacFarlane1-0/+13
These still aren't hooked up to anything in the writers.
2013-02-07Changes to --version.John MacFarlane1-1/+1
Print default user data directory. Put language names in lowercase and omit 'alert' and 'alert_indent'.
2013-02-07Changes to --version.John MacFarlane1-3/+6
Print default user data directory. Put language names in lowercase and omit 'alert' and 'alert_indent'.
2013-02-05Added `--default-image-extension` and `readerDefaultImageExtension`.John MacFarlane1-99/+109
Note: Currently this only affects the markdown reader.
2013-01-19Updated copyright dates.John MacFarlane1-3/+3
2013-01-18RTF writer: Added writeRTFWithEmbeddedImages.John MacFarlane1-8/+4
* RTF writer: Export writeRTFWithEmbeddedImages instead of rtfEmbedImage. * Text.Pandoc: Use writeRTFWithEmbeddedImages for RTF. * Moved code for embedding images in RTF out of pandoc.hs.
2013-01-15Added `writerHtmlQTags` and `--html-q-tags` option.John MacFarlane1-0/+10
The previous default was to use `<q>` tags in HTML5. But `<q>` tags are also valid HTML4, and they are not very robust in HTML5. Some user agents don't support them, and some CSS resets prevent pandoc's quotes CSS from working properly (e.g. bootstrap). It seems a better default just to insert quote characters, but the option is provided for those who have gotten used to using `<q>` tags.
2013-01-11pandoc.hs: Fix writerSourceDirectory when a URL is provided.John MacFarlane1-3/+7
It should be the URL up to the path.
2013-01-10Options: Added phpMarkdownExtraExtensions.John MacFarlane1-5/+0
And added markdown_phpextra input/output format.
2013-01-05Changed --toc-level to --toc-depth.John MacFarlane1-6/+6
2013-01-05Changed `--epub-toc-level` to `--toc-level`.John MacFarlane1-15/+16
Also writerEpubTOCLevel -> writerTOCLevel. So far this is only implemented in the EPUB writer.
2013-01-04Renamed local variable for consistency (EPUB->Epub).John MacFarlane1-20/+20
2013-01-04Renamed writerEPUBMetadata -> writerEpubMetadata.John MacFarlane1-1/+1
API change for consistency.
2013-01-04Added `--epub-chapter-level` and `--epub-toc-level` options.John MacFarlane1-0/+30
Also added writerEpubChapterLevel and writerEpubTOCLevel fields to WriterOptions.
2013-01-03Changed type of 'readers' in Text.Pandoc, so all readers are in IO.John MacFarlane1-2/+3
Users who want pure readers can still get them; this just affects the function getReader that looks up a reader based on the format name. The point of this change is to make it possible to print warnings from the parser.
2013-01-03Fixed paths for LaTeXMathML and MathMLinHTML scripts.John MacFarlane1-2/+2
2012-12-29Data files changes.John MacFarlane1-9/+13
* Added `embed_data_files` flag. (not yet used) * Shared no longer exports `findDataFile`. * `readDataFile` now returns a strict bytestring. * Shared now exports `readDataFileUTF8` which returns a string like the old `readDataFile`. * Rewrote modules to use new data file functions and to avoid using functions from Paths_pandoc directly.
2012-12-29Cabal file changes.John MacFarlane1-0/+1052
* Remove executable and library flags. * Expose `Text.Pandoc.XML` and `Text.Pandoc.Biblio`. * Depend on pandoc library in executable, so we don't recompile everything. * Move pandoc.hs from src/ to .