aboutsummaryrefslogtreecommitdiff
path: root/changelog.md
diff options
context:
space:
mode:
Diffstat (limited to 'changelog.md')
-rw-r--r--changelog.md1059
1 files changed, 1059 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md
index 2f188a3b8..300dc0130 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,1064 @@
# Revision history for pandoc
+## pandoc 2.16.2 (2021-11-21)
+
+ * Add interface for custom readers written in Lua (#7669).
+ Users can now do `-f myreader.lua` and pandoc will treat the
+ script `myreader.lua` as a custom reader, which parses an input
+ string to a pandoc AST, using the pandoc module defined for
+ Lua filters. A sample custom reader can be found in `data/creole.lua`.
+ Also see documentation in `doc/custom-readers.md`.
+
+ * New module Text.Pandoc.Readers.Custom, exporting `readCustom` [API change].
+
+ * Allow `plain` to be used in raw attribute syntax.
+
+ * Accept empty `--metadata-file` (#7675).
+ This was a regression from 2.15 behavior.
+
+ * Markdown reader: Improve `inlinesInBalancedBrackets`.
+ This is just a small improvement in terms of performance, but it's simpler
+ and more direct code. Also, we avoid parsing interparagraph spaces in
+ balanced brackets, as the original did.
+
+ * BibTeX reader: Properly handle commented lines in BibTeX/BibLaTeX (#7668).
+
+ * RST reader: handle class attribute for for custom roles (#7699,
+ willj-dev). Previously the class attribute was ignored, and the name
+ of the role used as the class.
+
+ * DocBook reader:
+
+ + Add `<titleabbr>` support (Rowan Rodrik van der Molen).
+ + Support for `<indexterm>` (#7607, Rowan Rodrik van der Molen).
+
+ * LaTeX reader:
+
+ + Add rudimentary support for `\autoref` (#7693).
+ + Add 'uri' class when parsing `\url`, for consistency
+ with treatment of autolinks in other formats (#7672).
+
+ * JATS reader: Capture `alt-text` in figures (#7703, Aner Lucero).
+
+ * MediaWiki writer: use HTML spans for anchors when header has id (#7697).
+ We need to generate a span when the header's ID doesn't match
+ the one MediaWiki would generate automatically. Note that MediaWiki's
+ generation scheme is different from pandoc's (it uses uppercase letters,
+ and `_` instead of `-`, for example). This means that in going from
+ markdown to mediawiki, we'll now get spans before almost every heading,
+ unless explicit identifiers are used that correspond to the ones MediaWiki
+ auto-generates. This is uglier output but it's necessary for internal
+ links to work properly.
+
+ * Markdown writer: don't create autolinks when this loses information
+ (#7692). Previously we sometimes lost attributes when rendering links
+ as autolinks.
+
+ * Text.Pandoc.Readers.Metadata: allow multiple YAML documents when parsing
+ YAML for `yamlBsToRefs`. Some people use `---` as the end delimiter in
+ YAML bibliography files, which causes the `yaml` library to emit an
+ error unless we explicitly allow multiple YAML documents (and just
+ consider the first).
+
+ * JATS writer:
+
+ + Ensure figures are wrapped with `<p>` in list items
+ (Albert Krewinkel). This prevents the generation of invalid output.
+ + Add URL to element citation entries (Albert Krewinkel).
+ The URL of a reference, if present, is added in tag `<uri>` to
+ element-citation entries.
+
+ * HTML writer: Don't create invalid `data-` attribute for empty
+ attribute key (#7546).
+
+ * LaTeX writer:
+
+ + Babel mappings: use `ancientgreek` for `grc`.
+ + With `-t latex-smart`, don't generate `\ldots` from ellipsis (#7674).
+ Instead just use unicode ellipsis.
+
+ * JATS template: fix `equal-contrib` attribute (Albert Krewinkel).
+ The standard requires the value to be either `yes` or `no`, but is was
+ set to `true` for authors who contributed equally.
+
+ * reveal.js template: Add `disableLayout` variable (Christophe Dervieux).
+
+ * Text.Pandoc.Error: sort errors in `handleError` by exit code
+ (Albert Krewinkel).
+
+ * Text.Pandoc.Writers.Shared: Improve toLegacyTable (#7683,
+ Christian Despres).
+
+ * Lua subsystem:
+
+ + Include lpeg module (#7649, Albert Krewinkel). Compiles the `lpeg`
+ library (Parsing Expression Grammars For Lua) into
+ the program. Package maintainers may choose to rely on package
+ dependencies to make lpeg available, in which case they can compile
+ the with the constraint `lpeg +rely-on-shared-lpeg-library`.
+ `lpeg` and `re` are always made available in global variables,
+ without the need for a `require`.
+
+ + Set `lpeg` and `re` as globals; allow shared lib access via `require`.
+ The `lpeg` and `re` modules are loaded into globals of the respective
+ name, but they are not necessarily registered as loaded packages. This
+ ensures that
+
+ - the built-in library versions are preferred when setting the globals,
+ - a shared library is used if pandoc has been compiled without `lpeg`,
+ and
+ - the `require` mechanism can be used to load the shared library if
+ available, falling back to the internal version if possible and
+ necessary.
+
+ + Fix argument order in constructor `pandoc.Cite` (Albert Krewinkel).
+ This restores the old behavior; argument order had been switched
+ accidentally in pandoc 2.15.
+
+ + Add Pushable instance for `ReaderOptions` (Albert Krewinkel).
+
+ + Allow to pass custom reader options to `pandoc.read` as an
+ optional third argument (#7656, Albert Krewinkel).
+ The object can either be a table or a ReaderOptions value
+ like `PANDOC_READER_OPTIONS`. Creating new ReaderOptions objects is
+ possible through the new constructor `pandoc.ReaderOptions`.
+
+ + Display Pandoc values using their native Haskell representation
+ (Albert Krewinkel).
+
+ + Require latest hslua (2.0.1) (#7661, #7657, Albert Krewinkel).
+ This fixes issues with
+
+ - misleading error messages when a required function parameter is
+ omitted;
+ - absent properties still being listed in the output of `pairs`; and
+ - alias accessing leading to errors instead of returning `nil`, e.g.
+ with `(pandoc.Str '').identifier`.
+
+ + Add missing space in "package not found" message (#7658, Albert
+ Krewinkel).
+
+ * Update build files (#7696, Fabián Heredia Montiel).
+ Drop old windows 32-bit constraints.
+ Update cabal `tested-with` field to correspond to `ci.yml` matrix
+
+ * Remove unneeded package dependencies from benchmark target.
+
+ * Require ghc >= 8.6, base >= 4.12.
+ This allows us to get rid of the old custom prelude and
+ some crufty cpp. But the primary reason for this is that
+ conduit has bumped its base lower bound to 4.12, making it
+ impossible for us to support lower base versions.
+
+ * Require Cabal 2.4. Use wildcards to ensure that all pptx tests are
+ included (#7677).
+
+ * Update `bash_completion.tpl` (S.P.H.).
+
+ * Add `data/creole.lua` as sample custom reader.
+
+ * Add `doc/custom-readers.md` and `doc/custom-writers.md`.
+
+ * `doc/lua-filters.md`: add section on global modules, including lpeg
+ (Albert Krewinkel).
+
+ * `MANUAL.txt`: update table of exit codes and corresponding errors
+ (Albert Krewinkel).
+
+ * Use latest texmath.
+
+## pandoc 2.16.1 (2021-11-02)
+
+
+ * Docx reader: don't let first line indents trigger block quotes (#7655).
+ This fixes a regression introduced in pandoc 2.15.
+
+ * Docx writer: use `getTimestamp` for modification times in
+ reference.docx (#7654). This ensures that when `SOURCE_DATE_EPOCH` is
+ set, the modification times of files taken from the reference.docx will
+ be set deterministically, allowing for reproducible builds.
+
+ * Lua subsystem (Albert Krewinkel):
+
+ + Load module `pandoc.path` on startup (#7524). Previously the module
+ always had to be loaded via `require 'pandoc.path'`.
+ + Fix typo in SoftBreak constructor.
+ + Re-add `content` property to Strikeout elements.
+ Fixes a regression introduced in 2.15.
+ + Be more forgiving when retrieving the Image `caption` property.
+ Fixes a regression introduced in 2.15.
+ + Display Attr values using their native Haskell representation.
+ + Allow omitting the 2nd parameter in pandoc.Code constructor.
+ Fixes a regression introduced in 2.15 which required users to always
+ specify an Attr value when constructing a Code element.
+ + Allow to compare, show Citation values. Comparisons of Citation
+ values are performed in Haskell; values are equal if they represent
+ the same Haskell value. Converting a Citation value to a string
+ now yields its native Haskell string representation.
+ + Restore List behavior of MetaList (#7650). Fixes a regression
+ introduced in 2.16 which had MetaList elements lose
+ the `pandoc.List` properties.
+ + Restore `content` property on Header elements.
+ + Ensure Block elements have all expected properties.
+ + Ensure Inline elements have all expected properties.
+
+ * Allow tasty-bench 0.3.x.
+
+## pandoc 2.16 (2021-10-31)
+
+ * Switch back from HsYAML to yaml for parsing YAML metadata (#6084).
+ HsYAML is around 20 times slower in parsing large YAML bibliographies.
+ In addition, HsYAML is not being actively maintained. This sets us back
+ in our attempts to free ourselves from C dependencies (#4535). But I
+ don't see a good alternative until a faster pure Haskell parser is available.
+ 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 instead of having a dedicated From/ToYAML class.)
+ + 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 in a more useful way when the YAML metadata contains
+ escaping errors: instead of just failng silently and falling back to
+ some other interpretation of the section, it raises a YAML parsing error.
+
+ * Markdown writer: Ensure that special values are quoted in YAML metadata.
+ These include "Y", "yes", "on", and "off", which are now (with yaml library)
+ considered boolean values, as well as "null".
+
+ * Change JSON encodings of some types.
+
+ + For LineEnding use lowercase constructors, e.g. `crlf`, `native`.
+ + For HTMLSlideVariant use lowercase constructors.
+ + For ReaderOptions use e.g. `default-image-extension`
+ instead of `readerDefaultImageExtension` for field names.
+ + For Extension, use e.g. `tex_math_dollars` instead of
+ `Ext_tex_math_dollars` as constructor.
+ + For Extensions, use an array of Extensions, instead of
+ an object wrapping the tag `Extensions` and an integer.
+ (The integer representation is not supposed to be part of the
+ public API.)
+ + For Opt, use field names like `tab-stop` instead of `optTabStop`.
+
+ * Docx writer:
+
+ + Add IDs to native_numbering test (Tristan Stenner).
+ + Move ": " out of the caption bookmark (Tristan Stenner).
+ This is needed so that native references to the figure are included as
+ "As seen in Figure X, it is..." instead of "As seen in [Figure: X, it is..."
+
+ * Lua (Albert Krewinkel, except as noted):
+
+ + Use hslua module abstraction where possible.
+ + Fix placement of tests for Block elements in pandoc module tests
+ + Increase strictness when getting attribute keys
+ + Re-add `t` and `tag` property to Attr values.
+ Removal of these properties from Attr values was a regression.
+ + Fix `pandoc.utils.stringify` regression. The `pandoc.utils.stringify`
+ function returned empty strings when called with a string argument.
+ + Fix a copy/paste bug in Lua marshalling code (John MacFarlane, #7639).
+ This caused links to be changed to figures when Lua filters changed
+ link properties.
+ + Re-add `content` property to Link elements (#7647).
+ This was a regression introduced in version 2.15.
+ + Generate constants in module pandoc programmatically.
+ + Marshal SimpleTable, ListAttributes, Citation, and Block values as
+ userdata objects. Properties of Block values are marshalled lazily,
+ which generally improves performance considerably. Script users may also
+ notice the following differences:
+
+ - Block element properties can no longer be accessed by numerical
+ indexing of the `.c` field. The `.c` property now serves as an alias
+ for `.content`, so some filter that used this undocumented method
+ for property access may continue to work, while others will need to
+ be updated and use proper property names.
+ - The marshalled Block elements now have a `show` method, and a
+ `__tostring` metamethod. Both return the Haskell string
+ representation of the element.
+ - Block values now have the Lua type `userdata` instead of `table`.
+
+ * Add a short guide to pandoc's sources (Albert Krewinkel).
+
+ * Fix epub files in epub reader tests, so that they are valid
+ according to epubcheck (#7586).
+
+ * Allow time 1.13.
+
+ * Require latest skylighting (0.12.1).
+
+ * Fix build on GHC 9.2 (Joseph C. Sible).
+
+ * Fix trypandoc so it builds with aeson > 2.
+
+
+## pandoc 2.15 (2021-10-23)
+
+ * Add `--sandbox` option (#5045).
+
+ + Add sandbox feature. 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.
+
+ * `--self-contained`: Fix bug that caused everything to be made a data
+ URI (#7635, #7367). We only need to use data URIs in certain cases, but
+ due to a bug they were being used always.
+
+ * Pandoc will now fall back to latin1 encoding for inputs that can't be
+ read as UTF-8. This is what it did previously for content fetched
+ from the web and not marked as to content type. It makes sense to do
+ the same for local files. In this case a `NotUTF8Encoded` warning
+ will be issued, indicating that pandoc is interpreting the input as latin1.
+
+ * Markdown reader:
+
+ + Don't parse links or bracketed spans as citations (#7632).
+ Previously pandoc would parse `[link to (@a)](url)` as a
+ citation; similarly `[(@a)]{#ident}`. This is undesirable. One should
+ be able to use example references in citations, and even if `@a` is
+ not defined as an example reference, `[@a](url)` should be a link
+ containing an author-in-text citation rather than a normal citation
+ followed by literal `(url)`.
+ + Fix interaction of `--strip-comments` and list parsing (#7521).
+ Use of `--strip-comments` was causing tight lists to be rendered as
+ loose (as if the comment were a blank line).
+ + Fix parsing bug for math in bracketed spans and links (#7623).
+ This affects math with unbalanced brackets (e.g. `$(0,1]$`)
+ inside links, images, bracketed spans.
+ + Fix code blocks using `--preserve-tabs` (#7573). Previously they
+ did not behave as the equivalent input with spaces would.
+
+ * DocBook reader:
+
+ + Honor linenumbering attribute (Samuel Tardieu).
+ The attribute DocBook `linenumbering="numbered"` on code blocks
+ maps to the `numberLines` class internally.
+
+ * LaTeX reader:
+
+ + Implement siunitx v3 commands (#7614).
+ We support `\unit`, `\qty`, `\qtyrange`, and `\qtylist`
+ as synonynms of `\si`, `\SI`, `\SIrange`, and `\SIlist`.
+ + Properly handle `\^` followed by group closing (#7615).
+ + Recognize that `\vadjust` sometimes takes "pre" (#7531).
+ + Ignore (and gobble parameters of) CSLReferences environment (#7531).
+ Otherwise we get the parameters as numbers in the output.
+ + Restrict `\endinput` to current file (Simun Schuster).
+
+ * RST reader: handle escaped colons in reference definitions (#7568).
+
+ * HTML reader:
+
+ + Handle empty tbody element in table (#7589).
+
+ * Ipynb reader (Kolen Cheung):
+
+ + Get cell output mime from `raw_mimetype` in addition to `format`.
+ (`format` is what the spec calls for, but `raw_mimetype` is
+ often used in practice; see jupyter/nbformat#229).
+ + Add more formats that can be handled as "raw" cells.
+ + Fix mime type for `rst`.
+ + Support `text/markdown`, which is now a supported mime type for raw
+ output (#7561).
+
+ * RTF reader:
+
+ + Support `\binN` for binary image data.
+ + If doc begins with {\rtf1 ... } only parse its contents.
+ Some documents seem to have non-RTF (e.g. XML) material after the
+ `{\rtf1 ... }` group.
+ + Ignore `\pgdsc` group. Otherwise we get style names treated as test.
+ + Better handling of `\*` and bookmarks. 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.
+
+ * Docx reader:
+
+ + Avoid blockquote when parent style has more indent (Milan Bracke).
+ When a paragraph has an indentation different from the parent (named)
+ style, it used to be considered a blockquote. But this only makes sense
+ when the paragraph has more indentation. So this commit adds a check
+ for the indentation of the parent style.
+ + Fix handling of empty fields (Milan Bracke). Some fields only
+ have an `instrText` and no content, Pandoc didn't understand these,
+ causing other fields to be misunderstood because it seemed like
+ a field was still open when it wasn't.
+ + Implement PAGEREF fields (Milan Bracke). These fields, often used
+ in tables of contents, can be a hyperlink.
+ + Fix handling of nested fields (Milan Bracke). Fields delimited by
+ `fldChar` elements can contain other fields. Before, the nested
+ fields would be ignored, except for the end, which would be
+ considered the end of the parent field.
+ + Add placeholder for word diagram instead of just omitting it (Ezwal).
+
+ * Org reader:
+
+ + Don't parse a list as first item in a list item (#7557).
+ + Allow an initial `:PROPERTIES:` drawer to add to metadata (#7520).
+
+ * Docx writer:
+
+ + Make id used in `native_numbering` predictable (#7551).
+ If the image has the id IMAGEID, then we use the id ref_IMAGEID
+ for the figure number. 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>`.
+ If an image lack an id, an id of the form `ref_fig1` is used.
+ + Ensure we have unique ids for `wp:docPr` and `pic:cNvPr` elements
+ (#7527, #7503).
+ + Handle SVG images (#4058). This change has several parts:
+ - In Text.Pandoc.App, if the writer is docx, we fill the media
+ bag and attempt to convert any SVG images to PNG, adding these
+ to the media bag. The PNG backups have the same filenames as
+ the SVG images, but with an added .png extension. If the conversion
+ cannot be done (e.g. because rsvg-convert is not present),
+ a warning is omitted.
+ - In Text.Pandoc.Writers.Docx, we now use Word 2016's syntax for
+ including SVG images. If a PNG fallback is present in the media bag,
+ we include a link to that too.
+
+ * Powerpoint writer (Emily Bourke):
+
+ + Add support for more layouts (#5097). Up til now, four layouts
+ were supported: "Title Slide" (used for the automatically generated
+ metadata slide), "Section Header" (used for headings above slide
+ level), "Two Column" (used when there's a columns div), "Title and
+ Content" (used for all other slides). We now support three
+ additional layouts: "Comparison", "Content with Caption", and
+ "Blank". The manual describes the logic that determines which
+ layout is used for a slide. Layouts may be customized in the
+ reference doc.
+ + Support specifying slide background images using a `background-image`
+ attribute on the slide's heading. 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.
+ + Add support for incremental lists (through same methods as in
+ other slide writers) (#5689).
+ + Copy embedded fonts from reference doc.
+ + Include all themes in output archive.
+ + Fix list level numbering (#4828, #4663). 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. Previously, the writer incremented the paragrap
+ h level on each list, turning what should be top-level lists into
+ second-level lists.
+ + Line up list continuation paragraphs. This commit
+ changes the `marL` and `indent` values used for plain paragraphs
+ and numbered lists, and changes the spacing defined in the
+ reference doc master for bulleted lists. For paragraphs, there is
+ now a left-indent taken from the `otherStyle` in the master.
+ For numbered lists, the number is positioned where the text would be
+ if this were a plain paragraph, and the text is indented to the next
+ level. This means that continuation paragraphs line up nicely with
+ numbered lists. Existing reference docs may need to be modified so
+ that `otherStyle` and `bodyStyle` indent levels match, for this
+ feature to work with them.
+ + Consolidate text runs when possible (jgm). This slims down the output
+ files by avoiding unnecessary text run elements.
+ + Support footers in the reference doc.
+ 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.
+ + Fix presentation rel numbering. Before now, the numbering of `rId`s
+ was inconsistent when making the presentation XML and when making
+ the presentation relationships XML.
+ + Don’t add relationships unnecessarily. 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.
+ + If slide level is 0, don't insert a slide break between a heading
+ and a following table, "columns" div, or paragraph starting
+ with an image.
+ + Fix capitalisation of `notesMasterId`.
+ + Restructure tests.
+
+ * Asciidoc writer:
+
+ + Translate numberLines attribute to `linesnum` switch (Samuel Tardieu).
+ + Improve escaping for `--` in URLs (#7529).
+
+ * LaTeX writer:
+
+ + Make babel use more idiomatic (#7604, hseg). Use babel's
+ bidi implementation. Import babel languages individually instead
+ of as package options. Move `header-includes` to after
+ `babel` setup so it can be modified.
+ + Use babel, not polyglossia, with xelatex. 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.
+
+ * Markdown writer:
+
+ + Avoid bad wraps at the Doc Text level. Previously we tried to
+ do this at the Inline list level, but it makes more sense to
+ intervene on breaking spaces at the Doc Text level.
+ + Use `underline` class rather than `ul` for underline.
+ 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.
+
+ * RST writer:
+
+ + Properly handle anchors to ids with spaces or leading underscore
+ (#7593). In this cases we need the quoted form, e.g.
+ ```
+ .. _`foo bar`:
+
+ .. _`_foo`:
+ ```
+ Side note: rST will "normalize" these identifiers anyway,
+ ignoring the underscore.
+
+ * HTML writer:
+
+ + Render `\ref` and `\eqref` as inline math, not display (see #7589).
+ + Pass through `\ref` and `\eqref` if MathJax is used (#7587).
+ + Pass through inline math environments with KaTeX.
+ + Support `--reference-location` for HTML output (#7461,
+ Francesco Mazzoli).
+ + Set "hash" to True by default (for reveal.js) (#7574). See #6968
+ where the motivation for setting "hash" to True is explained.
+
+ * Native writer: Use pretty-show to format native output (#7580).
+ Previously we used our own homespun formatting. But this produces
+ over-long lines that aren't ideal for diffs in tests.
+ 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.)
+
+ * Org writer:
+
+ + Don't indent contents of code blocks. 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.
+ + Update list of supported source languages in org writer (#5440).
+
+ * Ipynb writer (Kolen Cheung):
+
+ + Improve round trip identity for raw cell output.
+ See jupyter/nbformat#229. 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. The new behavior should matche the real world usage better,
+ hence improving the round-trip "identity" in raw-cell.
+ + Add more formats that can be handled as "raw" cells.
+
+ * EPUB writer:
+
+ + Add EPUB3 subject metadata (authority/term) (nuew).
+ This adds the ability to specify EPUB 3 `authority` and `term` specific
+ refinements to the `subject` tag. Specifying a plain `subject` tag in
+ metadata will function as before.
+ + Treat epub:type "frontispiece" as front matter (#7600).
+
+ * reveal.js template: Fix line numbers in source code (#7634).
+ We need `overflow: visible` for these to work, and reveal's
+ default css disables this. So we re-enable it in the default template.
+
+ * Text.Pandoc.Writers.Shared:
+
+ + Export `splitSentences` as a Doc Text transform [API change].
+ Use this in man/ms. We used to attempt automatic sentence
+ splitting in man and ms output, since sentence-ending
+ periods need to be followed by two spaces or a newline in
+ these formats. But it's difficult to do this reliably at
+ the level of `[Inline]`.
+
+ * Text.Pandoc.Translations: small revisions for compatibility
+ with aeson 2.
+
+ * Don't prepend `file://` to `--syntax-definition` on Windows (#6374).
+ This was a fix for a problem in skylighting, but this
+ problem doesn't exist now that we've moved from HXT to xml-conduit.
+
+ * Text.Pandoc.Extensions:
+
+ + Add `Ext_footnotes` to default `gfm` etxensions. Now `gfm`
+ supports footnotes.
+ + Alphabetize Extension constructors (also affects `--list-extensions`).
+
+ * Text.Pandoc.Citeproc.Util: Better implementation of `splitStrWhen`.
+ Previously the citeproc code had two less efficient
+ implementations.
+
+ * Update documentation for definition_list extension (#7594).
+ In 2015, we relaxed indentation requirements for the first
+ line of a definition (see commit d3544dc and issue #2087), but
+ the documnentation wasn't updated to reflect the change.
+
+ * Text.Pandoc.Citeproc.BibTeX: Fix expansion of special strings in series
+ e.g. `newseries` or `library` (#7591). Expansion should not happen
+ when these strings are protected in braces, or when they're
+ capitalized.
+
+ * Text.Pandoc.Logging: add `NotUTF8Encoded` constructor to `LogMessage`
+ [API change].
+
+ * Text.Pandoc.App.FormatHeuristics: remove `.tei.xml` extension for TEI
+ (#7630). This never worked, because `takeExtension`
+ only returns `.xml`. So it won't be missed if we remove it.
+
+ * Text.Pandoc.Image:
+
+ + Generalize `svgToPng` to MonadIO.
+ + `svgToPng`, change first parameter from WriterOptions to Int.
+
+ * Text.Pandoc.Class:
+
+ + Add `readStdinStrict` method to PandocMonad [API change].
+ + Generalize type of `extractMedia` [API change].
+ It was uselessly restricted to PandocIO, instead of any
+ instance of PandocMonad and MonadIO.
+
+ * Text.Pandoc.Class.PandocIO: derive MonadCatch, MonadThrow, MonadMask.
+ This allows us to use `withTempDir` [API change].
+
+ * Add module Text.Pandoc.Class.Sandbox, defining
+ `sandbox`. Exported via Text.Pandoc.Class. [API change]
+
+ * Text.Pandoc.Filter: Generalize type of `applyFilters`
+ from PandocIO to any instance of MonadIO and PandocMonad [API change].
+
+ * Text.Pandoc.PDF: generalize type of `makePDF`:
+ instead of PandocIO, it can be used in any instance of
+ PandocMonad, MonadIO, and MonadMask [API change].
+
+ * Lua subsystem and custom writers: generalize types from PandocIO
+ to any instance of PandocMonad and MonadIO [API change].
+ The type of `runLua` is now
+
+ (PandocMonad m, MonadIO m) =>
+ LuaE PandocError a -> m (Either PandocError a)
+
+ The change from `Lua` to `LuaE PandocError` is due to the switch to
+ hslua-2.0; see next item.
+
+ * Lua modules (Albert Krewinkel):
+
+ + Switch to hslua-2.0. 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.
+ + Marshal Version values, Inline elements, Attr elements,
+ and Pandoc elements as userdata.
+ + Remove deprecated inline constructors `DoubleQuoted`,
+ `SingleQuoted`, `DisplayMath`, and `InlineMath`.
+ + Attr values are no longer normalized when assigned to an Inline
+ element property.
+ + It's no longer possible to access parts of Inline elements via
+ numerical indexes. E.g., `pandoc.Span('test')[2]` used to give
+ `pandoc.Str 'test'`, but yields `nil` now. This was undocumented
+ behavior not intended to be used in user scripts. Use named properties
+ instead.
+ + Accessing `.c` to get a JSON-like tuple of all components no longer
+ works. This was undocumented behavior.
+ + Only known properties can be set on an element value. Trying to set a
+ different property will now raise an error.
+ + 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.
+ + Convert IOErrors to PandocErrors in `pandoc.pipe` function (#7523).
+
+ * Text.Pandoc.PDF: Previously we had to run `runIOorExplode` inside
+ `withTempDir`. Now that PandocIO is an instance of MonadMask, this is
+ no longer necessary.
+
+ * Text.Pandoc.App:
+
+ + Reorganize to make it easier to limit IO in main loop.
+ Previously we used liftIO fairly liberally. The code has
+ been restructured to avoid this.
+ + Move output-file writing out of PandocMonad action.
+
+ * Text.Pandoc.App.OutputSettings: Generalize some types
+ so we can run this with any instance of PandocMonad and MonadIO,
+ not just PandocIO.
+
+ * Use `simpleFigure` builder in readers and `SimpleFigure`
+ pattern synonym in writers (Aner Lucero).
+
+ * Allow time 1.12.
+
+ * Use skylighting-0.12, skylighting-core-0.12.
+ This fixes highlighting issues with typescript, scala, and other
+ syntaxes that include keyword lists from different syntaxes.
+
+ * Use citeproc 0.6, commonmark 0.2.2.1, commonmark-extensions 0.2.2,
+ texmath 0.12.3.2, ipynb 0.1.0.2. (These changes also allow
+ building with aeson >= 2.)
+
+ * Require doclayout >= 0.3.1.1. This fixes recognition of "real widths"
+ of emoji characters, which is important for tabular layout.
+
+ * Cut out over 100K of fat in epub test golden files.
+
+ * Make `test/epub/wasteland.epub` valid.
+
+ * Add missing `%` on some command tests.
+ This prevented `--accept` from working properly.
+
+ * Command tests: raise error if command doesn't begin with `%`.
+
+ * OOXML tests: use pretty-printed form to display diffs.
+ Otherwise everything is on one line and the diff is uninformative.
+
+ * Fix compareXML helper in Tests.Writers.OOXML.
+ Given how it is used, we were getting "mine" and "good"
+ flipped in the test results.
+
+ * MANUAL.txt:
+
+ + Clarify `attributes` extension support (William Lupton).
+ + Document formats affected by `--reference-location`.
+ + Document error code 25
+ + Add some more info regarding `--slide-level=0` (Salim B).
+ + Add more to security section of manual.
+ + Mention support of `title-toc` (#7171, Christophe Dervieux).
+
+ * doc/lua-filters.md:
+
+ + Add missing type for Image title (Quinn).
+ + Improve order of Image fields (Quinn).
+ + Rephrase pandoc.path docs (#7548, Quinn).
+ + Do not leak working directory in TikZ filter (Jeroen de Haas).
+
+## pandoc 2.14.2 (2021-08-21)
+
+ * Allow `--slide-level=0` (#7476). When the slide level is set
+ to 0, headings won't be used at all in splitting the document
+ into slides. Horizontal rules must be used to separate slides.
+
+ * Add RTF reader (#3982). `rtf` is now supported as an input
+ format as well as an output format. New module
+ Text.Pandoc.Readers.RTF (exporting `readRTF`). [API change]
+
+ * HTML reader: treat comments as blank when parsing (#7482).
+
+ * Markdown reader:
+
+ + Fix raw LaTeX injection issue (#7497). Using a code block
+ containing `\end{verbatim}`, one could inject raw TeX into a
+ LaTeX document even when `raw_tex` is disabled. Thanks to
+ Augustin Laville for noticing the bug.
+ + Multimarkdown sub- and superscripts (#5512, OCzarnecki).
+ Added an extension `short_subsuperscripts` which modifies
+ the behavior of `subscript` and `superscript`, allowing
+ subscripts or superscripts containing only alphanumerics
+ to end with a space character (eg. `x^2 = 4` or `H~2 is
+ combustible`). This improves support for multimarkdown.
+
+ * RST reader: Fix `:literal:` includes (#7513). These should create
+ code blocks, not insert raw RST.
+
+ * LaTeX reader:
+
+ + Proper implicit grouping around environment macros.
+ + Support `\global` before `\def`, `\let`, etc. (#7494).
+ + Fix scope for LaTeX macros (#7494). They should by default
+ scope over the group in which they are defined (except `\gdef`
+ and `\xdef`, which are global). In addition, environments must
+ be treated as groups.
+ + Improve handling of plain TeX macro primitives (#7474).
+ Fixed semantics for `\let`.
+ + Implement `\edef`, `\gdef`, and `\xdef`.
+
+ * Docx reader: Improve docx reader's robustness in extracting
+ images (#7511). The docx reader made some assumptions about
+ how docx containers were laid out that were not always true, with
+ the result that some images in documents did not get
+ extracted.
+
+ * LaTeX writer: Increase table column width precision (#7466,
+ Peter Fabinski). In some cases, the rounding performed by the
+ LaTeX table writer would introduce visible overrun outside
+ the text area. This adds two more decimal places to the width
+ values.
+
+ * Powerpoint writer:
+
+ + Include image title in description (#7352, Emily Bourke). The
+ image title (i.e. `![alt text](link "title")`) was previously
+ ignored when writing to pptx. This commit includes it in
+ PowerPoint's description of the image, along with the link.
+ + Select layouts from reference doc by name (Emily Bourke). Until
+ now, users had to make sure that their reference doc contains
+ layouts in a specific order: the first four layouts in the file
+ had to have a specific structure. Now the layout selection uses
+ the layout names rather than order: users must make sure their
+ reference doc contains four layouts with specific names, and if
+ a layout with the right name isn’t found pandoc will emit
+ a warning and use the corresponding layout from the default
+ reference doc as a fallback.
+
+ * Docx writer: be sensitive to the `native_numbering` extension
+ (#7499). Figure and table numbers are now only included if
+ `native_numbering` is enabled. (By default it is disabled.)
+ This is a behavior change with respect to 2.14.1, but the
+ default behavior is now that of previous versions. The
+ change was necessary to avoid incompatibilities between
+ pandoc's native numbering and third-party cross reference
+ filters like pandoc-crossref.
+
+ * RTF writer:
+
+ + Omit `\bin` in `\pict`. According to the spec, this is not
+ needed or wanted when the data is in hexadecimal format, as
+ here.
+ + Emit `\outlinelevel`` for section headings.
+
+ * RTF template: specify font family for fixed-width font f1.
+ According to the spec, this is mandatory.
+
+ * LaTeX writer: Use ulem for underline (#7351). ulem is
+ conditionally included already when the `strikeout` variable
+ is set, so we set this when there is underlined text, and use
+ `\uline` instead of `\underline`. This fixes wrapping for
+ underlined text.
+
+ * Text.Pandoc.Citeproc:
+
+ + Revise citeproc code to fit new citeproc 0.5 API (thanks to
+ Benjamin Bray). Linkification of URLs in the bibliography
+ is now done in the citeproc library, depending on the
+ setting of an option. We set that option depending on the
+ value of the metadata field `link-bibliography` (defaulting
+ to true, for consistency with earlier behavior). If a DOI,
+ PMID, PMCID, or URL field is present but not explicitly
+ rendered, the title (or if no title, the whole entry) is
+ hyperlinked. These changes implement the recommendations
+ from the draft CSL v1.0.2 spec (Appendix VI):
+ <https://github.com/citation-style-language/documentation/blob/master/specification.rst#appendix-vi-links>
+ + Avoid odd handling of quotes. Recent citeproc changes
+ allow us to ignore Quoted elements; citeproc now uses its own
+ method for represented quoted things, and only localizes and
+ flipflops quotes it adds itself. Convert Quoted in bib
+ entries to special Spans before passing them off to
+ citeproc. This ensures that we get proper localization and
+ flipflopping if, e.g., quotes are used in titles
+ (jgm/citeproc#87).
+ + Removed quote localization from citeproc processing.
+ This is now done in citeproc itself.
+
+ * Text.Pandoc.Logging: Add PowerpointTemplateWarning log message
+ type [API change] (Emily Bourke).
+
+ * Text.Pandoc.Extension: Add `Ext_short_subsuperscripts`
+ constructor to `Extension` [API change] (OCzarnecki).
+
+ * Various sample.lua editorial fixes (#7493, #7487, William
+ Lupton).
+
+ * Bump base-compat version so we get compatibility with base 4.12.
+
+ * Use Prelude from base-compat for ghc 8.4 too.
+
+ * Add haskell-language-server to shell.nix (#7496, Emily Bourke).
+
+ * Tests.Helpers: export testGolden and use it in RTF reader.
+ This gives a diff output on failure.
+
+ * Remove obsolete and incorrect sentence in `--slide-level` docs.
+
+ * Add internal module Text.Pandoc.Network.HTTP, exporting
+ `urlEncode`.
+
+ * Text.Pandoc.Parsing: `parseFromString`: preserve at least
+ the source directory (#7464). Previously we just set the
+ source name to "chunk" when parsing from strings, to avoid
+ misleading source positions. This had the side effect that
+ `rebase_relative_paths` would break inside sections that
+ were parsed as strings. So, now we use
+ "ORIGINAL_SOURCE_PATH_chunk" instead of just "chunk".
+
+ * Text.Pandoc.MIME: use image/x-xcf instead of application/x-xcf
+ (#7454).
+
+ * Don’t compare `cdLine` in OOXML golden tests (Emily Bourke).
+ The `cdLine` field gives the line of the file some CData was
+ found on, which reflects irrelevant formatting differences.
+
+ * Provide more detailed XML diff in tests (Emily Bourke).
+
+ * OOXML tests: silence warnings. These can make the test output
+ confusing, making people think tests are failing when they're
+ passing.
+
+ * INSTALL.md: Add GitLab CI/CD example (#7448, Veratyr).
+
+ * MANUAL.txt
+
+ - Clarifications (William Lupton).
+ - Add a note on security risks of include directives.
+
+ * Document use of the 'underline' class (#7492, #7484, William
+ Lupton).
+
+ * Add a FAQ about the "Cannot allocate memory" error on M1 macs.
+
+ * Use texmath 0.12.3.1.
+
+ * Use released citeproc 0.5.
+
+ * Remove dependency on HTTP package (#7456, mt_caret).
+
+## pandoc 2.14.1 (2021-07-18)
+
+ * Text.Pandoc.ImageSize: Add Tiff constructor for ImageType (#7405)
+ [Minor API change]. This allows pandoc to get size information from
+ tiff images.
+
+ * Markdown reader: don't try to read contents in self-closing HTML tag.
+ Previously we had problems parsing raw HTML with self-closing
+ tags like `<col/>`. The problem was that pandoc would look
+ for a closing tag to close the markdown contents, but the
+ closing tag had, in effect, already been parsed by `htmlTag`.
+
+ * LaTeX reader:
+
+ + Avoid trailing hyphen in translating languages (#7447).
+ Previously `\foreignlanguage{english}` turned into `<span lang="en-">`.
+ The same issue affected Arabic.
+ + Support `\cline` in LaTeX tables (#7442).
+ + Improved parsing of raw LaTeX from Text streams (`rawLaTeXParser`,
+ used to read LaTeX in Markdown files, #7434). We now use source
+ positions from the token stream to tell us how much of the text stream
+ to consume. Getting this to work required a few other changes to
+ make token source positions accurate.
+
+ * DocBook reader:
+
+ + Handle images with imageobjectco elements (#7440).
+ + Add support for citerefentry (#7437, Jan Tojnar).
+
+ * RST reader: fix regression with code includes (#7436).
+ With the recent changes to include infrastructure,
+ included code blocks were getting an extra newline.
+
+ * HTML reader:
+
+ + Recognize data-external when reading HTML img tags (#7429,
+ Michael Hoffmann). Preserve all attributes in img tags. If attributes
+ have a `data-` prefix, it will be stripped. In particular, this
+ preserves a `data-external` attribute as an `external` attribute in
+ the pandoc AST.
+ + Add col, colgroup to 'closes' definitions
+
+ * HTML writer:
+
+ + Remove duplicated alt text in HTML output (Aner Lucero).
+ + Remove `aria-hidden` when explicit alt text is provided (Aner Lucero).
+ + Set boolean values for reveal.js variables.
+
+ * Docx writer:
+
+ + Add table numbering for captioned tables.
+ The numbers are added using fields, so that Word can
+ create a list of tables that will update automatically.
+ + Support figure numbers. These are set up in such a way that they
+ will work with Word's automatic table of figures (#7392).
+
+ * Markdown writer: put space between Plain and following fenced Div
+ (#4465).
+
+ * EPUB writer: Don't incorporate externally linked images in EPUB documents
+ (#7430, Michael Hoffmann). Just as it is possible to avoid incorporating
+ an image in EPUB by passing `data-external="1"` to a raw HTML snippet,
+ this makes the same possible for native Images, by looking for an
+ associated `external` attribute.
+
+ * Text.Pandoc.PDF:
+
+ + Fix `svgIn` path error (#7431). We were duplicating
+ the temp directory; this didn't cause problems on macOS or linux
+ because there we use absolute paths for the temp directory.
+ But on Windows it caused errors converting SVG files.
+ + `convertImage`: normalize paths (#7431). This will avoid paths
+ on Windows with mixed path separators.
+
+ * Text.Pandoc.Class: Always use / when adding directory to image destination
+ with `extractMedia`, even on Windows.
+
+ * Text.Pandoc.Citeproc:
+
+ + Allow `$` characters in bibtex keys (#7409).
+ + Set proper initial source name in parsing BibTeX (for better error
+ messages.)
+ + Revamp note citation handling (#7394). Use latest
+ citeproc, which uses a Span with a class rather than a Note for notes.
+ This helps us distinguish between user notes and citation notes. Don't
+ put citations at the beginning of a note in parentheses. Fix small bug
+ in handling of citations in notes, which led to commas at the end of
+ sentences in some cases.
+ + Cleanup and efficiency improvement in `deNote`.
+ + Improve punctuation moving with `--citeproc`. Previously, using
+ `--citeproc` could cause punctuation to move in quotes even when
+ there aer no citations. This has been changed; punctuation moving
+ is now limited to citations. In addition, we only move footnotes
+ around punctuation if the style is a note style, even if
+ `notes-after-punctuation` is `true`.
+
+ * Use citeproc 0.10. This helps improve note citations (see above)
+ and eliminates double hyperlinks in author-in-text citations.
+ Author-only citations are no longer hyperlinked. See jgm/citeproc#77.
+ It also fixes moving of punctuation inside quotes to conform to
+ the CSL spec: only comma and period are moved, not question
+ mark or exclamation point.
+
+ * Text.Pandoc.Error: fix line calculations in reporting parsec errors.
+ Also remove a spurious initial newline in the error report.
+
+ * Use doctemplates 0.4.1, which gives us better support for boolean
+ variable values. Previously `$if(foo)$` would evaluate to true
+ for variables with boolean `false` values, because it cared only
+ about the string rendering (#7402).
+
+ * Require commonmark-pandoc >= 0.2.2.1.
+ This fixes task lists with multiple paragraphs.
+
+ * Use skylighting 0.11.
+
+ * CSS in HTML template: reset overflow-wrap on code blocks
+ (Mauro Bieg, #7423).
+
+ * LaTeX template: Revert change in PR #7295: "move title, author, date up
+ to top of preamble." The change caused problem for people who used
+ LaTeX commands defined defined later in the preamble in the title
+ or author fields (#7422).
+
+ * Add `doc/faqs.md`. This is imported from the website; in the future the
+ website version will be drawn from here.
+ Added a FAQ on the use of `\AtEndPreamble` for cases when the contents of
+ `header-includes` need to refer to definitions that come later in the
+ preamble. See #7422.
+
+ * Upgrade Debian 10 AMI for build-arm.sh.
+
+ * CircleCI: change to using xcode 11.1.0 (macOS 10.14.4).
+ We previously built on 10.13, but 10.13 no longer gets
+ security updates and CirclCI is deprecating.
+
## pandoc 2.14.0.3 (2021-06-22)
* Text.Pandoc.MediaBag `insertMediaBag`: ensure we get a sane mediaPath