aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Options.hs
AgeCommit message (Collapse)AuthorFilesLines
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2015-03-19Derive from Data and Typeable for libpandocShahbaz Youssefi1-9/+12
This commit derives a few types from Data and Typeable used by libpandoc. Requires corresponding pull-request for Highlighting-Kate: https://github.com/jgm/highlighting-kate/pull/64 Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
2015-03-16Replace occurrences of 'Github' with 'GitHub'Tom Leese1-1/+1
The website is called 'GitHub' afterall.
2015-03-15Merge pull request #1989 from zudov/shortcut_ref_link_prJohn MacFarlane1-1/+7
Support shortcut reference links in markdown writer
2015-03-10Support shortcut reference links in markdown writerKonstantin Zudov1-1/+7
Issue #1977 Most markdown processors support the [shortcut format] for reference links. Pandoc's markdown reader parsed this shortcuts unoptionally. Pandoc's markdown writer (with --reference-links option) never shortcutted links. This commit adds an extension `shortcut_reference_links`. The extension is enabled by default for those markdown flavors that support reading shortcut reference links, namely: - pandoc - strict pandoc - github flavoured - PHPmarkdown If extension is enabled, reader parses the shortcuts in the same way as it preveously did. Otherwise it would parse them as normal text. If extension is enabled, writer outputs shortcut reference links unless doing so would cause problems (see test cases in `tests/Tests/Writers/Markdown.hs`).
2015-03-04Fix issue #969, #1779 by providing --latex-engine-optSumit Sahrawat1-0/+2
2014-12-26Added `--verbose` flag for debugging output in PDF production.John MacFarlane1-0/+2
Closes #1840. Closes #1653.
2014-09-25Add support for KaTeX HTML mathmpickering1-0/+1
Closes #1626
2014-08-08Added `native_divs` and `native_spans` extensions.John MacFarlane1-0/+4
This allows users to turn off the default pandoc behavior of parsing contents of div and span tags in markdown and HTML as native pandoc Div blocks and Span inlines. Setting of default epub extensions has been moved from the EPUB reader to Text.Pandoc.
2014-07-31Options: Added option to turn on epub html extensionsMatthew Pickering1-0/+1
2014-07-31New module, Text.Pandoc.MediaBag.John MacFarlane1-2/+3
Moved `MediaBag` definition and functions from Shared: `lookupMedia`, `mediaDirectory`, `insertMedia`, `extractMediaBag`. Removed `emptyMediaBag`; use `mempty` instead, since `MediaBag` is a Monoid.
2014-07-31Made MediaBag a newtype, and added mime type information to media.John MacFarlane1-3/+2
Shared now exports functions for interacting with a MediaBag: - `emptyMediaBag` - `lookuMedia` - `insertMedia` - `mediaDirectory` - `extractMediaBag`
2014-07-30Removed deprecated and no longer used readerStrict in ReaderOptions.John MacFarlane1-2/+0
This is handled by readerExtensions now.
2014-07-30Moved MediaBag back from Shared to Options, to avoid module cycle.John MacFarlane1-5/+1
2014-07-30Added writerMediaBag to WriterOptions.John MacFarlane1-1/+3
2014-07-30Moved MediaBag from Shared to Options.John MacFarlane1-0/+6
This will allow us to put a MediaBag in WriterOptions.
2014-07-20Markdown reader: revised definition list syntax (closes #1429).John MacFarlane1-0/+2
* This change brings pandoc's definition list syntax into alignment with that used in PHP markdown extra and multimarkdown (with the exception that pandoc is more flexible about the definition markers, allowing tildes as well as colons). * Lazily wrapped definitions are now allowed; blank space is required between list items; and the space before definition is used to determine whether it is a paragraph or a "plain" element. * For backwards compatibility, a new extension, `compact_definition_lists`, has been added that restores the behavior of pandoc 1.12.x, allowing tight definition lists with no blank space between items, and disallowing lazy wrapping.
2014-07-11Markdown writer: don't use braced attributes for fenced code.John MacFarlane1-1/+0
Removed `Ext_fenced_code_attributes` from `markdown_github` extensions. If this extension is not set, the first class attribute will be printed after the opening fence as a bare word. Closes #1416.
2014-06-25Add TrackChanges to Options export.Jesse Rosenthal1-0/+1
2014-06-25Add reader option for track changes.Jesse Rosenthal1-0/+2
2014-06-25Add TrackChanges type to options.Jesse Rosenthal1-0/+6
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2014-02-25Added readerTrace to ReaderOptions, --trace command line opt.John MacFarlane1-0/+2
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.
2013-09-07Added `lists_without_preceding_blankline` extension.John MacFarlane1-0/+2
* Added `Ext_lists_without_preceding_blankline` to `Extension` in `Options`. Added this option to `githubMarkdownExtensions`. * Made markdown reader sensitive to this. * Closes #972.
2013-08-24Removed dependency on citeproc-hs.John MacFarlane1-7/+0
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-11Options: Changed `writerSourceDir` to `writerSourceURL` (now a Maybe).John MacFarlane1-2/+2
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-07-17Added `ignore_line_breaks` markdown extension.John MacFarlane1-0/+1
This causes intra-paragraph line breaks to be ignored, rather than being treated as hard line breaks or spaces. This is useful for some East Asian languages, where spaces aren't used between words, but text is separated into lines for readability.
2013-07-02Rename `Ext_yaml_title_block` -> `Ext_yaml_metadata_block`.John MacFarlane1-2/+2
2013-06-24Use new flexible metadata type.John MacFarlane1-0/+2
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-04-23Options: Added `Ext_ascii_identifiers`.John MacFarlane1-0/+3
This will force `Ext_auto_identifiers` to use ASCII only. Set as default for github markdown. Note: API change.
2013-03-21Added basic support for reveal.js.Jamie F. Olson1-0/+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-02-23`--number-from` -> `--number-offset`John MacFarlane1-2/+2
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-21Added `--number-from` option and `writerNumberFrom`.John MacFarlane1-0/+2
These still aren't hooked up to anything in the writers.
2013-02-05Added `--default-image-extension` and `readerDefaultImageExtension`.John MacFarlane1-12/+14
Note: Currently this only affects the markdown reader.
2013-01-16Implemented Ext_link_attributes in markdown reader.John MacFarlane1-0/+2
Also simplified source URL and link title parsers.
2013-01-16Implemented Ext_mmd_header_identifiers in markdown reader.John MacFarlane1-0/+1
2013-01-16Options: Added multimarkdownExtensions.John MacFarlane1-2/+18
Also added 'markdown_mmd' as input/output option.
2013-01-15Added `writerHtmlQTags` and `--html-q-tags` option.John MacFarlane1-0/+2
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-15Changed Ext_autolink_urls -> Ext_autolink_bare_uris.John MacFarlane1-2/+2
Added tests.
2013-01-14Added Ext_implicit_figures.John MacFarlane1-2/+2
No code to hook this in yet.
2013-01-13Markdown reader: Support RST-style line blocks.John MacFarlane1-0/+2
This depends on the new Ext_line_blocks extension.
2013-01-11Options: Added githubMarkdownExtensions.John MacFarlane1-0/+15
Added github_markdown as input/output option.
2013-01-10Options: Added phpMarkdownExtraExtensions.John MacFarlane1-0/+14
And added markdown_phpextra input/output format.
2013-01-10Implemented Ext_header_attributes.John MacFarlane1-0/+2
This allows explicit attributes to be put on headers, using a syntax like that for code blocks: {#id .class .class k=v k=v}
2013-01-10Ext_header_identifiers -> Ext_auto_identifiers.John MacFarlane1-2/+2
2013-01-05EPUB changes.John MacFarlane1-0/+5
* Epub writer now exports writeEPUB, not writeEPUB2 and writeEPUB3. * Options now exports EPUBVersion * WriterOptions now includes writerEpubVersion.
2013-01-05Changed --toc-level to --toc-depth.John MacFarlane1-2/+2
2013-01-05Changed `--epub-toc-level` to `--toc-level`.John MacFarlane1-2/+2
Also writerEpubTOCLevel -> writerTOCLevel. So far this is only implemented in the EPUB writer.
2013-01-04Renamed writerEPUBMetadata -> writerEpubMetadata.John MacFarlane1-2/+2
API change for consistency.
2013-01-04Added `--epub-chapter-level` and `--epub-toc-level` options.John MacFarlane1-0/+4
Also added writerEpubChapterLevel and writerEpubTOCLevel fields to WriterOptions.