aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Options.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-01-26Split writeDocbook into writeDocbook4, writeDocbook5.John MacFarlane1-2/+0
Removed writerDocbookVersion in WriterOptions. Renamed default.docbook template to default.docbook4. Allow docbook4 as an output format. But alias docbook = docbook4.
2017-01-25Provide explicit separate functions for HTML 4 and 5.John MacFarlane1-2/+0
* Text.Pandoc.Writers.HTML: removed writeHtml, writeHtmlString, added writeHtml4, writeHtml4String, writeHtml5, writeHtml5String. * Removed writerHtml5 from WriterOptions. * Renamed default.html template to default.html4. * "html" now aliases to "html5"; to get the old HTML4 behavior, you must now specify "-t html4".
2017-01-25Removed readerVerbosity and writerVerbosity.John MacFarlane1-4/+0
API change. Also added a verbosity parameter to makePDF.
2017-01-25Changes to verbosity in writer and reader options.John MacFarlane1-4/+9
API changes: Text.Pandoc.Options: * Added Verbosity. * Added writerVerbosity. * Added readerVerbosity. * Removed writerVerbose. * Removed readerTrace. pandoc CLI: The `--trace` option sets verbosity to DEBUG; the `--quiet` option sets it to ERROR, and the `--verbose` option sets it to INFO. The default is WARNING.
2017-01-25Removed writerHighlight; made writerHighlightStyle a Maybe.John MacFarlane1-4/+3
API change. For no highlighting, set writerHighlightStyle to Nothing.
2017-01-25Removed vestigial writerMediaBag from WriterOptions.John MacFarlane1-3/+0
API change.
2017-01-25Removed writerIgnoreNotes.John MacFarlane1-2/+0
Instead, just temporarily remove notes when generating TOC lists in HTML and Markdown (as we already did in LaTeX). Also export deNote from Text.Pandoc.Shared. API change in Shared and Options.WriterOptions.
2017-01-25Removed unused readerFileScope.John MacFarlane1-2/+0
API change.
2017-01-25Removed writerTeXLigatures.John MacFarlane1-2/+0
Make `smart` extension work in LaTeX/ConTeXt writers instead. Instead of `-t latex --no-tex-ligatures`, do `-t latex-smart`.
2017-01-25Options: changed default reader/writerExtensions to emptyExtensions.John MacFarlane1-2/+2
Previously they were pandocExtensions. This didn't make sense for many formats.
2017-01-25Removed readerOldDashes and --old-dashes option, added old_dashes extension.John MacFarlane1-4/+0
API change. CLI option change.
2017-01-25Removed readerSmart and the --smart option; added Ext_smart extension.John MacFarlane1-2/+0
Now you will need to do -f markdown+smart instead of -f markdown --smart This change opens the way for writers, in addition to readers, to be sensitive to +smart, but this change hasn't yet been made. API change. Command-line option change. Updated manual.
2017-01-25Make Extensions a custom type instead of a Set Extension.John MacFarlane1-5/+3
The type is implemented in terms of an underlying bitset which should be more efficient. API change: from Text.Pandoc.Extensions export Extensions, emptyExtensions, extensionsFromList, enableExtension, disableExtension, extensionEnabled.
2017-01-25Split extensions code from Options into separate Text.Pandoc.Extensions.John MacFarlane1-205/+3
API change. However, Extensions exports Options, so this shouldn't have much impact.
2017-01-25Simplified reference-docx/reference-odt to reference-doc.John MacFarlane1-4/+2
* Text.Pandoc.Options.WriterOptions: removed writerReferenceDocx and writerReferenceODT, replaced them with writerReferenceDoc. This can hold either an ODT or a Docx. In this way, writerReferenceDoc is like writerTemplate, which can hold templates of different formats. [API change] * Removed `--reference-docx` and `--reference-odt` options. * Added `--reference-doc` option.
2016-11-30Options: Removed writerStandalone, made writerTemplate a Maybe.John MacFarlane1-4/+2
Previously setting writerStandalone = True did nothing unless a template was provided in writerTemplate. Now a fragment will be generated if writerTemplate is Nothing; otherwise, the specified template will be used and standalone output generated. [API change]
2016-11-27Refactor top-level division selection (#3261)Albert Krewinkel1-7/+9
The "default" option is no longer represented as `Nothing` but via a new type constructor, making the `Maybe` wrapper superfluous. The default behavior of using heuristics can now be enabled explicitly by setting `--top-level-division=default`. API change (`Text.Pandoc.Options`): The `Division` type was renamed to `TopLevelDivision`. The `Section`, `Chapter`, and `Part` constructors were renamed to `TopLevelSection`, `TopLevelChapter`, and `TopLevelPart`, respectively. An additional `TopLevelDefault` constructor was added, which is now also the new default value of the `writerTopLevelDivision` field in `WriterOptions`.
2016-11-26Allow to overwrite top-level division type heuristics (#3258)Albert Krewinkel1-2/+2
Pandoc uses heuristics to determine the most resonable top-level division type when emitting LaTeX or Docbook markup. It is now possible to overwrite this implicitly set top-level division via the `top-level-division` command line parameter. API change (`Text.Pandoc.Options`): the type of the `writerTopLevelDivision` field in of the `WriterOptions` data type is altered from `Division` to `Maybe Division`. The field's default value is changed from `Section` to `Nothing`. Closes: #3197
2016-10-22Added `angle_brackets_escapable` extension.John MacFarlane1-1/+3
This is needed because github flavored Markdown has a slightly different set of escapable symbols than original Markdown; it includes angle brackets. Closes #2846.
2016-10-19Add option for top-level division typeAlbert Krewinkel1-4/+9
The `--chapters` option is replaced with `--top-level-division` which allows users to specify the type as which top-level headers should be output. Possible values are `section` (the default), `chapter`, or `part`. The formats LaTeX, ConTeXt, and Docbook allow `part` as top-level division, TEI only allows to set the `type` attribute on `div` containers. The writers are altered to respect this option in a sensible way.
2016-09-06Add --parts command line option to LaTeX writer.Oliver Matthews1-0/+2
Add --parts command line argument. This only effects LaTeX writer, and only for non-beamer output formats. It changes the output levels so the top level is 'part', the next 'chapter' and then into sections.
2016-10-11Options: Add references location.Jesse Rosenthal1-0/+9
This will be used by the markdown writer for deciding where to put links and footnotes.
2016-10-09removed mmd raw_tex in src/Text/Pandoc/Options.hsKolenCheung1-1/+3
2016-09-28Markdown reader: added bracket syntax for native spans.John MacFarlane1-0/+2
See #168. Text.Pandoc.Options.Extension has a new constructor `Ext_brackted_spans`, which is enabled by default in pandoc's Markdown.
2016-06-20Changed email-obfuscation default to no obfuscation.John MacFarlane1-1/+1
- `writerEmailObfuscation` in `defaultWriterOptions` is now `NoObfuscation` - the default for the command-line `--email-obfuscation` option is now `none`. Closes #2988.
2016-04-29Write out Docbook 5 namespaceIvo Clarysse1-2/+2
2016-04-29Add docbook5 writer supportIvo Clarysse1-0/+2
2016-03-22Updated copyright dates to include 2016.John MacFarlane1-2/+2
2016-03-15Introduce file-scope parsing (parse-before-combine)Jesse Rosenthal1-0/+2
Traditionally pandoc operates on multiple files by first concetenating them (around extra line breaks) and then processing the joined file. So it only parses a multi-file document at the document scope. This has the benefit that footnotes and links can be in different files, but it also introduces a couple of difficulties: - it is difficult to join files with footnotes without some sort of preprocessing, which makes it difficult to write academic documents in small pieces. - it makes it impossible to process multiple binary input files, which can't be catted. - it makes it impossible to process files from different input formats. This commit introduces alternative method. Instead of catting the files first, it parses the files first, and then combines the parsed output. This makes it impossible to have links across multiple files, and auto-identified headers won't work correctly if headers in multiple files have the same name. On the other hand, footnotes across multiple files will work correctly and will allow more freedom for input formats. Since ByteStringReaders can currently only read one binary file, and will ignore subsequent files, we also changes the behavior to automatically parse before combining if using the ByteStringReader. If we use one file, it will work as normal. If there is more than one file it will combine them after parsing (assuming that the format is the same). Note that this is intended to be an optional method, defaulting to off. Turn it on with `--file-scope`.
2016-02-09Removed `tex_math_single_backslash` from `markdown_github` options.John MacFarlane1-1/+0
Closes #2707.
2015-12-12Implemented `east_asian_line_breaks` extension.John MacFarlane1-0/+2
Text.Pandoc.Options: Added `Ext_east_asian_line_breaks` constructor to `Extension` (API change). This extension is like `ignore_line_breaks`, but smarter -- it only ignores line breaks between two East Asian wide characters. This makes it better suited for writing with a mix of East Asian and non-East Asian scripts. Closes #2586.
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane1-2/+9
Added threefold wrapping option. * Command line option: deprecated `--no-wrap`, added `--wrap=[auto|none|preserve]` * Added WrapOption, exported from Text.Pandoc.Options * Changed type of writerWrapText in WriterOptions from Bool to WrapOption. * Modified Text.Pandoc.Shared functions for SoftBreak. * Supported SoftBreak in writers. * Updated tests. * Updated README. Closes #1701.
2015-11-19Renamed link attribute extensions.John MacFarlane1-5/+5
* Old `link_attributes` -> `mmd_link_attributes` * Recently added `common_link_attributes` -> `link_attributes` Note: this change could break some existing workflows.
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane1-0/+5
mb21-new-image-attributes * Bumped version to 1.16. * Added Attr field to Link and Image. * Added `common_link_attributes` extension. * Updated readers for link attributes. * Updated writers for link attributes. * Updated tests * Updated stack.yaml to build against unreleased versions of pandoc-types and texmath. * Fixed various compiler warnings. Closes #261. TODO: * Relative (percentage) image widths in docx writer. * ODT/OpenDocument writer (untested, same issue about percentage widths). * Update pandoc-citeproc.
2015-11-14Derive Generic instances for types in Text.Pandoc.Options.John MacFarlane1-10/+11
2015-11-13Added `emoji` extension to Markdown.John MacFarlane1-0/+2
This is enabled by default in `markdown_github`. Added `Ext_emoji` to `Extension` in `Text.Pandoc.Options` (API change). Closes #2523.
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane1-0/+1
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane1-1/+0
- The (non-exported) prelude is in prelude/Prelude.hs. - It exports Monoid and Applicative, like base 4.8 prelude, but works with older base versions. - It exports (<>) for mappend. - It hides 'catch' on older base versions. This allows us to remove many imports of Data.Monoid and Control.Applicative, and remove Text.Pandoc.Compat.Monoid. It should allow us to use -Wall again for ghc 7.10.
2015-10-03FIxed typo: Ext_superscript, Ext_subscript.John MacFarlane1-2/+2
2015-10-03For markdown_mmd, add: implicit_figures, superscripts, subscripts.John MacFarlane1-0/+9
See #2401.
2015-07-27Text.Pandoc.Options: modifications for image attributes.John MacFarlane1-0/+5
* Added `Ext_common_link_attributes` constructor to `Extension` (for link and image attributes). * Added this to `pandocExtensions` and `phpMarkdownExtraExtensions`. * Added `writerDpi` to `WriterOptions`. * pandoc.hs: Added `--dpi` option. * Updated README for `--dpi` and `common_link_attributes` extension. Patch due to mb21, with some modifications: `writerDpi` is now an `Int` rather than a `Double`.
2015-06-27Options: Export `plainExtensions`.John MacFarlane1-0/+19
These are the extensions used in `plain` output.
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.