jgm/pandoc: pandoc 2.7
- John MacFarlane
- Jesse Rosenthal
- Alexander
- Albert Krewinkel
- Matthew Pickering
- Mauro Bieg
- Andrew Dunning1
- Nikolay Yakimov2
- Kolen Cheung3
- Yan Pashkovsky
- Václav Haisman
- Marc Schreiber
- Nathan Gass
- Fedor Sheremetyev
- Thomas Hodgson
- Mark Wright
- Brian Leung
- Francesco Occhipinti
- Artyom Kazak4
- hftf
- Hubert Plociniczak
- Daniel Bergey
- Aditya Mahajan
- Pascal Wagler
- Xavier Olive5
- Jose Luis Duran
- Hamish Mackenzie
- David Lazar6
- Sascha Wilde7
- Henry de Valence
- 1. University of Toronto
- 2. Moscow Aviation Institute (National Research University)
- 3. University of California, Berkeley
- 4. @wireapp, @aelve
- 5. Research Scientist
- 6. MIT CSAIL
- 7. Intevation GmbH
Description
Use XDG data directory for user data directory (#3582). Instead of
$HOME/.pandoc, the default user data directory is now$XDG_DATA_HOME/pandoc, whereXDG_DATA_HOMEdefaults to$HOME/.local/sharebut can be overridden by setting the environment variable. If this directory is missing, then$HOME/.pandocis searched instead, for backwards compatibility. However, we recommend moving local pandoc data files from$HOME/.pandocto$HOME/.local/share/pandoc. On Windows the default user data directory remains the same.Slide show formats behavior change: content under headers less than slide level is no longer ignored, but included in the title slide (for HTML slide shows) or in a slide after the title slide (for beamer). This change makes possible 2D reveal.js slideshows with content in the top slide on each stack (#4317, #5237).
Add command line option
--ipynb-output=all|none|best(#5339). Output cells in ipynb notebooks often contain several different versions of an output, with different MIME types, e.g. an HTML table and a plain-text fallback. Specifying--ipynb-output=best(the default) ensures that the best version for the output format is used.allincludes all versions, andnonesuppresses them all, leaving output cells empty.asciidoctoris now an output format separate fromasciidoc, to accommodate some minor implementation-specific differences (currently just in the treatment of display math).Add
latexmkas an option for--pdf-engine(#3195). Note that you can use--pdf-engine-opt=-outdir=barto specify a persistent temp directory.Markdown reader:
- Improve tight/loose list handling (#5285). Previously the algorithm allowed list items with a mix of Para and Plain, which is never wanted.
- Add newline when parsing blocks in YAML (#5271). Otherwise last block gets parsed as a Plain rather than a Para. This is a regression in pandoc 2.x. This patch restores pandoc 1.19 behavior.
- Make
yamlToMetarespect extensions (#5272, Mauro Bieg). This adds aReaderOptionsparameter toyamlToMeta[API change]. - Fix bug parsing fenced code blocks (#5304). Previously parsing would break if the code block contained a string of backticks of sufficient length followed by something other than end of line.
LaTeX reader: don't let
\egroupmatch{.bracednow actually requires nested braces. Otherwise some legitimate command and environment definitions can break.Docx reader (Jesse Rosenthal):
- Rename
getDocumentPathasgetDocumentXmlPath. - Use field notation for setting
ReaderEnv. - Figure out
document.xmlpath once at the beginning of parsing, and add it to the environment, so we can avoid repeated lookups. - Dynamically determine main document xml path (#5277). The desktop Word program places the main document file in
word/document.xml, but the online word places it inword/document2.xml. This file path is actually stated in the root_rels/.relsfile, in theRelationshipelement with anhttp://../officedocumenttype. - Fix paths in archive to prevent Windows failure (#5277). Some paths in archives are absolute (have an opening slash) which, for reasons unknown, produces a failure in the test suite on MS Windows. This fixes that by removing the leading slash if it exists.
- Add comments to aid code readability.
- Trim space inside the last inline (#5273).
- Unwrap sdt elements in footnotes and comments (#5302).
- Rename
Muse reader (Alexander Krotov):
- Test that block level markup does not break
<verbatim>. - Add secondary note support.
- Test that block level markup does not break
ipynb reader: handle images referring to attachments. Previously we didn't strip off the attachment: prefix, so even though the attachment was available in the mediabag, pandoc couldn't find it.
JATS reader:
- Fix parsing of figures (#5321). This ensures that a figure containing a single image is parsed as a pandoc "implicit figure" (i.e., a Para with a single Image whose title attribute begins with
fig:). More complex figures will still be parsed as divs. - Support
fig-groupblock element (#5317). - Handle citations with multiple references (#5310). The
ridattribute can have a space-separated list of ids.
- Fix parsing of figures (#5321). This ensures that a figure containing a single image is parsed as a pandoc "implicit figure" (i.e., a Para with a single Image whose title attribute begins with
AsciiDoc Writer: Add
writeAsciiDoctor[API change, Tarik Graba]. Handle display math appropriately for Asciidoctor.JATS writer: wrap figure caption in
<p>to fix validation (#5290, Mauro Bieg).HTML writer:
- Implement WAI-ARIA roles for (end)notes, citations, and bibliography (#4213). Note that doc-biblioref is only used when link-citations produces links, since it belongs on links.
- Include content (including speaker notes) in title slides (#4317, #5237).
ipynb writer:
- Ensure final newline.
- Only include metadata under
jupyterfield. - Don't create attachments for images with absolute URIs, including data: URIs (#5303).
- Keep plain text fallbacks in output even if a richer format is included (#5293). We don't know what output format will be needed. See the
--ipynb-outputcommand line option for a way to control what formats are included in the output.
Markdown writer: use
markdown="1"when appropriate for Divs: whennative_divsandmarkdown_in_html_blocksare disabled butraw_htmlandmarkdown_attributeare enabled.LaTeX writer:
- Use right fold for
escapeString. This is more elegant than the explicit recursive code we were using. - Avoid
{}after control sequences when escaping.\ldots{}.doesn't behave as well as\ldots.with the latex ellipsis package. This patch causes pandoc to avoid emitting the{}when it is not necessary. Now\ldotsand other control sequences used in escaping will be followed by either a{}, a space, or nothing, depending on context. - For beamer, include contents under headers superordinate to slidelevel (#4317). Currently we keep the fancy title slide, and add a new slide with the same title and whatever content was under the header.
- Use right fold for
Powerpoint writer (Jesse Rosenthal): support underlines. Use span with single class "underline" as in docx writer.
Muse writer: escape secondary notes (Alexander Krotov).
FB2 writer: add section identifiers support (#5229, John KetzerX).
Make
--fail-if-warningswork for PDF output (#5343).Lua filters (Albert Krewinkel):
- Load module
pandocbefore callinginit.lua(#5287). The fileinit.luain pandoc's data directory is run as part of pandoc's Lua initialization process. Previously, thepandocmodule was loaded ininit.lua, and the structure for marshaling was set up after. This allowed simple patching of element marshaling, but made usinginit.luamore difficult. Now, all required modules are now loaded before callinginit.lua. The file can be used entirely for user customization. Patching marshaling functions, while discouraged, is still possible via thedebugmodule. - All Lua modules bundled with pandoc, i.e.,
pandoc.List,pandoc.mediabag,pandoc.utils, andtextare re-exported from thepandocmodule. They are assigned to the fieldsList,mediabag,utils, andtext, respectively.
- Load module
Text.Pandoc.Lua (Albert Krewinkel):
- Split
StackInstancesinto smaller Marshaling modules. - Get
CommonStatefrom Lua global. This allows more control over the common state from within Lua scripts.
- Split
LaTeX template:
- Support the
subjectmetadata variable (#5289, Pascal Wagler). - Add , , for book classes (#5306).
- Support the
epub3 template: Add titlepage class to section (#5269).
HTML5 template: Add ARIA role
doc-tocfor table of contents (#4213).Make –metadata-file use pandoc-markdown (#5279, #5272, Mauro Bieg).
Text.Pandoc.Shared:
- Remove
withTempDir[API change]. - Add new exported function
defaultUserDataDirs[API change]. - Add
filterIpynbOutput[API change]. compactify: Avoid lists with a mix of Plain and Para elements (#5285).
- Remove
Text.Pandoc.Translations: reorder alphabetically and remove
Author(#5334, Mauro Bieg).Text.Pandoc.Extensions:
- More carefully groom ipynb default extensions.
- Add
all_symbols_escapabletogithubMarkdownExtensions.
Text.Pandoc.PDF:
- Use system temp directory when possible (#1192). Previously we created temp dirs in the working directory, partly (a) because there were problems using the system temp directory on Windows, when their pathnames included tildes, and partly (b) because programs like
epstopdf.plwould not be allowed to write to directories outside the working directory in restricted mode. We now (a) use the system temp dir except when the path includes tildes, and (b) setTEXMFOUTPUTwhen creating the PDF, so that subsidiary programs can use the system temp directory. This addresses problems that occurred when pandoc was used in a synced directory (such as Dropbox). - Change types of subsidiary functions to PandocIO, to allow warnings to be threaded through (#5343).
- Use system temp directory when possible (#1192). Previously we created temp dirs in the working directory, partly (a) because there were problems using the system temp directory on Windows, when their pathnames included tildes, and partly (b) because programs like
Text.Pandoc.MIME: add WebP (#5267, Mauro Bieg).
Tests: avoid calling
findPandocmultiple times.Old tests: remove need for temp files by using
pipeProcess.Added simple ipynb reader/writer tests (#5274).
Rearrange
--helpoutput in a more rational way, with common options at the beginning and options grouped by function (#5336).trypandoc: Add JATS and other missing formats (Arfon Smith, #5291).
Add missing copyright notices and remove license boilerplate (#4592, Albert Krewinkel).
Use latest basement/foundation on 32bit windows.
Use latest skylighting (#5328). Custom syntax definitions no longer try to load
language.dtd.Require texmath 0.11.2.1
Use latest pandoc-citeproc (0.16.1.1).
MANUAL.txt:
- Clarify variable substitution indentation in templates (#5338, Agustín Martín Barbero).
- Reorder custom-styles section (#5324, Mauro Bieg).
Files
jgm/pandoc-2.7.zip
Additional details
Related works
- Is supplement to
- https://github.com/jgm/pandoc/tree/2.7 (URL)