aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-09-23HTML reader: handle empty tbody element in table.John MacFarlane2-5/+81
Closes #7589.
2021-09-23HTML writer: render `\ref` and `\eqref` as inline math...John MacFarlane1-8/+11
not display. See #7589.
2021-09-22HTML writer: pass through `\ref` and `\eqref`...John MacFarlane1-2/+10
if MathJax is used. Closes #7587.
2021-09-22HTML writer: pass through inline math environments with KaTeX.John MacFarlane1-0/+1
2021-09-22Use latest citeproc.John MacFarlane1-1/+1
2021-09-21test/epub: an excerpt from The Wasteland is enough!John MacFarlane2-7920/+20
Saves over 100K.
2021-09-21Revert "Remove unused epub test file features.epub."John MacFarlane1-0/+0
This reverts commit 83ebb85b640c9dffbc931a6aa84ecb0574c5693d.
2021-09-21Make test/epub/wasteland.epub valid.John MacFarlane1-0/+0
2021-09-21Remove unused epub test file features.epub.John MacFarlane1-0/+0
2021-09-21Use pretty-simple to format native output.John MacFarlane269-11857/+65524
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-21Add missing `%` on command tests.John MacFarlane35-52/+51
This prevented `--accept` from working properly.
2021-09-21Command tests: raise error if command doesn't begin with `%`.John MacFarlane1-5/+7
2021-09-20Stop doing lint in CI.John MacFarlane1-1/+1
The script failed for reasons I can't determine. For now, we disable it.
2021-09-19LaTeX reader: Recognize that `\vadjust` sometimes takes "pre".John MacFarlane1-0/+7
Closes #7531.
2021-09-19Ignore (and gobble parameters of) CSLReferences environment.John MacFarlane1-0/+1
Otherwise we get the parameters as numbers in the output. Closes #7531.
2021-09-19Use babel, not polyglossia, with xelatex.John MacFarlane6-151/+31
Previously polyglossia worked better with xelatex, but that is no longer the case, so we simplify the code so that babel is used with all latex engines. This involves a change to the default LaTeX template.
2021-09-19Fix changelog date for 2.14.2.John MacFarlane1-1/+1
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/