summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Options.hs
Commit message (Collapse)AuthorAge
* _online_latexmathml_defaultDebian Haskell Group2018-04-24
| | | Gbp-Pq: Name 1001_online_latexmathml_default.patch
* Update copyright notices to include 2018Albert Krewinkel2018-01-05
|
* Change Generic JSON instances to TemplateHaskell (#4085)Jasper Van der Jeugt2017-11-21
|
* Introduce `HasSyntaxExtensions` typeclass (#4074)Alexander2017-11-16
| | | | | | + Added new `HasSyntaxExtensions` typeclass for `ReaderOptions` and `WriterOptions`. + Reimplemented `isEnabled` function from `Options.hs` to accept both `ReaderOptions` and `WriterOptions`. + Replaced `enabled` from `CommonMark.hs` with new `isEnabled`.
* hlintAlexander Krotov2017-11-01
|
* Automatic reformating by stylish-haskell.John MacFarlane2017-10-27
|
* makePDF: add argument for pdf options, remove writerPdfArgs.John MacFarlane2017-10-26
| | | | | - Removed writerPdfArgs from WriterOptions (API change). - Added parameter for pdf args to makePDF.
* KaTeX fixes:John MacFarlane2017-10-05
| | | | | | | * In Options.HTMLMathMethod, the KaTeX contsructor now takes only one string (for the KaTeX base URL), rather than two [API change]. * The default URL has been updated to the latest version. * The autoload script is now loaded by default.
* Removed writerSourceURL, add source URL to common state.John MacFarlane2017-09-30
| | | | | | | | | | | | | | | | | | Removed `writerSourceURL` from `WriterOptions` (API change). Added `stSourceURL` to `CommonState`. It is set automatically by `setInputFiles`. Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`. The type of `getInputFiles` has changed; it now returns `[FilePath]` instead of `Maybe [FilePath]`. Functions in Class that formerly took the source URL as a parameter now have one fewer parameter (`fetchItem`, `downloadOrRead`, `setMediaResource`, `fillMediaBag`). Removed `WriterOptions` parameter from `makeSelfContained` in `SelfContained`.
* Added `--strip-comments` option, `readerStripComments` in `ReaderOptions`.John MacFarlane2017-09-17
| | | | | | | | | | * Options: Added readerStripComments to ReaderOptions. * Added `--strip-comments` command-line option. * Made `htmlTag` from the HTML reader sensitive to this feature. This affects Markdown and Textile input. Closes #2552.
* Remove To/FromJSON instance for WriterOptions.John MacFarlane2017-09-15
| | | | | This required the (now removed) instances for Syntax. It was too long, anyway, to be of use.
* FromJSON/ToJSON instances for Reader, WriterOptions.John MacFarlane2017-09-14
| | | | Depends on skylighting 0.3.5.
* Support for PDF generation via `weasyprint` and `prince` (#3909)Mauro Bieg2017-09-11
| | | | | | | * Rename --latex-engine to --pdf-engine * In `Text.Pandoc.Options.WriterOptions`, rename `writerLaTeXEngine` to `writerPdfEngine` and `writerLaTeXArgs` to `writerPdfArgs`. * Add support for `weasyprint` and `prince`, in addition to `wkhtmltopdf`, for PDF generation via HTML (closes #3906). * `Text.Pandoc.PDF.html2pdf`: use stdin instead of intermediate HTML file
* Remove writerUserDataDir from WriterOptions.John MacFarlane2017-08-10
| | | | | It is now carried in CommonState in PandocMonad instances. (And thus it can be used by readers too.)
* Rewrote LaTeX reader with proper tokenization.John MacFarlane2017-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added `writerEpubSubdirectory` to `WriterOptions`.John MacFarlane2017-06-22
| | | | | | | | | | | | [API change] The EPUB writer now takes its EPUB subdirectory from this option. Also added `PandocEpubSubdirectoryError` to `PandocError`. This is raised if the EPUB subdirectory is not all ASCII alphanumerics. See #3720.
* Text.Pandoc.App: ToJSON and FromJSON instances for Opts.John MacFarlane2017-05-21
| | | | | This can be used e.g. to pass options via web interface, such as trypandoc.
* Update dates in copyright noticesAlbert Krewinkel2017-05-13
| | | | | This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
* Allow dynamic loading of syntax definitions.John MacFarlane2017-03-30
| | | | | | | | | | | | | | | | | See #3334. * Add writerSyntaxMap to WriterOptions. * Highlighting: added parameter for SyntaxMap to highlight. * Implemented --syntax-definition option. TODO: [ ] Figure out whether we want to have the xml parsing depend on the dtd (it currently does, and fails unless the language.dtd is found in the same directory). [ ] Add an option to read a KDE syntax highlighting theme as a custom style. [ ] Add tests.
* Added readerAbbreviations to ParserState.John MacFarlane2017-03-05
| | | | | | | | Markdown reader now consults this to determine what is an abbreviation. Eventually it will be possible to specify a custom list (see #256).
* Stylish-haskell automatic formatting changes.John MacFarlane2017-03-04
|
* Removed `--epub-stylesheet`; use `--css` instead.John MacFarlane2017-02-27
| | | | | | | | | | | | * Removed writerEpubStylesheet in WriterOptions. * Removed `--epub-stylesheet` option. * Allow `--css` to be used with epub. * Allow multiple stylesheets to be used. * Stylesheets will be taken both from `--css` and from the `stylesheet` metadata field (which can contain either a file path or a list of them). Closes #3472, #847.
* Added Text.Pandoc.Logging (exported module).John MacFarlane2017-02-10
| | | | | | | | | | | | This now contains the Verbosity definition previously in Options, as well as a new LogMessage datatype that will eventually be used instead of raw strings for warnings. This will enable us, among other things, to provide machine-readable warnings if desired. See #3392.
* Removed --parse-raw and readerParseRaw.John MacFarlane2017-02-06
| | | | | | | | | | | | | | | | | | | | | | | These were confusing. Now we rely on the +raw_tex or +raw_html extension with latex or html input. Thus, instead of --parse-raw -f latex we use -f latex+raw_tex and instead of --parse-raw -f html we use -f html+raw_html
* Changed writerEpubMetadata to a Maybe String.John MacFarlane2017-02-04
| | | | API change.
* `--mathml` and MathML in HTMLMathMethod longer take an argument.John MacFarlane2017-01-30
| | | | | The argument was for a bridge javascript that used to be necessary in 2004. We have removed the script already.
* LaTeX writer: export writeBeamer.John MacFarlane2017-01-28
| | | | Removed writerBeamer from WriterOptions.
* HTML: export separate functions for slide formats.John MacFarlane2017-01-27
| | | | | | writeS5, writeSlideous, writeRevealJs, writeDZSlides, writeSlidy. Removed writerSlideVariant from WriterOptions.
* HTML writer: export writeHtmlStringForEPUB.John MacFarlane2017-01-27
| | | | Options: Remove writerEPUBVersion.
* Split writeDocbook into writeDocbook4, writeDocbook5.John MacFarlane2017-01-26
| | | | | | | Removed writerDocbookVersion in WriterOptions. Renamed default.docbook template to default.docbook4. Allow docbook4 as an output format. But alias docbook = docbook4.
* Provide explicit separate functions for HTML 4 and 5.John MacFarlane2017-01-25
| | | | | | | | | * 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".
* Removed readerVerbosity and writerVerbosity.John MacFarlane2017-01-25
| | | | | | API change. Also added a verbosity parameter to makePDF.
* Changes to verbosity in writer and reader options.John MacFarlane2017-01-25
| | | | | | | | | | | | | | 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.
* Removed writerHighlight; made writerHighlightStyle a Maybe.John MacFarlane2017-01-25
| | | | | | API change. For no highlighting, set writerHighlightStyle to Nothing.
* Removed vestigial writerMediaBag from WriterOptions.John MacFarlane2017-01-25
| | | | API change.
* Removed writerIgnoreNotes.John MacFarlane2017-01-25
| | | | | | | | | 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.
* Removed unused readerFileScope.John MacFarlane2017-01-25
| | | | API change.
* Removed writerTeXLigatures.John MacFarlane2017-01-25
| | | | | | Make `smart` extension work in LaTeX/ConTeXt writers instead. Instead of `-t latex --no-tex-ligatures`, do `-t latex-smart`.
* Options: changed default reader/writerExtensions to emptyExtensions.John MacFarlane2017-01-25
| | | | | Previously they were pandocExtensions. This didn't make sense for many formats.
* Removed readerOldDashes and --old-dashes option, added old_dashes extension.John MacFarlane2017-01-25
| | | | API change. CLI option change.
* Removed readerSmart and the --smart option; added Ext_smart extension.John MacFarlane2017-01-25
| | | | | | | | | | | | | | | | | 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.
* Make Extensions a custom type instead of a Set Extension.John MacFarlane2017-01-25
| | | | | | | | | 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.
* Split extensions code from Options into separate Text.Pandoc.Extensions.John MacFarlane2017-01-25
| | | | | | API change. However, Extensions exports Options, so this shouldn't have much impact.
* Simplified reference-docx/reference-odt to reference-doc.John MacFarlane2017-01-25
| | | | | | | | | | | | * 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.
* Options: Removed writerStandalone, made writerTemplate a Maybe.John MacFarlane2016-11-30
| | | | | | | | 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]
* Refactor top-level division selection (#3261)Albert Krewinkel2016-11-27
| | | | | | | | | | | | | | 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`.
* Allow to overwrite top-level division type heuristics (#3258)Albert Krewinkel2016-11-26
| | | | | | | | | | | | | 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
* Added `angle_brackets_escapable` extension.John MacFarlane2016-10-22
| | | | | | | | This is needed because github flavored Markdown has a slightly different set of escapable symbols than original Markdown; it includes angle brackets. Closes #2846.
* Add option for top-level division typeAlbert Krewinkel2016-10-19
| | | | | | | | | | 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.
* Add --parts command line option to LaTeX writer.Oliver Matthews2016-09-06
| | | | | | | 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.