aboutsummaryrefslogtreecommitdiff
path: root/pandoc.hs
AgeCommit message (Collapse)AuthorFilesLines
2014-06-25Add track changes option to command line.Jesse Rosenthal1-0/+17
2014-06-21Fixed compiler warnings.John MacFarlane1-2/+0
2014-06-20Filters: don't print misleading error message.John MacFarlane1-4/+1
Previously pandoc would say that a filter was not found, even in a case where the filter had a syntax error.
2014-06-16Integrated the docx reader into the main pandoc program.mpickering1-3/+10
Changes also include generalising the types of reader allowed. The mechanism now mimics the more general output mechanism.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-3/+3
2014-04-27Allow html4 as synonym of html as reader.John MacFarlane1-6/+7
It already worked for writer.
2014-04-27Fix #1267.John MacFarlane1-10/+13
We now check the writerName for a lua script in pandoc.hs, so that lowercasing and format parsing aren't done. Note this behavior change: getWriter in Text.Pandoc no longer returns a custom writer on input "foo.lua".
2014-04-27A bit of refactoring that shouldn't change any semantics.John MacFarlane1-10/+9
In preparation for a fix to #1267.
2014-04-05Give more useful error message if '-t pdf' is specified.John MacFarlane1-16/+24
Closes #1155.
2014-04-05Make it possible to run filters that aren't executable.John MacFarlane1-2/+18
Pandoc first tries to find the executable (searching the path if path isn't given). If it fails, but the file exists and has a .py, .pl, .rb, .hs, or .php extension, pandoc runs the filter using the appropriate interpreter. This should make it easier to use filters on Windows, and make it more convenient for everyone. Closes #1096.
2014-03-19PDF: Changes to error reporting, to handle non-UTF8 error output.John MacFarlane1-1/+4
2014-03-04Add a simple Emacs Org-mode readerAlbert Krewinkel1-0/+1
The basic structure of org-mode documents is recognized; however, org-mode features like todo markers, tags etc. are not supported yet.
2014-02-25Added readerTrace to ReaderOptions, --trace command line opt.John MacFarlane1-0/+9
This is to debug backtracking-related parsing bugs. So far it is only implemented for markdown, but it would be good to extend it to latex and html readers.
2014-01-03The `--bibliography` option now sets the `biblio-files` variable.John MacFarlane1-0/+3
So, if you're using `--natbib` or `--biblatex`, you can just use `--bibliography=foo.bib` instead of `-V bibliofiles=foo`.
2014-01-02Merge pull request #1005 from nougad/consistent_bibliographyJohn MacFarlane1-1/+3
Don't add pandoc-citeproc filter if natbib or biblatex is used
2013-12-19HLint: redundant parensHenry de Valence1-4/+2
Remove parens enclosing a single element.
2013-12-19HLint: use `elem` and `notElem`Henry de Valence1-1/+1
Replaces long conditional chains with calls to `elem` and `notElem`.
2013-12-05Allow https: to work in pandoc command line arguments.John MacFarlane1-5/+8
(Use openURL from Shared instead of simpleHTTP.)
2013-11-30Allow "epub2" as synonym for "epub", "html4" for "html".John MacFarlane1-1/+4
2013-10-21Don't look for slidy files in data files w/ --self-contained.John MacFarlane1-2/+0
2013-09-30Fixed stupid copy&paste errorFlorian Eitel1-1/+0
How could this happend? sry
2013-09-30Don't add pandoc-citeproc filter if natbib or biblatex is usedFlorian Eitel1-1/+4
See https://github.com/jgm/pandoc-templates/issues/42
2013-09-19Handle Boolean values in `--metadata`.John MacFarlane1-4/+13
Note that anything not parseable as a YAML boolean or string is treated as a literal string. Note that you can still get a string value with "yes" or any of the strings interpretable as booleans: -M boolvalue=yes -M stringvalue='"yes"'
2013-09-17More informative error when a filter is not found in path.John MacFarlane1-2/+7
No more "resource vanished (broken pipe)"!
2013-09-17Allow `--metadata` to be repeated for the same key to form a list.John MacFarlane1-14/+26
This also has the effect that `--bibliography` can be repeated, as before.
2013-09-14More robust check for '-F pandoc-filters', allowing pathnames.John MacFarlane1-3/+3
2013-09-10`--bibliography` again implies `-F pandoc-citeproc`.John MacFarlane1-5/+11
But only if pandoc-citeproc isn't already specified as a filter.
2013-09-08`--bibliography` no longer implies `-F pandoc-citeproc`.John MacFarlane1-2/+0
This could lead to double filtering if the user specifies `-F` too.
2013-09-01Changed --metadata to return Boolean True if no value.John MacFarlane1-7/+8
Also documented in README.
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-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.