aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-09-19Markdown writer: use `underline` class rather than `ul` for underline.John MacFarlane1-1/+1
This only affects output with bracketed_spans enabled. The markdown reader parses spans with either `.ul` or `.underline` as Underline elements, but we're moving towards preferring the latter.
2021-09-18Alphabetize Extension constructors.John MacFarlane1-3/+3
2021-09-18Use skylighting-0.12, skylighting-core-0.12.John MacFarlane2-4/+4
This fixes highlighting issues with typescript, scala, and other syntaxes that include keyword lists from different syntaxes.
2021-09-18pptx-footers: Replace fixed dates with yaml dateEmily Bourke2-8/+44
2021-09-18pptx: Support footers in the reference docEmily Bourke12-199/+372
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-17Fix linter warning.John MacFarlane1-4/+3
2021-09-17Org writer: don't indent contents of code blocks.John MacFarlane3-25/+25
We previously indented them by two spaces, following a common convention. Since the convention is fading, and the indentation is inconvenient for copy/paste, we are discontinuing this practice. Closes #5440.
2021-09-17Update list of supported source languages in org writer.John MacFarlane1-12/+44
See #5440.
2021-09-17mention revealjs support of title-toc in MANUAL Christophe Dervieux1-1/+1
Following addition in #7171
2021-09-16Use --system-ghc in make quick.John MacFarlane1-1/+2
2021-09-16Fix code blocks using `--preserve-tabs`.John MacFarlane2-1/+18
Previously they did not behave as the equivalent input with spaces would. Closes #7573.
2021-09-16pptx: Support specifying slide background imagesEmily Bourke10-60/+178
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-16stack.yaml: use lts-18.10 resolver.John MacFarlane1-3/+1
2021-09-16HTML writer: set "hash" to True by default (for reveal.js).John MacFarlane1-1/+1
Closes #7574. See #6968 where the motivation for setting "hash" to True is explained.
2021-09-16Fix quick-cabal targetJohn MacFarlane1-1/+1
2021-09-15pptx: Add support for incremental listsEmily Bourke15-165/+743
- 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-13RST reader: handle escaped colons in reference definitions.John MacFarlane2-1/+13
Cloess #7568.
2021-09-13Use latest dev version of texmath.John MacFarlane2-1/+7
2021-09-13Modernize quick-cabal Makefile targetJohn MacFarlane1-3/+2
2021-09-13pptx: Fix logic for choosing Comparison layoutEmily Bourke13-8/+27
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-12Docx writer: make id used in native_numbering predictable.John MacFarlane2-3/+6
If the image has the id IMAGEID, then we use the id ref_IMAGEID for the figure number. Closes #7551. This allows one to create a filter that adds a figure number with figure name, e.g. <w:fldSimple w:instr=" REF ref_superfig "><w:r><w:t>Figure X</w:t></w:r></w:fldSimple> For this to be possible it must be possible to predict the figure number id from the image id. If images lack an id, an id of the form `ref_fig1` is used.
2021-09-12Add note to Security section that commonmark is better...John MacFarlane1-1/+4
than markdown as far as pathological performance goes.
2021-09-10Use latest dev citeproc.John MacFarlane2-2/+2
2021-09-10fix!(ipynb writer): improve round trip identityKolen Cheung1-2/+2
for raw cell output BREAKING CHANGE: The Jupyter ecosystem, including nbconvert, lab and notebook, deviated from their own spec in nbformat, where they used the key `raw_mimetype` instead of `format`. Moreover, the mime-type of rst used in Jupyter deviated from that suggested by https://docutils.sourceforge.io/FAQ.html and is defined as `text/restructuredtext` when chosen from "Raw NBConvert Format" in Jupyter. So while this is backward-compatible, it should matches the real world usage better, hence improving the round-trip "identity" in raw-cell. See #229, jupyter/nbformat#229.
2021-09-10feat(ipynb writer): add more Jupyter's "Raw NBConvert Format"Kolen Cheung1-0/+7
Adds more formats that Jupyter's "Raw NBConvert Format" uses natively (asciidoc), and maps more formats to text/html whenever it makes sense.
2021-09-10feat(ipynb reader): get cell output mime from raw_mimetype tooKolen Cheung1-1/+2
While the spec defined format, in practice raw_mimetype is used. See jupyter/nbformat#229
2021-09-10feat(ipynb reader): add more Jupyter's "Raw NBConvert Format"Kolen Cheung1-6/+10
This adds most of the available formats selectable from Jupyter's interface "Raw NBConvert Format".
2021-09-10fix!: rst mime typeKolen Cheung1-1/+1
BREAKING CHANGE: fix rst mime type according to https://docutils.sourceforge.io/FAQ.html
2021-09-10pptx: Copy embedded fonts from reference docEmily Bourke1-0/+1
We already copy the relationships and elements in presentation.xml for embedded fonts, so at the moment using a reference doc with embedded fonts is broken, producing a pptx that PowerPoint says needs repairing. This commit copies the fonts over, which I believe is all that’s needed to work correctly with reference docs with embedded fonts.
2021-09-10pptx: Fix presentation rel numberingEmily Bourke1-63/+131
Before now, the numbering of rIds was inconsistent when making the presentation XML and when making the presentation relationships XML. For the relationships, the slides were inserted into the rId order after the first master, and everything else was moved up out of the way. However, this change was then missed in the presentation XML, I think because `envSlideOffset` was never set. The result was that any slide masters after the first would have the wrong rIds in the presentation XML, clashing with the slides, which would lead PowerPoint to view produced files as corrupt. As well, other relationships (like embedded fonts) would have their rId changed in the relationships XML but not in the presentation XML. This commit: - Removes `envSlideOffset` in favour of directly passed function arguments - Inserts the slides into the rId order after all masters rather than after the first - Updates any other rIds in presentation.xml that need to be changed
2021-09-10pptx: Include all themes in output archiveEmily Bourke145-4/+2
- Accept test changes: they’re adding the second theme (for all tests not containing speaker notes), or changing its position in the XML (for the ones containing speaker notes).
2021-09-10pptx: Don’t add relationships unnecessarilyEmily Bourke1-5/+14
Before now, for any layouts added to the output from the default reference doc, the relationships were unconditionally added to the output. However, if there was already a layout in slideMaster1 at the same index then that results in duplicate relationships. This commit checks first, and only adds the relationship if it doesn’t already exist.
2021-09-10pptx: Fix capitalisation of notesMasterIdEmily Bourke21-1/+1
I don’t think this has caused any problems, but before now it’s been "NotesMasterId", which is incorrect according to [ECMA-376]. [ECMA-376]: https://www.ecma-international.org/publications-and-standards/standards/ecma-376/
2021-09-10Fix command test for #7557.John MacFarlane1-1/+1
2021-09-10Remove redundant import.John MacFarlane1-1/+1
2021-09-10Org reader: don't parse a list as first item in a list item.John MacFarlane2-1/+11
Closes #7557.
2021-09-10MANUAL: Document formats affected by `--reference-location`.John MacFarlane1-1/+3
2021-09-10Support `--reference-location` for HTML output (#7461)Francesco Mazzoli8-39/+169
The HTML writer now supports `EndOfBlock`, `EndOfSection`, and `EndOfDocument` for reference locations. EPUB and HTML slide show formats are also affected by this change. This works similarly to the markdown writer, but with special care taken to skipping section divs with what regards to the block level. The change also takes care to not modify the output if `EndOfDocument` is used.
2021-09-10Ipynb reader handleData: support text/markdown (#7561)Kolen Cheung1-0/+3
`text/markdown` is now a supported mime type for raw output.
2021-09-09Use dev version of citeproc.John MacFarlane2-1/+7
2021-09-08RTF reader: support `\binN` for binary image data.John MacFarlane1-11/+22
2021-09-08App: Issue NotUTF8Encoded warning when falling back to latin1.John MacFarlane1-2/+6
2021-09-08Logging: add NotUTF8Encoded constructor to LogMessage.John MacFarlane1-0/+7
[API change]
2021-09-08CI: disable ansi-tricks in tasty.John MacFarlane1-6/+6
This will prevent the test output from being overwhelmed with headings from passing tests.
2021-09-08Makefile: disable ansi tricks for tasty; use v2- instead of new-.John MacFarlane1-9/+9
2021-09-04Rephrase pandoc.path docs (#7548)Quinn1-2/+2
2021-09-04RTF reader: better handling of `\*` and bookmarks.John MacFarlane2-9/+9
We now ensure that groups starting with `\*` never cause text to be added to the document. In addition, bookmarks now create a span between the start and end of the bookmark, rather than an empty span.
2021-09-04Minor renaming to avoid shadowing.John MacFarlane1-2/+2
2021-09-04Extensions: put Ext_short_subsuperscripts in alphabetical order.John MacFarlane1-1/+1
2021-09-04Improve order of Image fieldsQuinn1-3/+3
Ensure consistency throughout docs