aboutsummaryrefslogtreecommitdiff
path: root/pandoc.cabal
AgeCommit message (Collapse)AuthorFilesLines
2021-10-31Bump to 2.16, update changelog.John MacFarlane1-1/+1
2021-10-30Allow time 1.13John MacFarlane1-2/+2
2021-10-27Require latest skylighting (0.12.1).John MacFarlane1-2/+2
2021-10-27Switch back from HsYAML to yaml.John MacFarlane1-5/+5
Reasons: - Performance: HsYAML is around 20 times slower in parsing large YAML bibliographies (#6084). - An issue was submitted to HsYAML, but it hasn't gotten any attention. HsYAML seems borderline unmaintained; it hasn't had a commit in over a year. - Unfortunately this goes back on our attempts to free ourselves from C dependencies (#4535). But I don't see a better alternative until a better pure Haskell parser is available. Closes #6084. Notes: - We've removed the FromYAML instances for all types that had them, since this is a HsYAML-specific typeclass [API change]. (The yaml package just uses From/ToJSON.) - Unlike HsYAML (in the configuration we were using), yaml parses 'Y', 'N', 'Yes', 'No', 'On', 'Off' as boolean values. Users may need to quote these when they are meant to be interpreted as strings. Similarly, 'null' is parsed as a YAML null value (and will be treated as an empty string by pandoc rather than the string 'null'). Quoting it will force it to be interpreted as a string. - Some tests had to be adjusted accordingly. - Pandoc now behaves better when the YAML metadata contains escaping errors: instead of just falling back on treating the section as a table, it raises a YAML parsing error.
2021-10-26Lua: marshal ListAttributes values as userdata objectsAlbert Krewinkel1-0/+1
2021-10-23Use ipynb 0.1.0.2.John MacFarlane1-2/+2
With this change pandoc can be built with aeson >= 2.
2021-10-22Bump to 2.15, updaet man page.John MacFarlane1-1/+1
2021-10-22Use citeproc 0.6, commonmark 0.2.2.1, commonmark-extensions 0.2.2John MacFarlane1-3/+3
2021-10-22Use texmath 0.12.3.2John MacFarlane1-1/+1
2021-10-22Use pandoc-types 1.22.1.John MacFarlane1-2/+2
2021-10-22Lua: marshal Version values as userdataAlbert Krewinkel1-1/+1
2021-10-22Lua: marshal Attr values as userdataAlbert Krewinkel1-0/+1
- Adds a new `pandoc.AttributeList()` constructor, which creates the associative attribute list that is used as the third component of `Attr` values. Values of this type can often be passed to constructors instead of `Attr` values. - `AttributeList` values can no longer be indexed numerically.
2021-10-22Switch to hslua-2.0Albert Krewinkel1-8/+7
The new HsLua version takes a somewhat different approach to marshalling and unmarshalling, relying less on typeclasses and more on specialized types. This allows for better performance and improved error messages. Furthermore, new abstractions allow to document the code and exposed functions.
2021-10-17pptx: Fix list level numberingEmily Bourke1-0/+2
In PowerPoint, the content of a top-level list is at the same level as the content of a top-level paragraph – the only difference is that a list style has been applied. At the moment, the pptx writer increments the paragraph level on each list, turning what should be top-level lists into second-level lists. This commit changes that logic, only incrementing the paragraph level on continuation paragraphs of lists. - Fixes https://github.com/jgm/pandoc/issues/4828 - Fixes https://github.com/jgm/pandoc/issues/4663
2021-10-12Revert "Depend on pandoc-types 1.23, remove Null constructor on Block."John MacFarlane1-2/+2
This reverts commit fb0d6c7cb63a791fa72becf21ed493282e65ea91.
2021-10-12Allow aeson 2.0John MacFarlane1-1/+1
2021-10-11Require doclayout >= 0.3.1.1.John MacFarlane1-1/+1
This fixes recognition of "real widths" of emoji characters, which is important for tabular layout.
2021-10-10Translations: don't depend on the fact that Aeson Object is...John MacFarlane1-1/+0
implemented internally as a HashMap. This is no longer public as of aeson 2.0.0.0.
2021-10-05Allow time 1.12.John MacFarlane1-2/+2
2021-10-01Depend on pandoc-types 1.23, remove Null constructor on Block.John MacFarlane1-2/+2
2021-09-28Switch from pretty-simple to pretty-show for native output.John MacFarlane1-1/+2
Update tests. Reason: it turns out that the native output generated by pretty-simple isn't always readable by the native reader. According to https://github.com/cdepillabout/pretty-simple/issues/99 it is not a design goal of the library that the rendered values be readable using 'read'. This makes it unsuitable for our purposes. pretty-show is a bit slower and it uses 4-space indents (non-configurable), but it doesn't have this serious drawback.
2021-09-21Use pretty-simple to format native output.John MacFarlane1-1/+2
Previously we used our own homespun formatting. But this produces over-long lines that aren't ideal for diffs in tests. Easier to use something off-the-shelf and standard. Closes #7580. Performance is slower by about a factor of 10, but this isn't really a problem because native isn't suitable as a serialization format. (For serialization you should use json, because the reader is so much faster than native.)
2021-09-18Use skylighting-0.12, skylighting-core-0.12.John MacFarlane1-2/+2
This fixes highlighting issues with typescript, scala, and other syntaxes that include keyword lists from different syntaxes.
2021-09-18pptx: Support footers in the reference docEmily Bourke1-0/+5
In PowerPoint, it’s possible to specify footers across all slides, containing a date (optionally automatically updated to today’s date), the slide number (optionally starting from a higher number than 1), and static text. There’s also an option to hide the footer on the title slide. Before this commit, none of that footer content was pulled through from the reference doc: this commit supports all the functionality listed above. There is one behaviour which may not be immediately obvious: if the reference doc specifies a fixed date (i.e. not automatically updating), and there’s a date specified in the metadata for the document, the footer date is replaced by the metadata date. - Include date, slide number, and static footer content from reference doc - Respect “slide number starts from” option - Respect “Don’t show on title slide” option - Add tests
2021-09-16pptx: Support specifying slide background imagesEmily Bourke1-0/+2
In the reveal-js output, it’s possible to use reveal’s `data-background-image` class on a slide’s title to specify a background image for the slide. With this commit, it’s possible to use `background-image` in the same way for pptx output. Only the “stretch” mode is supported, and the background image is centred around the slide in the image’s larger axis, matching the observed default behaviour of PowerPoint. - Support `background-image` per slide. - Add tests. - Update manual.
2021-09-15pptx: Add support for incremental listsEmily Bourke1-0/+4
- Support -i option - Support incremental/noincremental divs - Support older block quote syntax - Add tests One thing not clear from the manual is what should happen when the input uses a combination of these things. For example, what should the following produce? ```md ::: {.incremental .nonincremental} - are - these - incremental? ::: ::: incremental ::::: nonincremental - or - these? ::::: ::: ::: nonincremental > - how > - about > - these? ::: ``` In this commit I’ve taken the following approach, matching the observed behaviour for beamer and reveal.js output: - if a div with both classes, incremental wins - the innermost incremental/nonincremental div is the one which takes effect - a block quote containing a list as its first element inverts whether the list is incremental, whether or not the quote is inside an incremental/non-incremental div I’ve added some tests to verify this behaviour. This commit closes issue #5689 (https://github.com/jgm/pandoc/issues/5689).
2021-09-13pptx: Fix logic for choosing Comparison layoutEmily Bourke1-2/+4
There was a mistake in the logic used to choose between the Comparison and Two Content layouts: if one column contained only non-text (an image or a table) and the other contained only text, the Comparison layout was chosen instead of the desired Two Content layout. This commit fixes that logic: > If either column contains text followed by non-text, use Comparison. Otherwise, use Two Content. It also adds a test asserting this behaviour.
2021-09-01pptx: Add support for more layoutsEmily Bourke1-8/+22
Until now, the pptx writer only supported four slide layouts: “Title Slide” (used for the automatically generated metadata slide), “Section Header” (used for headings above the slide level), “Two Column” (used when there’s a columns div containing at least two column divs), and “Title and Content” (used for all other slides). This commit adds support for three more layouts: Comparison, Content with Caption, and Blank. - Support “Comparison” slide layout This layout is used when a slide contains at least two columns, at least one of which contains some text followed by some non-text (e.g. an image or table). The text in each column is inserted into the “body” placeholder for that column, and the non-text is inserted into the ObjType placeholder. Any extra content after the non-text is overlaid on top of the preceding content, rather than dropping it completely (as currently happens for the two-column layout). + Accept straightforward test changes Adding the new layout means the “-deleted-layouts” tests have an additional layout added to the master and master rels. + Add new tests for the comparison layout + Add new tests to pandoc.cabal - Support “Content with Caption” slide layout This layout is used when a slide’s body contains some text, followed by non-text (e.g. and image or a table). Before now, in this case the image or table would break onto a new slide: to get that output again, users can add a horizontal rule before the image or table. + Accept straightforward tests The “-deleted-layouts” tests all have an extra layout and relationship in the master for the Content with Caption layout. + Accept remove-empty-slides test Empty slides are still removed, but the Content with Caption layout is now used. + Change slide-level-0/h1-h2-with-text description This test now triggers the content with caption layout, giving a different (but still correct) result. + Add new tests for the new layout + Add new tests to the cabal file - Support “Blank” slide layout This layout is used when a slide contains only blank content (e.g. non-breaking spaces). No content is inserted into any placeholders in the layout. Fixes #5097. + Accept straightforward test changes Blank layout now copied over from reference doc as well, when layouts have been deleted. + Add some new tests A slide should use the blank layout if: - It contains only speaker notes - It contains only an empty heading with a body of nbsps - It contains only a heading containing only nbsps - Change ContentType -> Placeholder This type was starting to have a constructor for each placeholder on each slide (e.g. `ComparisonUpperLeftContent`). I’ve changed it instead to identify a placeholder by type and index, as I think that’s clearer and less redundant. - Describe layout-choosing logic in manual
2021-09-01pptx: Restructure testsEmily Bourke1-1/+54
- Use dashes consistently rather than underscores - Make a folder for each set of tests - List test files explicitly (Cabal doesn’t support ** until version 2.4)
2021-08-28Add `--sandbox` option.John MacFarlane1-0/+1
+ Add sandbox feature for readers. When this option is used, readers and writers only have access to input files (and other files specified directly on command line). This restriction is enforced in the type system. + Filters, PDF production, custom writers are unaffected. This feature only insulates the actual readers and writers, not the pipeline around them in Text.Pandoc.App. + Note that when `--sandboxed` is specified, readers won't have access to the resource path, nor will anything have access to the user data directory. + Add module Text.Pandoc.Class.Sandbox, defining `sandbox`. Exported via Text.Pandoc.Class. [API change] Closes #5045.
2021-08-21LaTeX-parser: restrict \endinput to current fileSimon Schuster1-0/+1
2021-08-20Bump to 2.14.2, update changelog.John MacFarlane1-1/+1
2021-08-17Use released citeproc 0.5.John MacFarlane1-1/+1
2021-08-13Convert Quoted in bib entries to special Spans...John MacFarlane1-1/+1
before passing them off to citeproc. This ensures that we get proper localization and flipflopping if, e.g., quotes are used in titles. Closes jgm/citeproc#87.
2021-08-12Bump base-compat version so we get compatibility with base 4.12.John MacFarlane1-1/+1
2021-08-12Use Prelude from base-compat for ghc 8.4 too.John MacFarlane1-1/+1
We were having trouble building on ghc 8.4 because of the lack of a Foldable instance for (Alt Maybe) in base < 4.12. Mystery: for some reason our builds were failing for gitit but not in the pandoc CI.
2021-08-10Add RTF reader.John MacFarlane1-0/+4
- `rtf` is now supported as an input format as well as output. - New module Text.Pandoc.Readers.RTF (exporting `readRTF`). [API change] Closes #3982.
2021-08-03Stop using the HTTP package. (#7456)mt_caret1-1/+1
We only depend on the urlEncode function in the package, which is also provided by http-types. The HTTP package also depends on the network package, which has difficulty building on ghcjs. Add internal module Text.Pandoc.Network.HTTP, exporting `urlEncode`.
2021-07-18Bump to 2.14.1, update changelog and man page.John MacFarlane1-2/+2
2021-07-18Use doctemplates 0.4.1 and citeproc 0.10.John MacFarlane1-2/+2
2021-07-17Use skylighting 0.11.John MacFarlane1-2/+2
2021-07-09RST reader: fix regression with code includes.John MacFarlane1-0/+1
With the recent changes to include infrastructure, included code blocks were getting an extra newline. Closes #7436. Added regression test.
2021-06-28Require commonmark-pandoc >= 0.2.2.1.John MacFarlane1-1/+1
This fixes task lists with multiple paragraphs.
2021-06-20Bump to 2.14.0.3, update changelog, require latest skylighting.John MacFarlane1-3/+3
2021-06-20Require commonmark 0.2.1.John MacFarlane1-1/+1
2021-06-10Bump to 2.14.0.2, update chaneglog and manual.John MacFarlane1-1/+1
2021-06-05Require citeproc 0.4.0.1.John MacFarlane1-1/+1
This fixes a bug which led to doubled "et al." in some (rare) circumstances.
2021-05-31Bump to 2.14.0.1; update changelog and man page.John MacFarlane1-1/+1
2021-05-29Use commonmark-extensions 0.2.1.2John MacFarlane1-1/+1
2021-05-29Replace biblatex-exmaples.bib with shorter averroes.bib in tests.John MacFarlane1-1/+1