Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17193 lines (13224 sloc) 721 KB
pandoc (2.7.3)
* Add `jira` (Atlassian's Jira wiki markup) as output format (#2497,
Albert Krewinkel).
* Add `tex_math_dollars` to `multimarkdownExtensions` (#5512).
This form is now supported in multimarkdown,
in addition to `tex_math_double_backslash`.
* Fix `--self-contained` so it works when output format has extensions.
Previously if you used `--self-contained` with `html-smart` or
`html+smart`, it wouldn't work.
* Add template variable `curdir` with working directory
from which pandoc is run (#5464).
* Markdown reader: don't create implicit reference for empty header
(#5549).
* Muse reader: allow images inside link descriptions (Alexander Krotov).
* HTML reader: epub related fixes.
+ With epub extensions, check for `epub:type` in addition to `type`.
+ Fix problem with noteref parsing which caused block-level
content to be eaten with the noteref.
+ Rename `pAnyTag` to `pAny`.
+ Refactor note resolution.
+ Trim definition list terms (Alexander Krotov).
* LaTeX reader:
+ Add braces when resolving `\DeclareMathOperator`
(#5441). These seem to be needed for xelatex but not pdflatex.
+ Allow newlines in `\mintinline`.
+ Pass through unknown listings language as class (#5540).
Previously if the language was not in the list of languages supported
by listings, it would not be added as a class, so highlighting
would not be triggered.
+ `rawLaTeXInline`: Include trailing `{}`s in raw latex commands (#5439).
This change affects the markdown reader and other readers that allow raw
LaTeX. Previously, trailing `{}` would be included for unknown
commands, but not for known commands. However, they are sometimes used
to avoid a trailing space after the command. The chances that a `{}`
after a LaTeX command is not part of the command are very small.
* MediaWiki reader: handle multiple attributes in table row (#5471,
chinapedia).
* Docx reader: Add support for `w:rtl` (#5545). Elements with this
property are put into Span inlines with `dir="rtl"`.
* DocBook reader: Issue `IgnoredElement` warnings.
* Org reader (Albert Krewinkel):
+ Fix planning elements in headers level 3 and higher
(#5494). Planning info is now always placed before
the subtree contents. Previously, the planning info was placed after
the content if the header's subtree was converted to a list, which
happens with headers of level 3 and higher per default.
+ Omit, but warn about unknown export options. Unknown export
options are properly ignored and omitted from the output.
+ Prefer plain symbols over math symbols (#5483).
Symbols like `\alpha` are output plain and unemphasized, not as math.
+ Recognize emphasis after TODO/DONE keyword (#5484).
* FB2 reader:
+ Skip unknown elements rather than throwing errors (#5560).
Sometimes custom elements are used (e.g. `id` element
inside `author`); previously the reader would halt with an error.
Now it skips the element and issues an `IgnoredElement` warning.
+ Parse notes (#5493, Alexander Krotov).
+ Internal improvements (Alexander Krotov).
* OpenDocument writer: Roll back automatic figure/table numbering
(#5474). This was added in pandoc 2.7.2, but it makes it impossible
to use pandoc-crossref. So this has been rolled back for now,
until we find a good solution to make this behavior optional
(or a creative way to let pandoc-crossref and this feature
to coexist).
* New module Text.Pandoc.Writers.Jira, exporting `writeJira` [API
change] (Albert Krewinkel).
* EPUB writer:
+ Don't include 'landmarks' if there aren't any.
Previously we could get an empty ol element, which caused
validation errors with epubcheck.
+ Ensure unique ids for styleesheets in content.opf (#5463).
+ Make stylesheet link compatible with kindlegen (#5466,
Eric Schrijver). Pandoc omitted `type="text/css"` from both
`<style>` and `<rel="stylesheet">` elements in all templates, which
is valid according to the spec. However, Amazon’s kindlegen software
relies on this attribute on `<link>` elements when detecting
stylesheets to include.
* HTML writer:
+ Output video and audio elements depending on file
extension of the image path (Mauro Bieg).
+ Emit empty alt tag in figures (#5518, Mauro Bieg).
The same text is already in the <figcaption> and
screen-readers would read it twice, see #4737.
+ Don't add variation selector if it's already there.
This fixes round-trip failures.
+ Prevent gratuitious emojification on iOS (#5469).
iOS chooses to render a number of Unicode entities, including '↩', as
big colorful emoji. This can be defeated by appending Unicode VARIATION
SELECTOR-15'/'VARIATION SELECTOR-16'. So we now append this character
when escaping strings, for both '↩' and '↔'. If other characters prove
problematic, they can simply be added to `needsVariationSelector`.
+ Add `class="heading"` to level 7+ Headers rendered as `<p>` elements
(#5457).
* RST writer: treat Span with no attributes as transparent (#5446).
Previously an Emph inside a Span was being treated as
nested markup and ignored. With this patch, the Span
is just ignored.
* LaTeX writer:
+ Include inline code attributes with `--listings` (#5420).
+ Don't produce columns environment unless beamer (#5485).
+ Fix footnote in image caption. Regression: the fix for #4683 broke
this case.
+ Don't highlight code in headings (#5574). This causes
compilation errors.
+ Use `\mbox` to get proper behavior inside `\sout` (#5529).
* EPUB writer: Fix document section assignments (#5546).
For example, introduction should go in bodymatter, not frontmatter, and
epigraph, conclusion, and afterward should go in bodymatter, not
backmatter. For the full list of assignments, see the manual.
* Markdown writer:
+ Add backslashes to avoid unwanted interpretation of
definition list terms as other kinds of block (#554).
+ Ensure the code fence is long enough (#5519).
Previously too few backticks were used when the code block
contained an indented line of backticks. (Ditto tildes.)
+ Handle labels with integer names (Jesse Rosenthal, #5495).
Previously if labels had integer names, it could produce a conflict
with auto-labeled reference links. Now we test for a conflict and
find the next available integer. This involves adding a new state
variable `stPrevRefs` to keep track of refs used in other document
parts when using `--reference-location=block|section`
* Textile writer: fix closing tag for math output (Albert Krewinkel).
Opening and closing tag for math output match now.
* Org writer: always indent src blocks content by 2 spaces (#5440, Albert
Krewinkel). Emacs always uses two spaces when indenting the content of
src blocks, e.g., when exiting a `C-c '` edit-buffer. Pandoc used to
indent contents by the space-equivalent of one tab, but now always uses
two spaces, too.
* Asciidoc writer:
+ Use `` `+...+` `` form for inline code.
The old `` `a__b__c` `` yields emphasis inside code in asciidoc.
To get a pure literal code span, use `` `+a__b__c+` ``.
+ Use proper smart quotes with asciidoctor (#5487).
Asciidoctor has a different format for smart quotes.
+ Use doubled ## when necessary for spans (#5566).
+ Ensure correct nesting of strong/emph (#5565): strong
must be the outer element.
* JATS writer:
+ Wrap elements with p when needed (#5570). The JATS spec restricts
what elements can go inside `fn` and `list-item`. So we wrap other
elements inside `<p specific-use="wrapper">` when needed.
+ Properly handle footnotes (#5511) according to "best practice."
(Group them at the end in `<fn-group>` and use `<xref>` elements
to link them.)
+ Fix citations with PMID so they validate (#5481). This includes
an update to data/jats.csl.
+ Ensure validity of `<pub-date>` by parsing the date and
extracting year, month, and day, as expected. Also add an
iso-8601-date attribute automatically.
+ Don't use `<break>` element for LineBreak. It is only
allowed in a few special contexts, and not in `<p>` elements.
+ Don't make `<string-name>` a child of `<string>`, which is illegal.
* FB2 writer:
+ Do not wrap note references into `<sup>` and brackets
(Alexander Krotov). Existing FB2 readers, such as FBReader, already
display links with type="note" as a superscript.
+ Use genre metadata field (#5478).
* Muse writer: do not escape empty line after `<br>` (Alexander Krotov).
* Add unicode code point in "Missing character" warning (#5538).
If the character isn't in the console font, the message is pretty useless,
so we show the code point for anything non-ASCII.
* Lua: add Version type to simplify comparisons (Albert Krewinkel).
Version specifiers like `PANDOC_VERSION` and `PANDOC_API_VERSION` are
turned into `Version` objects. The objects simplify version-appropriate
comparisons while maintaining backward-compatibility.
A function `pandoc.types.Version` is added as part of the newly
introduced module `pandoc.types`, allowing users to create version
objects in scripts.
* pandoc lua module (Albert Krewinkel):
- Fix deletion of nonexistent attributes (#5569).
- Better tests for Attr and AttributeList.
* pandoc.mediabag lua module (Albert Krewinkel):
+ Add function `delete` for deleting a single item.
+ Add function `empty` for removing all entries.
+ Add function `items` for iterating over mediabag.
* Text.Pandoc.Class: Fix handling of `file:` URL scheme in
`downloadOrRead` (#5517, Mauro Bieg). Previously `file:/`
URLs were handled wrongly and pandoc attempted to make HTTP
requests, which failed.
* Text.Pandoc.MIME: add `mediaCategory` [API change] (Mauro Bieg).
* Text.Pandoc.Shared:
+ Add `onlySimpleTableCells` [API change]
(Mauro Bieg) and use this to consolidate simple-table detection
(#5524). This fixes an inconsistency in the HTML reader, which did not
treat tables with `<p>` inside cells as simple.
+ `metaToJSON`: treat digits starting with 0 as a string, not a number
(#5479). This fixes a regression in YAML metadata in pandoc 2.7.2.
* Text.Pandoc.Logging: Add `IgnoredElement` constructor for
`LogMessage`. `SkippedConetnt` doesn't work for some XML-based
readers which don't have access to parsec source positions.
* Text.Pandoc.Asciify: Add Turkish undotted-i (#5433, Mauro Bieg).
* Improve output of Lua tests (#5499, Albert Krewinkel).
This makes use of tasty-lua, a package to write tests in Lua
and integrate the results into Tasty output. Test output becomes
more informative: individual tests and test groups become visible
in test output. Failures are reported with helpful error messages.
* Lua: add `pandoc.system` module (#5468, Albert Krewinkel).
The `system` Lua module provides utility functions to interact with the
operating- and file system. E.g.
`print(pandoc.system.get_current_directory())`
or
```lua
pandoc.system.with_temporary_directory('tikz', function (dir)
-- write and compile a TikZ file with pdflatex
end)
```
* LaTeX template: Add pdflang to hypersetup if lang is set (#5443).
* beamer template: Fix using Beamer with geometry (#5505, Daniel Maslowski).
Beamer already loads geometry, so we need to use the `\geometry`
command to set geometry options.
* EPUB2/3 templates: Move inline styles to default epub.css (#5466).
NOTE: Those who use a custom CSS stylesheet with EPUB should
add these lines:
code{ white-space: pre-wrap; }
span.smallcaps{ font-variant: small-caps; }
span.underline{ text-decoration: underline; }
q { quotes: "“" "”" "‘" "’"; }
div.column{ display: inline-block; vertical-align: top; width: 50%; }
* reveal.js template:
+ Updates for revealjs 3.8.0 (#5435, ebiim).
+ Remove reference to head.min.js (#5448, Winnie Hellmann).
NOTE: users will need to update reveal.js to at least 3.8.0
for their presentations generated with this version of pandoc
to work correctly.
* Text.Pandoc.PDF:
+ Replace `</>` with literal `/` (#5451).
We use forward-slash for a directory separator in tmpDir,
even on Windows (because that's what tex likes). So we
should not put a backslash between the tmpDir and the
filename on Windows. This is harmless enough in normal
Windows setups, but it breaks on Cygwin.
Thanks to @cc2x for noticing and diagnosing the problem.
+ Allow use of `-output-directory` in `--pdf-engine-opt` (#5462).
This is currently possible with `mklatex` and `-outdir`, but
was not yet possible with xelatex and `-output-directory`.
+ For PDF via ms/pdfroff, make TOC appear at beginning and in
PDF bookmarks (#5553). Previously the TOC appeared at the end
of the document, and was not bookmarked. To keep it at the end,
add `--pdf-engine-opt=--no-toc-relocation` to your command line.
* Fix broken links in documents (#5473, Shim Myeongseob).
Also, use absolute links to pandoc.org when possible, so that
the links can be followed by people viewing these documents
on GitHub.
* Improved sample lua tikz filter in lua-filters docs (#5445,
Matthew Doty). There are three changes:
+ It only processes elements which begin with `\begin{tikzpicture}`
+ It uses pdf2svg instead of imagemagick to preserve fidelity
+ The images produced have transparent backgrounds
* MANUAL.txt:
+ Add note about `title-meta`, `author-meta`, `date-meta` (#5486).
+ Fix typo (#5489, Christian Krause).
* add test/tables.xwiki to git and pandoc.cabal (#5498, Mauro Bieg).
* Disable missing-home-modules warning in `stack.yaml`.
Otherwise `stack ghci` fails.
pandoc (2.7.2)
* Add XWiki writer (#1800, Derek Chen-Becker).
Add `Text.Pandoc.Writers.XWiki`, exporting `writeXWiki` [API change].
* Dokuwiki Reader: parse single curly brace (#5416, Mauro Bieg).
* Vimwiki reader: improve handling of internal links (#5414).
We no longer append `.html` to link targets, and we add a title
`wikilink`. This mirrors behavior of other wiki readers. Generally
the `.html` extension is not wanted. It may be important for output
to HTML in certain circumstances, but it can always be added using a
filter that matches on links with title `wikilink`.
If your workflow requires the current behavior, here is a lua filter
that will add the `.html` extension:
```lua
function Link(el)
if el.title == 'wikilink' then
el.target = el.target .. ".html"
end
return el
end
```
* ipynb reader:
+ Use format `ipynb` for raw cell where no format given.
+ Avoid introducing spurious `.0` on integers in metadata.
* Markdown reader: fenced div takes priority over setext header.
* HTML reader: read `data-foo` attribute into `foo` (#5392).
The HTML writer adds the `data-` prefix for HTML5 for nonstandard
attributes. But the attributes are represented in the AST without
the `data-` prefix, so we should strip this when reading HTML.
* LaTeX reader: Improve autolink detection (#5340).
* PowerPoint writer (Jesse Rosenthal):
+ Expand builtin reference doc to model all layouts.
The previous built-in reference doc had only title and content
layouts. Add in a section-header slide and a two-content slide, so
users can more easily modify it to build their own templates.
+ Always open up in slide view. When editing a
template/reference-doc, the user might be in Master view, but when
producing a slide show, it is assumed that slide view will be
desired.
+ Remove `handoutsMasterList` from template presentation.xml
+ Fix numerous errors in templating (#5402). Previously, some templates
produced by Office 365 (MacOS) would not render with `--reference-doc`
correctly. We now apply correct shapes for content, and build
shape trees correctly.
+ Make default placeholder type for template lookup.
+ Apply speaker notes to metadata slide if applicable.
+ Test for speaker notes after breaking header.
+ Correctly handle notes after section-title header.
Previously, if notes came after a section-title header (ie, a level-1
header in a slide-level=2 presentation), they would go on the next
slide. This keeps them on the slide with the header.
+ Internal improvements.
* ipynb writer:
+ Use format `ipynb` for raw cell where no format given.
According to nbformat docs, this is supposed to render in every
format. We don't do that, but we at least preserve it as a raw
block in markdown, so you can round-trip.
+ Consolidate adjacent raw blocks. Sometimes pandoc creates two
HTML blocks, e.g. one for the open tag and one for a close tag.
If these aren't consolidated, only one will show up in output cell.
+ Fixed carry-over of nbformat from metadata.
+ Preserve `nbformat_minor` if it's given. This helps with round-tripping.
* LaTeX writer:
+ Avoid inadvertently creating ?` or !` ligatures (#5407).
These are upside down ? and !, resp.
+ Fix footnotes in table caption and cells (#5367). This fixes a
bug wherein footnotes appeared in the wrong order, and with
duplicate numbers, when in table captions and cells.
We now use regular `\footnote` commands, even in the table
caption and the minipages containing cells. Apparently
longtable knows how to handle this.
* HTML writer: Don't add data- prefix to RDFa attributes (#5403).
* JATS writer: Ensure that plain strings go inside `<pub-id>` tag (#5397).
* Markdown writer:
+ Better rendering of numbers (#5398). If the number is integral,
we render it as an integral not a float.
+ Proper rendering of empty map in YAML metadata (#5398). Should
be `{}`, not empty string.
+ Properly escape attributes in Markdown writer (#5369).
+ Be sure implicit figures work in list contexts (#5368).
Previously they would sometimes not work: e.g., when they
occured in final paragraphs in lists that were originally
parsed as Plain and converted later using PlainToPara.
* Docx writer: Use `w:br` without attributes for line breaks (#5377).
We previously added the attribute `type="textWrapping"`, but
this causes problems on Word Online.
* LaTeX template (Andrew Dunning):
+ Ensure correct heading/table order (#5365). Improve workaround
(#1658) for tables following headings. The new solution works whether
or not the `indent` variable is enabled.
+ Remove `subparagraph` variable. The default is now to use run-in
style for level 4 and 5 headings (`\paragraph` and `\subparagraph`).
To get the previous default behavior (where these were formatted as
blocks, like `\subsubsection`), set the `block-headings` variable.
+ Add pandoc to PDF metadata (#5388).
+ Group graphics-related code (#5389).
+ Move `\setstretch` after front matter (#5179). Ensures that
`\maketitle`, `\tableofcontents`, and so forth are not affected by
changes to line spacing.
* Update data/jats.csl to avoid commas between name-part elements
(#5397).
* Add support for golang (`go`) with `--listings` (#5427).
* Text.Pandoc.Shared - improve `metaToJSON` behavior with numbers.
We now do a better job marshalling numbers from MetaString
or MetaInlines into JSON Number.
* Text.Pandoc.Writers.Shared: `metaValueToJSON`: use Number Values for
integers. Pandoc's MetaValue doesn't have a distinguished number type,
so numbers are put in MetaStrings. If the MetaString consists
entirely of digits, we convert it to a Number. We should probably
consider adding a MetaNumber constructor to MetaValue, for better
round-tripping with JSON etc. This change aids round-tripping in
ipynb metadata fields, like `toc_depth`.
* Text.Pandoc.Class: `fetchItem`: don't treat UNC paths as
protocol-relative URLs (#5127). These are paths beginning `//?/UNC/...`.
* Text.Pandoc.ImageSize: Improve `pdfSize` so it handles
a wider range of PDFs (#4322, with help from Richard Davis).
* Text.Pandoc.Pretty: avoid stack overflow by using strict sum (#5401).
* Fix harmless error in file-scope code (#5422).
* MANUAL.txt:
+ Improve 'header' and 'heading' usage (#5423, Andrew
Dunning). The term 'header' was being used where 'heading'
is more appropriate.
+ Add paragraph on options affecting markdown in ipynb.
* stack.yaml - remove -Wmissing-home-modules
This seems to cause problems with stack ghci. Remove RTS options.
* Add ghc-options to cabal.project.
* appveyor.yml - use ghc 8.6.4. Fixes segfault issues on Windows (#5037).
* linux build process: Remove clone of pandoc-citeproc (#5366).
It wasn't being used; cabal.project specifies the version to use.
pandoc (2.7.1)
* Add tectonic as an option for --pdf-engine (#5345, Cormac Relf).
Runs tectonic on STDIN instead of a temporary .tex file, so that it
looks in the working directory for `\include` and `\input` like the rest
of the engines. Allows overriding the output directory
args with `--pdf-engine-opt=--outdir --pdf-engine-opt="$DIR"`.
* Allow `-o/--output` to be used with `--print-default-data-file`,
`--print-highlighting-style`, `--print-default-template`.
Note that `-o` must occur BEFORE the `--print*` command on the command
line (this is documented, #5357).
* LaTeX reader:
+ Support `\underline`, `\ul`, `\uline` (#5359, Paul
Tilley). These are parsed as a Span with class `underline`, as
with other readers.
+ Ensure that `\Footcite` and `\Footcites` get put in a note.
* ipynb reader:
+ Remove sensitivity to `raw_html`, `raw_tex` extensions.
We now include every output format. Pruning is handled by
`--ipynb-output`.
+ Better handling of cell metadata. We now include even complex cell
metadata in the Div's attributes (as JSON, in complex cases, or
as plain strings in simple cases).
* ipynb writer:
+ Recurse into native divs for output cell data (#5354).
+ Render cell metadata fields from div attributes.
* Docx writer: avoid extra copy of abstractNum and num elements
in numbering.xml. This caused pandoc-produced docx files to
be uneditable using Word Online (#5358).
* Markdown writer: improve handling of raw blocks/inline.
We now emit raw content using `raw_attribute` when no more
direct method is available. Use of `raw_attribute` can be
forced by disabling `raw_html` and `raw_tex`.
* LaTeX writer: Add classes for frontmatter support (#5353, Andrew Dunning)
and remove frontmatter from `scrreprt`.
* LaTeX template:
+ Improve readability (#5363, Andrew Dunning).
+ Robust section numbering removal (#5351, Andrew Dunning).
Ensures that section numbering does not reappear with custom
section levels. See <https://tex.stackexchange.com/questions/473653/>.
+ Better handling of front/main/backmatter (#5348).
In pandoc 2.7 we assumed that every class with chapters would accept
`\frontmatter`, `\mainmatter`, and `\backmatter`. This is not so (e.g.
report does not). So pandoc 2.7 breaks on report class by including an
unsupported command. Instead of the `book-class` variable, we use two
variables, `has-chapters` and `has-frontmatter`, and set these
intelligently in the writer.
* Text.Pandoc.Shared: Improve `filterIpynbOutput`. Ensure that
images are prioritized over text. `best` should include everything
for ipynb.
* Tests.Old: specify `--data-dir=../data` to ensure tests can find
data files even if they haven't been installed. Remove old
`pandoc_datadir` environment variable, which hasn't done anything for a
long time.
* MANUAL.txt: Add recommendation to use `raw_attribute` with ipynb (#5354).
* Use cmark-gfm-hs 0.1.8 (note that 0.1.7 is buggy).
* Use latest pandoc-citeproc, texmath.
pandoc (2.7)
* Use XDG data directory for user data directory (#3582). Instead of
`$HOME/.pandoc`, the default user data directory is now
`$XDG_DATA_HOME/pandoc`, where `XDG_DATA_HOME` defaults to
`$HOME/.local/share` but can be overridden by setting the
environment variable. If this directory is missing, then
`$HOME/.pandoc` is searched instead, for backwards compatibility.
However, we recommend moving local pandoc data files from
`$HOME/.pandoc` to `$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. `all` includes all versions, and `none` suppresses them
all, leaving output cells empty.
* `asciidoctor` is now an output format separate from `asciidoc`,
to accommodate some minor implementation-specific differences
(currently just in the treatment of display math).
* Add `latexmk` as an option for `--pdf-engine` (#3195).
Note that you can use `--pdf-engine-opt=-outdir=bar` to 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 `yamlToMeta` respect extensions (#5272, Mauro Bieg).
This adds a `ReaderOptions` parameter to `yamlToMeta` [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 `\egroup` match `{`. `braced` now actually
requires nested braces. Otherwise some legitimate command and
environment definitions can break.
* Docx reader (Jesse Rosenthal):
+ Rename `getDocumentPath` as `getDocumentXmlPath`.
+ Use field notation for setting `ReaderEnv`.
+ Figure out `document.xml` path 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 in
`word/document2.xml`. This file path is actually stated in the root
`_rels/.rels` file, in the `Relationship` element with an
`http://../officedocument` type.
+ 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).
* Muse reader (Alexander Krotov):
+ Test that block level markup does not break `<verbatim>`.
+ Add secondary note support.
* 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-group` block element (#5317).
+ Handle citations with multiple references (#5310). The `rid`
attribute can have a space-separated list of ids.
* 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 `jupyter` field.
+ 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-output` command line option for a way to control
what formats are included in the output.
* Markdown writer: use `markdown="1"` when appropriate for Divs:
when `native_divs` and `markdown_in_html_blocks` are disabled
but `raw_html` and `markdown_attribute` are 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 `\ldots` and 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.
* 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-warnings` work for PDF output (#5343).
* Lua filters (Albert Krewinkel):
+ Load module `pandoc` before calling `init.lua` (#5287). The file
`init.lua` in pandoc's data directory is run as part of pandoc's
Lua initialization process. Previously, the `pandoc` module was
loaded in `init.lua`, and the structure for marshaling was
set up after. This allowed simple patching of element
marshaling, but made using `init.lua` more difficult. Now, all
required modules are now loaded before calling `init.lua`. The
file can be used entirely for user customization. Patching
marshaling functions, while discouraged, is still possible via
the `debug` module.
+ All Lua modules bundled with pandoc, i.e., `pandoc.List`,
`pandoc.mediabag`, `pandoc.utils`, and `text` are re-exported from the
`pandoc` module. They are assigned to the fields `List`, `mediabag`,
`utils`, and `text`, respectively.
* Text.Pandoc.Lua (Albert Krewinkel):
+ Split `StackInstances` into smaller Marshaling modules.
+ Get `CommonState` from Lua global. This allows more control over
the common state from within Lua scripts.
* LaTeX template:
+ Support the `subject` metadata variable (#5289, Pascal Wagler).
+ Add `\frontmatter`, `\mainmatter`, `\backmatter`
for book classes (#5306).
* epub3 template: Add titlepage class to section (#5269).
* HTML5 template: Add ARIA role `doc-toc` for table of contents (#4213).
* Make `--metadata-file` use selected extensions (#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).
* Text.Pandoc.Translations: reorder alphabetically and remove `Author`
(#5334, Mauro Bieg).
* Text.Pandoc.Extensions:
+ More carefully groom ipynb default extensions.
+ Add `all_symbols_escapable` to `githubMarkdownExtensions`.
* 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.pl` would 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) set `TEXMFOUTPUT` when 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).
* Text.Pandoc.MIME: add WebP (#5267, Mauro Bieg).
* Tests: avoid calling `findPandoc` multiple times.
* Old tests: remove need for temp files by using `pipeProcess`.
* Added simple ipynb reader/writer tests (#5274).
* Rearrange `--help` output 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).
pandoc (2.6)
* Support ipynb (Jupyter notebook) as input and output format.
+ Add `ipynb` as input and output format (extension `.ipynb`).
+ Added Text.Pandoc.Readers.Ipynb [API change].
+ Added Text.Pandoc.Writers.Ipynb [API change].
+ Add `PandocIpynbDecodingError` constructor to Text.Pandoc.Error.Error
[API change].
+ Depend on ipynb library.
+ Note: there is no template for ipynb.
* Add DokuWiki reader (#1792, Alexander Krotov). This adds
Text.Pandoc.Readers.DokuWiki [API change], and adds `dokuwiki`
as an input format.
* Implement task lists (#3051, Mauro Bieg). Added `task_lists`
extension. Task lists are supported from markdown and gfm input.
They should work, to some degree, in all output formats, though in
most formats you'll get a bullet list with a unicode character for
the box. In HTML, you get checkboxes and in LaTeX/PDF output, a
box is used as the list marker. API changes:
+ Added constructor `Ext_task_lists` to `Extension`.
+ Added `taskListItemFromAscii` and `taskListItemToAscii` to
Text.Pandoc.Shared.
* Allow some command line options to take URL in addition to FILE.
`--include-in-header`, `--include-before-body`, `--include-after-body`.
* HTML reader:
+ Handle empty `start` attribute (see #5162).
+ Treat `textarea` as a verbatim environment (#5241) and preserve
spacing.
* RST reader:
+ Change treatment of `number-lines` directive (Brian Leung,
#5207). Directives of this type without numeric inputs should
not have a `startFrom` attribute; with a blank value, the
writers can produce extra whitespace.
+ Removed superfluous `sourceCode` class on code blocks (#5047).
+ Handle `sourcecode` directive as synonynm for `code` (#5204).
* Markdown reader:
+ Remove `sourceCode` class for literate Haskell code blocks
(#5047). Reverse order of `literate` and `haskell` classes on
code blocks when parsing literate Haskell, so `haskell` is
first.
+ Treat `<textarea>` as a verbatim environment (#5241).
* Org reader:
+ Handle `minlevel` option differently (#5190, Brian Leung).
When `minlevel` exceeds the original minimum level observed in
the file to be included, every heading should be shifted
rightward.
+ Allow for case of `:minlevel == 0` (#5190).
+ Fix treatment of links to images (#5191, Albert Krewinkel).
Links with descriptions which are pointing to images are no
longer parsed as inline images, but as links.
+ Add support for #+SELECT_TAGS (Brian Leung).
+ Separate filtering logic from conversion function (Brian Leung).
* TWiki reader: Fix performance issue with underscores (#3921).
* MediaWiki reader: use `_` instead of `-` in auto-identifiers (#4731).
We may not still be exactly matching mediawiki's algorithm.
* LaTeX reader:
+ Remove `sourceCode` class for literate Haskell code blocks
(#5047). Reverse order of `literate` and `haskell` classes on
code blocks when parsing literate Haskell, so `haskell` is
first.
+ Support `\DeclareMathOperator` (#5149).
+ Support `\inputminted` (#5103).
+ Support `\endinput` (#5233).
+ Allow includes with dots like `cc_by_4.0`. Previously the `.0`
was interpreted as a file extension, leading pandoc not to add
`.tex` (and thus not to find the file). The new behavior matches
tex more closely.
* Man reader:
+ Use `mapLeft` from Shared instead of defining own.
* Docx reader (Jesse Rosenthal):
+ Handle level overrides (#5134).
* Docx writer:
+ Support custom properties (#3024, #5252, Agustín Martín Barbero).
Also supports additional core properties: `subject`, `lang`,
`category`, `description`.
+ Make Level into a real type, instead of an alias for a tuple
(Jesse Rosenthal).
* ICML writer (Mauro Bieg):
+ Support custom-styles (#5137, see #2106).
+ Support unnumbered headers (#5140).
* Texinfo writer: Use header identifier for anchor if present (#4731).
Previously we were overwriting an existing identifier with a new one.
* Org writer: Preserve line-numbering for example and code blocks
(Brian Leung).
* Man/Ms writers: Don't escape `-` as `\-`. The `\-` gets rendered
in HTML and PDF as a unicode minus sign.
* Ms writer: Ensure we have a newline after .EN in disply math (#5251).
* RST writer: Don't wrap simple table header lines (#5128).
* Asciidoc writer: Shorter delimiters for tables, blockquotes
(#4364). This matches asciidoctor reference docs.
* Dokuwiki writer: Remove automatic `:` prefix before internal image
links (#5183, Damien Clochard). This prevented users from making
relative image links.
* Zimwiki writer: remove automatic colon prefix before internal
images (#5183, Damien Clochard).
* MediaWiki writer: fix caption, use 'thumb' instead of 'frame'
(#5105). Captions used to have the word 'caption' prepended; this
has been removed. Also, 'thumb' is used instead of 'frame' to
allow images to be resized.
* reveal.js writer:
+ Ensure that we don't get > 2 levels of section nesting,
even with slide level > 2 (#5168).
+ If slide level == N but there is no N-level header, make
sure the next header with level > N gets treated as a slide
and put in a section, rather than remaining loose (#5168).
* Markdown writer:
+ Make `plain` RawBlocks pass through in `plain` output.
+ Include needed whitespace after HTML figure (#5121).
We use HTML for a figure in markdown dialects that can't
represent it natively.
* Commonmark writer:
+ Fix handling of SoftBreak with `hard_line_breaks` (#5195).
+ Implement `--toc` (`writerTableOfContents`)
in commonmark/gfm writers (#5172).
* EPUB writer:
+ Ensure that picture transforms are done on metadata too.
+ Small fixes to `nav.xhtml`:
Add 'landmarks' id attribute to the landmarks nav.
Replace old default CSS removing numbers from ol.toc li
with new rules that match `nav#toc ol, nav#landmarks ol`.
We keep the `toc` class on `ol` for backwards compatibility.
* LaTeX writer:
+ Make raw content marked `beamer` pass through in `beamer`
output (pandoc/lua-filters#40).
+ Beamer: avoid duplicated `fragile` property in some cases
(#5208).
+ Add `#` special characters for listings (#4939).
This character needs special handling in `\lstinline`.
* RTF writer: use `toTableOfContents` from Shared to replace
old duplicated code.
* Pptx writer:
+ Support custom properties. Also supports additional core
properties: `subject`, `category`, `description` (#5252,
Agustín Martín Barbero).
+ Use `toTableOfContents` from Shared to replace old duplicated code.
* ODT writer (Augustín Martín Barbero):
+ Fix typo in custom properties (#2839).
+ Improve standard properties, including the following core
properties: `generator` (Pandoc/VERSION), `description`, `subject`,
`keywords`, `initial-creator` (from authors), `creation-date`
(actual creation date) (#5252).
* Custom writers:
+ Allow '-' in filenames for custom lua writers (#5187).
+ sample.lua: add `SingleQuoted`, `DoubleQuoted` (#5104).
+ sample.lua: Add a missing `>` (MichaWiedenmann).
* reveal.js template: Add `zoomKey` config (#4249).
* HTML5 template: Remove unnecessary type="text/css" on style and
link for HTML5 (#5146).
* LaTeX template (Andrew Dunning, except where noted):
+ Prevent fontspec from scaling `mainfont` to match the default
font, Latin Modern. A main font set to 12pt could
previously appear between 11pt to 13pt depending on its design.
To return to the earlier rendering, use `-V
mainfontoptions="Scale=MatchLowercase"` (#5212, #5218).
+ Display monospaced fonts without TeX ligatures when using
`--pdf-engine=lualatex`. It now matches the behaviour of other
engines (#5212, #5218).
+ Remove the deprecated `romanfont` variable. The functionality of
`mainfont` is identical (#5218).
+ Render `\subtitle` with the standard document classes.
Previously, `subtitle` only appeared when using the KOMA-Script
classes or Beamer (#5213, #5244).
+ Use Babel instead of Polyglossia for LuaLaTeX. This avoids
several language selection problems, notably with retaining
French spacing conventions when switching to a verbatim
environment or another language; and in printing Greek text
without hyphenation (#5193).
+ Use the [`xurl`](https://ctan.org/pkg/xurl) package if
available, improving the appearance of URLs by allowing them to
break at additional points (#5193).
+ Use [`bookmark`](https://ctan.org/pkg/bookmark) if available
to correct heading levels in PDF bookmarks: see the [KOMA-Script
3.26 release notes](https://komascript.de/release3.26) (#5193).
+ Require the [`xcolor`](https://ctan.org/pkg/xcolor) package to
avoid a possible error when using additional packages alongside
footnotes in tables (#5193, closes #4861).
+ Remove obsolete `fixltx2e` package, which has no functionality
with TeX Live 2015 or later (#5193).
+ Allow multiple `fontfamilies.options` (#5193, closes #5194).
+ Restrict `institute` variable to Beamer (#5219).
+ Use [`footnotehyper`](https://ctan.org/pkg/footnotehyper)
package if available to make footnotes in tables compatible
with `hyperref` (#5234).
+ Number parts and chapters in book classes only if the
`numbersections` variable is set, for consistency with other
output formats. To return to the previous behaviour, use
`-V numbersections -V secnumdepth=0` (#5235).
+ Reindent file (#5193).
+ Use built-in parskip handling with KOMA-Script classes (#5143, Enno).
+ Set default listings language for lua, assembler (#5227, John
MacFarlane). Otherwise we get an error when trying to compile code
with lua or assembler code. To change the default dialect
(currenty 5.3 for lua and x86masm for assembler), you can use
`--include-in-header` to inject something like
`\lstset{defaultdialect=[5.2]Lua}`.
* Text.Pandoc.Readers: Changed types of `readJSON`; it now runs
in an instance of PandocMonad, like the other readers and
writers. [API change]
* Text.Pandoc.Writers: Changed types of `writeJSON`; it now runs
in an instance of PandocMonad, like the other readers and
writers. [API change]
* Text.Pandoc.Error: Added `PandocUTF8DecodingError` constructor
for `PandocError`. [API change]
* Text.Pandoc.Writers.Shared - add `toTableOfContents`. [API change]
This is refactored out from the Markdown writer.
It can be used in other writers to create a table of contents.
* Improve error messages for UTF-8 decoding errors. Now we give
the filename and byte offset (#4765).
* Text.Pandoc.XML: Strip out illegal XML characters in
`escapeXMLString` (#5119).
* Text.Pandoc.Process: update `pipeProcess` (Albert Krewinkel).
The implementation of `pipeProcess` was rewritten to fix sporadic
failures caused by prematurely closed pipes.
* Use `safeRead` instead of `read` everywhere in the code
(John MacFarlane, Mauro Bieg, #5162, #5180).
* Text.Pandoc.SelfContained: Decompress `.svgz` when
converting to `data:` URI (#5163, Alexander Krotov).
* Text.Pandoc.Parsing: Remove unused `HasHeaderMap`
(#5175, Alexander Krotov). [API change]
* Normalize Windows paths to account for change in ghc 8.6 (#5127).
When pandoc is compiled with ghc 8.6, Windows paths are treated
differently, and paths beginning `\\server` no longer work.
This commit rewrites such patsh to `\\?\UNC\server` which works.
The change operates at the level of argument parsing, so it
only affects the command line program.
* Simplify/fix reading of `--metadata` values on command line
to avoid problems relating to hvr/HsYAML#7 (#5177).
* data/pandoc.lua: auto-fix nested constructor arguments (Albert
Krewinkel). Incorrect types to pandoc element constructors are
automatically converted to the correct types when possible. This was
already done for most constructors, but conversions are now also done
for nested types (like lists of lists).
* Removed custom Setup.hs, use build-type: simple. The only thing we
gained from the custom build was automatic installation of the man
page when using 'cabal install'. But custom builds cause problems,
e.g., with cross-compilation. Installation of the man page is
better handled by packagers. Note to packagers (e.g. Debian): it
may be necessary to add a step installing the man page with the
next release.
* Allow latest http-client, tasty, zip-archive, Glob.
* Require skylighting >= 0.7.5, adding support for sml, J,
typescript.
* Tests: Cleaned up `findPandoc` in `Tests.Helpers`, so it
works well with cabal v2.
* INSTALL.md:
+ Use button for installer links (John MacFarlane, Mauro Bieg,
#5167).
+ Fix links and bump required stack version (max).
+ Improve installation notes on associated software (Andrew
Dunning). Includes explanation of how to install related tools
with package managers (since the method of installing
`rsvg-convert` is not obvious).
* doc/org.md: improve documentation of org features (Albert
Krewinkel).
* doc/lua-filters.md: use 3rd level headers for module fields.
* MANUAL:
+ Clarify automatic identifiers (#5201). We remove
non-alphanumerics. This includes, e.g., emojis.
+ Fix example for Div with id (Geoffrey Ely).
+ Update list of LaTeX packages used.
+ Make it clear that `hard_line_breaks` works in `gfm` (see #5195).
+ Mention `raw_attribute` in documentation for `raw_html` and
`raw_tex` (#5240, thanks to @eiro).
+ Clarify that `$sep$` must come right before `$endfor$` in templates
(#5243, Lev Givon).
+ Document metadata support for docx, odt, pptx writers (Agustín
Martín Barbero).
+ Reorganize template variables (#5249, Andrew Dunning).
Add additional headings to categorize variables, and
alphabetize when there is large number; add more examples.
+ Document `date-meta` template variable (#5260, Tristan Stenner).
* trypandoc: Fix CSS and viewport.
pandoc (2.5)
* Text.Pandoc.App: split into several unexported submodules (Albert
Krewinkel): Text.Pandoc.App.FormatHeuristics,
Text.Pandoc.App.Opt, Text.Pandoc.App.CommandLineOptions,
Text.Pandoc.App.OutputSettings. This is motivated partly by the
desire to reduce recompilations when something is modified,
since App previously depended on virtually every other module.
* Text.Pandoc.Extensions
+ Semantically, `gfm_auto_identifiers` is now a modifier of
`auto_identifiers`; for identifiers to be set, `auto_identifiers` must
be turned on, and then the type of identifier produced depends on
`gfm_auto_identifiers` and `ascii_identifiers` are set. Accordingly,
`auto_identifiers` is now added to `githubMarkdownExtensions` (#5057).
+ Remove `ascii_identifiers` from `githubMarkdownExtensions`.
GitHub doesn't seem to strip non-ascii characters any more.
* Text.Pandoc.Lua.Module.Utils (Albert Krewinkel)
+ Test AST object equality via Haskell (#5092). Equality of Lua
objects representing pandoc AST elements is tested by unmarshalling
the objects and comparing the result in Haskell.
A new function `equals` which performs this test has been added to the
`pandoc.utils` module.
+ Improve stringify. Meta value strings (MetaString)
and booleans (MetaBool) are now converted to the literal string and the
lowercase boolean name, respectively. Previously, all values of these
types were converted to the empty string.
* Text.Pandoc.Parsing: Remove Functor and Applicative constraints where Monad
already exists (Alexander Krotov).
* Text.Pandoc.Pretty: Don't render BreakingSpace at end of line
or beginning of line (#5050).
* Text.Pandoc.Readers.Markdown
+ Fix parsing of citations, quotes, and underline emphasis
after symbols. Starting with pandoc 2.4, citations, quoted inlines,
and underline emphasis were no longer recognized after certain
symbols, like parentheses (#5099, #5053).
+ In pandoc 2.4, a soft break after an abbreviation would be
relocated before it to allow for insertion of a nonbreaking
space after the abbreviation. This behavior is here reverted.
A soft break after an abbreviation will remain, and no nonbreaking
space will be added. Those who care about this issue should take care not
to end lines with an abbreviation, or to insert nonbreaking spaces
manually.
* Text.Pandoc.Readers.FB2: Do not throw error for unknown elements in
`<body>` (Alexander Krotov). Some libraries include custom elements
in their FB2 files.
* Text.Pandoc.Readers.HTML
+ Allow `tfoot` before body rows (#5079).
+ Parse `<small>` as a Span with class "small" (#5080).
+ Allow thead containing a row with `td` rather than `th` (#5014).
* Text.Pandoc.Readers.LaTeX
+ Cleaned up handling of dimension arguments. Allow decimal points,
preceding space.
+ Don't allow arguments for verbatim, etc.
+ Allow space before bracketed options.
+ Allow optional arguments after `\\` in tables.
+ Improve parsing of `\tiny`, `\scriptsize`, etc. Parse as raw,
but know that these font changing commands take no arguments.
* Text.Pandoc.Readers.Muse
+ Trim whitespace before parsing grid table cells (Alexander Krotov).
+ Add grid tables support (Alexander Krotov).
* Text.Pandoc.Shared
+ For bibliography match Div with id `refs`, not class `references`.
This was a mismatch between pandoc's docx, epub, latex, and markdown
writers and the behavior of pandoc-citeproc, which actually looks for a
div with id `refs` rather than one with class `references`.
+ Exactly match GitHub's identifier generating algorithm (#5057).
+ Add parameter for `Extensions` to `uniqueIdent` and
`inlineListToIdentifier` (#5057). [API change]
This allows these functions to be sensitive to the settings of
`Ext_gfm_auto_identifiers` and `Ext_ascii_identifiers`, and allows us to
use `uniqueIdent` in the CommonMark reader, replacing custom code. It
also means that `gfm_auto_identifiers` can now be used in all formats.
* Text.Pandoc.Writers.AsciiDoc
+ Use `.`+ as list markers to support nested ordered lists (#5087).
+ Support list number styles (#5089).
+ Render Spans using `[#id .class]#contents#` (#5080).
* Text.Pandoc.Writers.CommonMark
+ Respect `--ascii` (#5043, quasicomputational).
+ Make sure `--ascii` affects quotes, super/subscript.
* Text.Pandoc.Writers.Docx
+ Fix bookmarks to headers with long titles (#5091).
Word has a 40 character limit for bookmark names. In addition, bookmarks
must begin with a letter. Since pandoc's auto-generated identifiers may
not respect these constraints, some internal links did not work. With
this change, pandoc uses a bookmark name based on the SHA1 hash of the
identifier when the identifier isn't a legal bookmark name.
+ Add bookmarks to code blocks (Nikolay Yakimov).
+ Add bookmarks to images (Nikolay Yakimov).
+ Refactor common bookmark creation code into a function (Nikolay Yakimov).
* Text.Pandoc.Writers.EPUB: Handle calibre metadata (#5098).
Nodes of the form
<meta name="calibre:series" content="Classics on War and Politics"/>
are now included from an epub XML metadata file. You can also include
this information in your YAML metadata, like so:
calibre:
series: Classics on War and Policitics
In addition, ibooks-specific metadata can now be included via an XML
file. (Previously, it could only be included via YAML metadata, see
#2693.)
* Text.Pandoc.Writers.HTML: Use plain `"` instead of `&quot;` outside of
attributes.
* Text.Pandoc.Writers.ICML: Consolidate adjacent strings, inc. spaces.
This avoids splitting up the output unnecessarily into separate elements.
* Text.Pandoc.Writers.LaTeX: Don't emit `[<+->]` unless beamer output, even
if `writerIncremental` is True (#5072).
* Text.Pandoc.Writers.Muse (Alexander Krotov).
+ Output tables as grid tables if they have multi-line cells.
+ Indent simple tables only on the top level.
+ Output tables with one column as grid tables.
+ Add support for `--reference-location`.
+ Internal improvements.
* Text.Pandoc.Writers.OpenDocument: Fix list indentation (Nils Carlson,
#5095). This was a regression in pandoc 2.4.
* Text.Pandoc.Writers.RTF: Fix warnings for skipped raw inlines.
* Text.Pandoc.Writers.Texinfo: Add blank line before `@menu` section (#5055).
* Text.Pandoc.XML: in `toHtml5Entities`, prefer shorter entities
when there are several choices for a particular character.
* data/abbreviations
+ Add additional abbreviations (Andrew Dunning)
Many of these borrowed from the Chicago Manual of Style 10.42,
'Scholarly abbreviations'.
* Templates
+ Asciidoc template: add :lang: to title header is lang is set in
metadata (#5088).
* pandoc.cabal: Add cabal flag `derive_json_via_th` (Albert Krewinkel)
Disabling the flag will cause derivation of ToJSON and FromJSON
instances via GHC Generics instead of Template Haskell. The flag is
enabled by default, as deriving via Generics can be slow (see #4083).
* trypandoc:
+ Tweaked drop-down lists.
+ Put link to site in footer.
+ Preselect output format.
+ Update on change of in or out format.
+ Add man input format.
* MANUAL.txt:
+ Fix outdated description of latex_macros extension.
+ Clarified placement of bibliography.
+ Added "A note on security."
+ Fix note on curly brace syntx for locators.
+ Document new explicit syntax for citeproc locators.
+ Remove confusing cross-links for some extensions.
+ Don't put pandoc in code ticks in heading.
+ Document that `--ascii` works for gfm and commonmark too.
+ Add `man` to `--from` options.
* doc/customizing-pandoc.md: various improvements (Mauro Bieg).
pandoc (2.4)
[new features]
* New input format `man` (Yan Pashkovsky, John MacFarlane).
[behavior changes]
* `--ascii` is now implemented in the writers, not in Text.Pandoc.App,
via the new `writerPreferAscii` field in `WriterOptions`.
Now the `write*` functions for Docbook, HTML, ICML, JATS, LaTeX,
Ms, Markdown, and OPML are sensitive to `writerPreferAscii`.
Previously the to-ascii translation was done in Text.Pandoc.App,
and thus not available to those using the writer functions
directly.
* `--ascii` now works with Markdown output. HTML5 character reference
entities are used.
* `--ascii` now works with LaTeX output. 100% ASCII output can't be
guaranteed, but the writer will use commands like `\"{a}` and `\l`
whenever possible, to avoid emiting a non-ASCII character.
* For HTML5 output, `--ascii` now uses HTML5 character reference
entities rather than numerical entities.
* Improved detection of format based on extension (in Text.Pandoc.App).
We now ensure that if someone tries to convert a file for a
format that has a pandoc writer but not a reader, it won't just
default to markdown.
* Add viz. to abbreviations file (#5007, Nick Fleisher).
* AsciiDoc writer: always use single-line section headers,
instead of the old underline style (#5038). Previously the single-line
style would be used if `--atx-headers` was specified, but
now it is always used.
* RST writer: Use simple tables when possible (#4750).
* CommonMark (and gfm) writer: Add plain text fallbacks. (#4528,
quasicomputational). Previously, the writer would unconditionally
emit HTML output for subscripts, superscripts, strikeouts (if the
strikeout extension is disabled) and small caps, even with
`raw_html` disabled. Now there are plain-text (and, where
possible, fancy Unicode) fallbacks for all of these corresponding
(mostly) to the Markdown fallbacks, and the HTML output is only
used when `raw_html` is enabled.
* Powerpoint writer: support raw openxml (Jesse Rosenthal, #4976).
This allows raw openxml blocks and inlines to be used in the pptx
writer. Caveats: (1) It's up to the user to write
well-formed openxml. The chances for corruption, especially with
such a brittle format as pptx, is high. (2) Because of
the tricky way that blocks map onto shapes, if you are using
a raw block, it should be the only block on a slide
(otherwise other text might end up overlapping it). (3) The
pptx ooxml namespace abbreviations are different from the
docx ooxml namespaces. Again, it's up to the user to get it
right. Unzipped document and ooxml specification should be
consulted.
* With `--katex` in HTML formats, do not use the autorenderer (#4946).
We no longer surround formulas with `\(..\)` or `\[..\]`. Instead,
we tell katex to convert the contents of span elements with
class "math". Since math has already been identified, this
avoids wasted time parsing for LaTeX delimiters. Note, however,
that this may yield unexpected results if you have span elements
with class "math" that don't contain LaTeX math.
Also, use latest version of KaTeX by default (0.9.0).
* The man writer now produces ASCII-only output, using groff escapes,
for portability.
* ODT writer:
+ Add title, author and date to metadata; any remaining
metadata fields are added as `meta:user-defined` tags.
+ Implement table caption numbering (#4949, Nils Carlson).
Captioned tables are numbered and labeled with format "Table 1:
caption", where "Table" is replaced by a translation, depending
on the value of `lang` in metadata. Uncaptioned tables are not
enumerated.
+ OpenDocument writer: Implement figure numbering in captions (#4944,
Nils Carlson). Figure captions are now numbered 1, 2, 3, ...
The format in the caption is "Figure 1: caption" and so on
(where "Figure" is replaced by a translation, depending on the
value of `lang` in the metadata). Captioned figures are numbered
consecutively and uncaptioned figures are not enumerated. This
is necessary in order for LibreOffice to generate an
Illustration Index (Table of Figures) for included figures.
* RST reader: Pass through fields in unknown directives as div attributes
(#4715). Support `class` and `name` attributes for all directives.
* Org reader: Add partial support for `#+EXCLUDE_TAGS` option. (#4284,
Brian Leung). Headers with the corresponding tags should not
appear in the output.
* Log warnings about missing title attributes now include a
suggestion about how to fix the problem (#4909).
* Lua filter changes (Albert Krewinkel):
+ Report traceback when an error occurs. A proper Lua traceback is
added if either loading of a file or execution of a filter
function fails. This should be of help to authors of Lua filters
who need to debug their code.
+ Allow access to pandoc state (#5015). Lua filters and custom
writers now have read-only access to most fields of pandoc's
internal state via the global variable `PANDOC_STATE`.
+ Push ListAttributes via constructor (Albert Krewinkel).
This ensures that ListAttributes, as present in OrderedList elements,
have additional accessors (viz. `start`, `style`, and `delimiter`).
+ Rename ReaderOptions fields, use snake_case. Snake case is used
in most variable names, using camelCase for these fields was an
oversight. A metatable is added to ensure that the old field
names remain functional.
+ Iterate over AST element fields when using `pairs`. This makes
it possible to iterate over all ield names of an AST element by
using a generic `for` loop with pairs`:
for field_name, field_content in pairs(element) do
...
end
Raw table fields of AST elements should be considered an
implementation detail and might change in the future. Accessing
element properties should always happen through the fields
listed in the Lua filter docs.
Note that the iterator currently excludes the `t`/`tag` field.
+ Ensure that MetaList elements behave like Lists. Methods usable
on Lists can also be used on MetaList objects.
+ Fix MetaList constructor (Albert Krewinkel). Passing a MetaList
object to the constructor `pandoc.MetaList` now returns the
passed list as a MetaList. This is consistent with the
constructor behavior when passed an (untagged) list.
* Custom writers: Custom writers have access to the global variable
`PANDOC_DOCUMENT`(Albert Krewinkel, #4957). The variable contains
a userdata wrapper around the full pandoc AST and exposes two
fields, `meta` and `blocks`. The field content is only
marshaled on-demand, performance of scripts not accessing the
fields remains unaffected.
[API changes]
* Text.Pandoc.Options: add `writerPreferAscii` to `WriterOptions`.
* Text.Pandoc.Shared:
+ Export `splitSentences`. This was previously duplicated in the Man and
Ms writers.
+ Add `ToString` typeclass (Alexander Krotov).
* New exported module Text.Pandoc.Filter (Albert Krewinkel).
* Text.Pandoc.Parsing
+ Generalize `gridTableWith` to any `Char` Stream (Alexander Krotov).
+ Generalize `readWithM` from `[Char]` to any `Char` Stream
that is a `ToString` instance (Alexander Krotov).
* New exposed module Text.Pandoc.Filter (Albert Krewinkel).
* Text.Pandoc.XML: add `toHtml5Entities`.
* New exported module Text.Pandoc.Readers.Man (Yan Pashkovsky, John
MacFarlane).
* Text.Pandoc.Writers.Shared
+ Add exported functions `toSuperscript` and
`toSubscript` (quasicomputational, #4528).
+ Remove exported functions `metaValueToInlines`,
`metaValueToString`. Add new exported functions
`lookupMetaBool`, `lookupMetaBlocks`, `lookupMetaInlines`,
`lookupMetaString`. Use these whenever possible for uniformity
in writers (Mauro Bieg, #4907). (Note that
removed function `metaValueToInlines` was in previous
released versions.)
+ Add `metaValueToString`.
* Text.Pandoc.Lua
+ Expose more useful internals (Albert Krewinkel):
- `runFilterFile` to run a Lua filter from file;
- data type `Global` and its constructors; and
- `setGlobals` to add globals to a Lua environment.
This module also contains `Pushable` and `Peekable` instances
required to get pandoc's data types to and from Lua. Low-level
Lua operation remain hidden in Text.Pandoc.Lua.
+ Rename `runPandocLua` to `runLua` (Albert Krewinkel).
+ Remove `runLuaFilter`, merging this into Text.Pandoc.Filter.Lua's
`apply` (Albert Krewinkel).
[bug fixes and under-the-hood improvements]
* Text.Pandoc.Parsing
+ Make `uri` accept any stream with Char tokens (Alexander Krotov).
+ Rewrite `uri` without `withRaw` (Alexander Krotov).
+ Generalize `parseFromString` and `parseFromString'` to any
streams with Char token (Alexander Krotov)
+ Rewrite `nonspaceChar` using `noneOf` (Alexander Krotov)
* Text.Pandoc.Shared: Reimplement `mapLeft` using `Bifunctor.first`
(Alexander Krotov).
* Text.Pandoc.Pretty: Simplify `Text.Pandoc.Pretty.offset`
(Alexander Krotov).
* Text.Pandoc.App
+ Work around HXT limitation for --syntax-definition with windows
drive (#4836).
+ Always preserve tabs for man format. We need it for tables.
+ Split command line parsing code into a separate unexported
module, Text.Pandoc.App.CommandLineOptions (Albert Krewinkel).
* Text.Pandoc.Readers.Roff: new unexported module for tokenizing
roff documents.
* New unexported module Text.Pandoc.RoffChar, provided character
escape tables for roff formats.
* Text.Pandoc.Readers.HTML: Fix `htmlTag` and `isInlineTag` to
accept processing instructions (#3123, regression since 2.0).
* Text.Pandoc.Readers.JATS: Use `foldl'` instead of `maximum` to
account for empty lists (Alexander Krotov).
* Text.Pandoc.Readers.RST: Don't allow single-dash separator in
headerless table (#4382).
* Text.Pandoc.Readers.Org: Parse empty argument array in inline src
blocks (Brian Leung).
* Text.Pandoc.Readers.Vimwiki:
+ Get rid of `F`, `runF` and `stateMeta'` in favor of `stateMeta`
(Alexander Krotov).
+ Parse `Text` without converting to `[Char]` (Alexander Krotov).
* Text.Pandoc.Readers.Creole: Parse `Text` without converting to
`[Char]` (Alexander Krotov).
* Text.Pandoc.Readers.LaTeX
+ Allow space at end of math after `\` (#5010).
+ Add support for `nolinkurl` command (#4992, Brian Leung).
+ Simplified type on `doMacros'`.
+ Tokenize before pulling tokens, rather than after (#4408). This
has some performance penalty but is more reliable.
+ Make macroDef polymorphic and allow in inline context.
Otherwise we can't parse something like `\lowercase{\def\x{Foo}}`.
I have actually seen tex like this in the wild.
+ Improved parsing of `\def`, `\let`. We now correctly parse:
```
\def\bar{hello}
\let\fooi\bar
\def\fooii{\bar}
\fooi +\fooii
\def\bar{goodbye}
\fooi +\fooii
```
+ Improve parsing of `\def` argspec.
+ Skip `\PackageError` commands (see #4408).
+ Fix bugs omitting raw tex (#4527). The default is `-raw_tex`,
so no raw tex should result unless we explicitly say `+raw_tex`.
Previously some raw commands did make it through.
+ Moved `isArgTok` to Text.Pandoc.Readers.LaTeX.Parsing.
+ Moved `babelLangToBCP`, `polyglossiaLangToBCP` to new module,
Text.Pandoc.Readers.LaTeX.Lang (unexported).
+ Simplified accent code using unicode-transforms.
New dependency on unicode-transforms package for normalization.
+ Allow verbatim blocks ending with blank lines (#4624).
+ Support `breq` math environments: `dmath`, `dgroup`, `darray`.
This collects some of the general-purpose code from the LaTeX reader,
with the aim of making the module smaller.
* Text.Pandoc.Readers.Markdown
+ Fix awkward soft break movements before abbreviations (#4635).
+ Add updateStrPos in a couple places where needed.
* Text.Pandoc.Readers.Docx: Trigger bold/italic with bCs, iCs
(#4947). These are variants for "complex scripts" like Arabic
and are now treated just like b, i (bold, italic).
* Text.Pandoc.Readers.Muse (Alexander Krotov)
+ Try to parse lists before trying to parse table.
This ensures that tables inside lists are parsed correctly.
+ Forbid whitespace after opening and before closing markup
elements.
+ Parse page breaks.
+ Simplify `museToPandocTable` to get rid of partial functions.
+ Allow footnotes to start with empty line.
+ Make sure that the whole text is parsed.
+ Allow empty headers. Previously empty headers caused parser to
terminate without parsing the rest of the document.
+ Allow examples to be indented with tabs.
+ Remove indentation from examples indicated by `{{{` and `}}}`.
+ Fix parsing of empty cells.
+ Various changes to internals.
+ Rewrite some parsers in applicative style.
+ Avoid tagsoup dependency.
+ Allow table caption to contain `+`.
* Text.Pandoc.Writers.LaTeX
+ Add newline if math ends in a comment (#4880). This prevents the
closing delimiter from being swalled up in the comment.
+ With `--listings`, don't pass through org-babel attributes (#4889).
+ With `--biblatex`, use `\autocite` when possible (#4960).
`\autocites{a1}{a2}{a3}` will not collapse the entries. So, if
we don't have prefixes and suffixes, we use instead
`\autocite{a1,a2,a3}`.
+ Fix description lists contining highlighted code (#4662).
* Text.Pandoc.Writers.Man
+ Don't wrap `.SH` and `.SS` lines (#5019).
+ Avoid unnecessary `.RS`/`.RE` pair in definition lists with
one paragraph definitions.
+ Moved common groff functions to Text.Pandoc.Writers.Groff.
* Fix strong/code combination on man (should be `\f[CB]` not
`\f[BC]`, see #4973).
+ Man writer: use `\f[R]` instead of `\f[]` to reset font
(Alexander Krotov, #4973).
+ Move `splitSentences` to Text.Pandoc.Shared.
* Text.Pandoc.Writers.Docx
+ Add framework for custom properties (#3034). So far, we don't
actually write any custom properties, but we have the
infrastructure to add this.
+ Handle tables in table cells (#4953). Although this is not
documented in the spec, some versions of Word require a `w:p`
element inside every table cell. Thus, we add one when the
contents of a cell do not already include one (e.g. when a table
cell contains a table).
* Text.Pandoc.Writers.AsciiDoc: Prevent illegal nestings.
Adjust header levels so that n+1 level headers are only
found under n level headers, and the top level is 1.
* Text.Pandoc.Writers.OpenDocument: Improve bullet/numbering
alignment (#4385). This change eliminates the large gap we used
to have between bullet and text, and also ensures that numbers
in numbered lists will be right-aligned.
* Text.Pandoc.Writers.ZimWiki
+ Number ordered list items sequentially, rather than always
with 1 (#4962).
+ Remove extra indentation on lists (#4963).
* Text.Pandoc.Writers.EPUB: Use metadata field `css` instead of
`stylesheet` (Mauro Bieg, #4990).
* Text.Pandoc.Writers.Markdown: Ensure blank between raw block and
normal content (#4629). Otherwise a raw block can prevent a
paragraph from being recognized as such.
* Text.Pandoc.Writers.Ms
+ Removed old `escapeBar`. We don't need this now that we use
`@` for math delim.
+ Moved common code to Text.Pandoc.Writers.Roff and to
Text.Pandoc.RoffChar.
+ Move `splitSentences` to Text.Pandoc.Shared (to avoid duplication
with the man writer).
* Text.Pandoc.Writers.Muse (Alexander Krotov).
+ Add support for grid tables.
+ Fix Muse writer style.
+ Use `length` instead of `realLength` to calculate definition
indentation. Muse parsers don't take character width into
account when calculating indentation.
+ Do not insert newline before lists.
+ Use lightweight markup after `</em>` tag.
* New unexported module Text.Pandoc.Writers.Roff, providing functions
useful for all roff format writers (man, ms).
* Text.Pandoc.Lua
+ Move globals handling to separate module Text.Pandoc.Lua.Global
(Albert Krewinkel).
+ Lua filter internals: push Shared.Element as userdata (Albert
Krewinkel). Hierarchical Elements were pushed to Lua as plain
tables. This is simple, but has the disadvantage that marshaling
is eager: all child elements will be marshaled as part of the
object. Using a Lua userdata object instead allows lazy access
to fields, causing content marshaling just (but also each time)
when a field is accessed. Filters which do not traverse the full
element contents tree become faster as a result.
[default template changes]
* LaTeX template:
+ Add variable `hyperrefoptions` (#4925, Mathias Walter).
+ Add variable `romanfont`, `romanfontoptions` (#4665, OvidiusCicero).
* AsciiDoc template: use single-line style for title.
* revealjs template: Fix typo in the socket.io javascript plugin (#5006,
Yoan Blanc).
* Text.Pandoc.Lua.Util: add missing docstring to `defineHowTo`
(Albert Krewinkel).
* data/pandoc.lua: add datatype ListAttributes (Albert Krewinkel)
* data/sample.lua: replace custom pipe function with pandoc.utils.pipe
(Albert Krewinkel).
[documentation improvements]
* INSTALL.md
+ Add chromeos install instructions (#4958) (Evan Pratten).
+ Add note about TinyTeX.
* MANUAL.txt
+ Change `groff` -> `roff`.
+ Implement `--ascii` for Markdown writer.
+ Clarify LaTeX image dimensions output (Mauro Bieg).
* doc/customizing-pandoc.md: added skeleton (Mauro Bieg, #3288).
* doc/getting-started.md: Added title to test1.md to avoid warning.
* doc/lua-filters.md: merge type references into main document,
fix description of Code.text (Albert Krewinkel).
[build infrastructure improvements]
* Makefile
+ Makefile: added quick-cabal, full-cabal targets.
+ Make .msi download targets insensitive to order of appveyor builds.
* Update benchmarks for ghc 8.6.1.
* pandoc.cabal:
+ Enable more compiler warnings (Albert Krewinkel).
+ Make base lower bound 4.8.
+ Bump upper bound for QuickCheck.
+ Bump upper bound for binary.
+ Updated version bounds for containers and haddock-library (#4974).
+ Added docx/docPropos/custom.xml to cabal data-files.
+ Require skylighting 0.7.4 (#4920).
+ New dependency on unicode-transforms package for normalization.
* Improved .travis.yml testing and test with GHC 8.6.1 (Albert Krewinkel).
* Added `tools/changelog-helper.sh`.
* Added test/grofftest.sh for testing the man reader on real man pages.
pandoc (2.3.1)
* RST reader:
+ Parse RST inlines containing newlines (#4912, Francesco Occhipinti).
This eliminates a regression introduced after pandoc 2.1.1, which
caused inline constructions containing newlines not to be recognized.
+ Fix bug with internal link targets (#4919). They were gobbling up
indented content underneath.
* Markdown reader: distinguish autolinks in the AST. With this change,
autolinks are parsed as Links with the `uri` class. (The same is true
for bare links, if the `autolink_bare_uris` extension is enabled.)
Email autolinks are parsed as Links with the `email` class. This
allows the distinction to be represented in the AST.
* Org reader:
+ Force inline code blocks to honor export options (Brian Leung).
+ Parse empty argument array in inline src blocks (Brian Leung).
* Muse reader (Alexander Krotov):
+ Added additional tests.
+ Do not allow code markup to be followed by digit.
+ Remove heading level limit.
+ Simplify `<literal>` tag parsers
+ Parse Text instead of String. Benchmark shows 7% improvement.
+ Get rid of HTML parser dependency.
+ Various code improvements.
* ConTeXt writer: change `\` to `/` in Windows image paths (#4918).
We do this in the LaTeX writer, and it avoids problems.
Note that `/` works as a LaTeX path separator on Windows.
* LaTeX writer:
+ Add support for multiprenote and multipostnote arguments
with `--biblatex` (Brian Leung, #4930). The multiprenotes occur before
the first prefix of a multicite, and the multipostnotes follow the
last suffix.
+ Fix a use of `last` that might take empty list. If you ran with
`--biblatex` and have an empty document (metadata but no blocks),
pandoc would previously raise an error because of the use of
`last` on an empty list.
* RTF writer: Fix build failure with ghc-8.6.1 caused by missing
MonadFail instance (Jonas Scholl).
* ODT Writer: Improve table header row style handling (Nils Carlson).
This changes the way styles for cells in the header row
and normal rows are handled in ODT tables.
Previously a new (but identical) style was generated for
every table, specifying the style of the cells within the table.
After this change there are two style definitions for table cells,
one for the cells in the header row, one for all other cells.
This doesn't change the actual styles, but makes post-processing
changes to the table styles much simpler as it is no longer
necessary to introduce new styles for header rows and there are
now only two styles where there was previously one per table.
* HTML writer:
+ Don't add `uri` class to presumed autolinks. Formerly the `uri`
class was added to autolinks by the HTML writer, but it had to
guess what was an autolink and could not distinguish
`[http://example.com](http://example.com)` from
`<http://example.com>`. It also incorrectly recognized
`[pandoc](pandoc)` as an autolink. Now the HTML writer
simply passes through the `uri` attribute if it is present,
but does not add anything.
+ Avoid adding extra section nestings for revealjs.
Previously revealjs title slides at level (slidelevel - 1)
were nested under an extra section element, even when
the section contained no additional (vertical) content.
That caused problems for some transition effects.
+ Omit unknown attributes in EPUB2 output. For example,
`epub:type` attributes should not be passed through,
or the epub produced will not validate.
* JATS writer: remove 'role' attribute on 'bold' and 'sc' elements (#4937).
The JATS spec does not allow these.
* Textile writer: don't represent `uri` class explicitly
for autolinks (#4913).
* Lua filters (Albert Krewinkel):
+ Cleanup filter execution code.
+ Better error on test failure.
* HTML, Muse reader tests: reduce time taken by round-trip test.
* Added cabal.project.
* MANUAL: `epub:type` is only useful for epub3 (Maura Bieg).
* Use hslua v1.0.0 (Albert Krewinkel).
* Fix `translations/ru` to use modern Russian orthography
(Ivan Trubach).
* Build Windows binary using ghc 8.6.1 and cabal new-build. This
fixes issues with segfaults in the 32-bit Windows binaries (#4283).
pandoc (2.3)
* Add `--metadata-file` option (Mauro Bieg, #1960), which allows
users to specify metadata in a YAML file, regardless of the
input format (#1960).
* Text.Pandoc.Writers.Shared: export `isDisplayMath` (API change).
* Text.Pandoc.Readers.Markdown: export `yamlToMeta` (API change,
Mauro Bieg).
* Text.Pandoc.Readers.LaTeX.Types:
+ New type `ArgSpec` (API change).
+ Second parameter of `Macro` constructor is now `[ArgSpec]` instead of
`Int` (API change).
* Markdown reader:
+ Use `tex` instead of `latex` for raw tex-ish content. We can't
always tell if it's LaTeX, ConTeXt, or plain TeX. Better just to
use `tex` always. Note that if `context` or `latex` specifically
is desired, you can still force that in a markdown document by
using the raw attribute. Note that this change may affect some
filters, if they assume that raw tex parsed by the Markdown reader
will be RawBlock (Format `latex`). In most cases it should be
trivial to modify the filters to accept `tex` as well.
+ Refactor and reorganize YAML code (Mauro Bieg).
+ Make `example_lists` work for interrupted lists
without `startnum` (#4908).
* HTML reader:
+ Parse `<script type="math/tex` tags as math (#4877).
These are used by MathJax in some configurations.
+ Extract spaces inside links instead of trimming them
(Alexander Krotov, #4845).
+ Added round-trip tests (Alexander Krotov).
+ Make parsing sensitive to the `raw_tex` extension (#1126). This now
allows raw LaTeX environments, `\ref`, and `\eqref` to be parsed
(which is helpful for translation HTML documents using MathJaX).
* Org reader (Albert Krewinkel):
+ Respect export option `p` for planning info. Inclusion of planning info
(`*DEADLINE*`, `*SCHEDULED*`, and `*CLOSED*`) can be controlled via the
`p` export option: setting the option to `t` will add all planning
information in a *Plain* block below the respective headline.
+ Org reader internals: don't rely on RecordWildCards and ViewPatterns
ghc extensions.
+ Strip planning info from output. Planning info is parsed, but not
included in the output (as is the default with Emacs Org-mode, #4867).
* LaTeX reader:
+ Split some general-purpose definitions into a separate, unexported
module, Text.Pandoc.Readers.LaTeX.Parsing. This is to avoid
out-of-memory errors compiling the LaTeX reader.
+ Handle parameter patterns for `\def` (#4768, #4771).
For example: `\def\foo#1[#2]{#1 and #2}`.
+ Allow `%` characters in URLs. This affects `\href` and `\url` (#4832).
+ Fixed parsing of `\texorpdfstring`. We were returning the wrong
argument as the content.
+ Support `blockcquote`, `foreignblockquote`, `foreigncblockquote`,
`hyphenblockquote`, `hyphencblockquote`, `enquote*`, `foreignquote`,
`hyphenquote` from `csquotes` (#4848). Note that `foreignquote`
will be parsed as a regular Quoted inline (not using the quotes
appropriate to the foreign language).
+ Support more text-mode accents (#4652). Add support for `\|`, `\b`, `\G`,
`\h`, `\d`, `\f`, `\r`, `\t`, `\U`, `\i`, `\j`, `\newtie`,
`\textcircled`. Also fall back to combining characters when composed
characters are not available.
+ Resolve `\ref` for figure numbers.
+ Support `mintinline` (#4365, Marc Schreiber).
+ Fix siunitx unit commands so they are only recognized in
siunitx contexts (#4842). For example, `\l` outside of an
siunitx context should be l-slash, not l (for liter).
+ Fix double `unnumbered` class (#4838). The `unnumbered` class
was being included twice for starred sections.
* RST reader: Don't skip link definitions after comments (#4860).
* Muse reader (Alexander Krotov):
+ Close the `</quote>` in indented tag test.
There is already a separate test for unclosed `</quote>`.
+ Autonumber sections in the correct order. Parsing now stops
at each section header to ensure the header is registered before
parsing of the next section starts.
+ Move duplicate code into `headingStart` function.
+ Allow newline after opening `*` or `**`.
+ Don't allow digits after closing marker in lightweight markup
This change makes reader more compatible with Emacs Muse.
+ Parse `<verse>` tag in one pass instead of using
`parseFromString`. This change makes it possible to have
verbatim `</verse>` tag inside verse.
* ODT reader: deal gracefully with missing `<office:font-face-decls/>`
(#4336). This allows pandoc to parse ODT document produced by KDE's
Calligra.
* Muse writer (Alexander Krotov):
+ Output headers without asterisks if not on the top level.
+ Never wrap definition list terms.
+ Set `envInsideBlock = True` when rendering notes.
+ Use `""` instead of `[]` for empty String.
+ Check for whitespace in the beginning and end of Str's.
+ Escape `-`, `;` and `>` in the beginning of strings.
+ Escape list markers in the beginning of notes.
+ Normalize inline list before testing if tags should be used.
+ Use tags instead of lightweight markup for empty strings.
+ Use lightweight markup when possible.
+ Escape empty strings. This guarantees that `conditionalEscapeString`
never returns empty string.
+ Wrap conditionalEscapeString result into `Muse` type.
This removes the need to pass `envInsideLinkDescription` to it.
+ Separate `shouldEscapeString` function.
+ Simplify inline list rendering.
+ Replace newlines in strings with spaces.
* Docx writer:
+ Add MetaString case for abstract, subtitle (#4900, Mauro Bieg).
+ Properly handle display math in spans (#4826). This isn't a
complete solution, since other nestings of display math may still
cause problems, but it should work for what is by far the most
common case.
* HTML writer:
+ Always output `<dt>` element, even if it is empty (#4883,
Alexander Krotov).
+ Don't prefix `epub:` attributes with `data-`.
* Org writer: Don't escape literal `_`, `^` (#4882). Org doesn't
recognize these escapes.
* ODT writer: Fix percentage image scaling (#4881, Nils Carlson).
Image scaling was broken when a width was set to a percentage.
* EPUB writer: set `epub:type` on body element in each chapter,
depending on the `epub:type` of the first section (#4823). This
only affects epub3. See
http://www.idpf.org/epub/profiles/edu/structure/#h.l0bzsloklt10
* FB2 writer: put `coverpage` element between title and date rather than in
`document-info` element (#4854).
* Markdown writer: Escape `~` if strikeout extension enabled (#4840).
* Haddock writer: Use proper format for latex math in haddock (#4571, Joe
Hermaszewski). Inline math in `\(..\)`, display math in `\[..\]`,
tex is now used. Previously we'd "fake it with unicode" and fall
back to tex when that didn't work. But newer haddock versions
support latex math.
* TEI writer:
+ Ensure that title element is always present, even if empty (#4839).
+ Put author tags in the template, rather than adding them in
the writer (#4839).
* LaTeX writer/template: be sensitive to `filecolor` variable (#4822).
`linkcolor` only affects internal links, and `urlcolor` only
affects linked URLs. For external links, the option to use is
`filecolor`.
* ConTeXt writer: output raw `tex` blocks as well as `context` (#969).
* RST writer:
+ Use `.. raw:: latex` for `tex` content.
+ Use `.. container` for generic Divs, instead of raw HTML.
+ Render Divs with admonition classes as admonitions (#4833).
Also omit Div with class `admonition-title`. These are generated
by the RST reader and should be omitted on round-trip.
* Text.Pandoc.PDF: fix message printed when rsvg-convert is not available
(#4855, Antonio Terceiro).
* HTML5 template: add the `title-block-header` identifier to the
`header` element, to make it easier to style precisely (#4767,
J. B. Rainsberger).
* OpenDocument template: Remove unnecessary indenting of TOC title (#4798,
José de Mattos Neto).
* latex template: Add support for $toc-title$ to LaTeX (and PDF)
(#4853, Wandmalfarbe).
* TEI template: improve `publicationStmt`. Add support for
`publisher`, `address`, `pubPlace`, and `date` variables.
* beamer template: Support "toc-title" (#4835, Cyril Roelandt).
* Text.Pandoc.Extensions: Fix haddock on `Ext_footnotes` (Chris Martin).
* Lua: cleanup Lua utils, remove unused functions (Albert Krewinkel).
* MANUAL.txt:
+ Clarify that `--biblatex/--natbib` don't work directly for PDF
(#4904).
+ Document `epub:type` attribute (Mauro Bieg, #4901)
+ Clarify when `--resource-path` has an effect.
+ More detail on customization in syntax highlighting section.
+ Document encoding issue with `--listings` (#4871, Damien Clochard).
+ Remove docs on removed `--katex-stylesheet` (Mauro Bieg, #4862).
+ Use https for context wiki links (#4910).
* CONTRIBUTING.md:
+ Link to lua-filters repository (#4874).
+ Fix mistake in REPL instructions for stack. (#4849, Brian Leung).
* lua-filters.md: add links to filters, and to lua-filters repository
(#4874).
* INSTALL.md:
+ Indicate that cabal >= 2.0 is needed.
+ Added chocolatey installation method (#4844, Miodrag Milić).
* Travis: exclude round-trip tests, except for nightly test which can fail.
* Use latest texmath, pandoc-citeproc.
* Use a patched version of foundation until
https://github.com/haskell-foundation/foundation/pull/503
is fixed.
* Clean up appveyor build and Windows package creation.
We now use 64-bit stack and ghc 8.4.3, lts-12 for the 64-bit build. The
WiX-based msi is now 64-bit for 64-bit builds (fixing #4795).
* Remove obsolete RELEASE-CHECKLIST.md.
* Added additional compiler warnings in Makefile and CI builds.
pandoc (2.2.3.2)
* Markdown reader: Properly handle boolean values in YAML metadata (#4819).
This fixes a regression in 2.2.3, which cause boolean values to
be parsed as MetaInlines instead of MetaBool.
We here record another undocumented (but desirable) change in 2.2.3:
numerical metadata fields are now parsed as MetaInlines rather than
MetaString.
pandoc (2.2.3.1)
* Markdown reader: Fix parsing of embedded mappings in YAML metadata
(#4817). This fixes a regression in 2.2.3 which caused embedded
mappings (e.g. mappings in sequences) not to work in YAML metadata.
pandoc (2.2.3)
* RST reader: improve parsing of inline interpreted text roles (#4811).
+ Use a Span with class "title-reference" for the default
title-reference role.
+ Use `B.text` to split up contents into `Space`s, `SoftBreak`s,
and `Str`s for `title-reference`.
+ Use Code with class "interpreted-text" instead of Span and Str for
unknown roles. (The RST writer has also been modified to round-trip
this properly.)
+ Disallow blank lines in interpreted text.
+ Backslash-escape now works in interpreted text.
+ Backticks followed by alphanumerics no longer end interpreted text.
+ Remove support for nested inlines (Francesco Occhipinti).
RST does not allow nested emphasis, links, or other inline
constructs. This fixes several bugs (#4581, #4561, #4792).
* Org reader: fix parsers relying on `parseFromString` (#4784, Albert
Krewinkel). Emphasis was not parsed when it followed directly after
some block types (e.g., lists).
* Markdown reader: Allow unquoted numbers and booleans as YAML mapping
keys. Previously in 2.2.2 you could not do
```
---
0: bar
...
```
but only
```
---
'0': bar
...
```
With this change, both forms work.
* DocBook reader: metadata handling improvements.
Now we properly parse title and subtitle elements that are direct
children of book and article (as well as children of bookinfo,
articleinfo, or info). We also now use the `subtitle` metadata
field for subtitles, rather than tacking the subtitle on to the
title.
* RST writer:
+ Allow images to be directly nested within links (#4810, Francesco
Occhipinti).
+ Use `titleblock` instead of `title` variable for title block (#4803,
Francesco Occhipinti). `titleblock` contains a properly formatted
title and subtitle (using top-level headers). `title` and
`subtitle` variables are still available and just contain the
title and subtitle text. Note that this change will require an
update to custom rst templates.
+ Render Code with class "interpreted-text" as interpreted text role.
* MediaWiki writer: Avoid extra blank line in tables with empty cells
(#4794). Note that the old output is semantically identical, but the
new output looks better.
* Lua Utils module: add function `blocks_to_inlines` (#4799, Albert
Krewinkel). Exposes a function converting which flattenes a list of
blocks into a list of inlines. An example use case would be the
conversion of Note elements into other inlines.
* RST template: use `titleblock` instead of `title`. Users of
custom RST templates will want to update this.
* LaTeX template: Moved some beamer code in default.latex template.
This change allows beamer themes to change the template and font (as
Metropolis does) (#4450).
* Better error message on `-t pdf -o out.pdf` (#1155, Mauro Bieg).
* Added test case for #4669 to repository.
* INSTALL.md: Fix broken link for cabal-install (#4806, ChanHoHo).
* MANUAL.txt:
+ Add beamer info for slide backgrounds (#4802, John Muccigrosso).
+ Clarify when `csquotes` is used in LaTeX writer (#4514).
+ Add `commonmark` to list of output formats where `raw_tex` has an
effect (see #4527).
pandoc (2.2.2.1)
* Fix regression finding templates in user data directory (#4777).
Under version 2.2.1 and prior pandoc found latex templates in the
templates directory under the data directory, but this broke in 2.2.2.
* Fix for bug in parsing `\input` in `rawLaTeXBlock` and
`rawLaTeXInline` (#4781). (This primarily affects the markdown
reader, and other readers that accept raw tex.)
Starting in 2.2.2, everything after an `\input` (or `\include`)
in a markdown file would be parsed as raw LaTeX.
* MANUAL:
+ Clarify `gfm` vs `markdown_github` (#4783, Mauro Bieg).
* Use `keywords` instead of `tags` in YAML metadata example (#4779).
Unlike `tags`, `keywords` is used in some of the writers
and default templates.
* Add missing `rollingLinks` option to revealjs template (#4778,
Igor Khorlo).
pandoc (2.2.2)
* Use HsYAML instead of yaml for translations and YAML metadata (#4747).
yaml wraps a C library; HsYAML is pure Haskell. Advances #4535.
Note: HsYAML implements YAML 1.2, in which the valid true
values are `true`, `True`, `TRUE`. This means a change in
the semantics of YAML metadata that could affect users:
`y`, `yes`, and `on` no longer count as true values.
* Fix regression: make `--pdf-engine` work with full paths (#4681, Mauro
Bieg).
* CommonMark reader: Handle `ascii_identifiers` extension (#4742,
Anders Waldenborg). Non-ascii characters were not stripped from
identifiers even if the `ascii_identifiers` extension was
enabled (which is is by default for gfm).
* TikiWiki reader: Improve list parsing (#4722, Mauro Bieg).
Remove trailing Space from list items. Parse lists that have no space
after marker.
* LaTeX reader:
+ Treat `lilypond` as a verbatim environment (#4725).
+ Parse figure label into Image id (#4700, Mauro Bieg).
+ Beamer: Allow "noframenumbering" option (#4696, Raymond Ehlers).
+ Allow spaces around `\graphicspath` arguments (#4698).
+ Handle includes without surrounding blanklines (#4553).
In addition, `\input` can now be used in an inline context,
e.g. to provide part of a paragraph, as it can in LaTeX.
+ In `rawLaTeXBlock`, handle macros that resolve to a
`\begin` or `\end` (#4667).
+ In `rawLaTeXBlock`, don't expand macros in macro definitions (#4653).
Note that this only affected LaTeX in markdown.
+ Tighten up reading of beamer overlay specifications (#4669).
Ideally we'd turn these on only when reading beamer, but currently
beamer is not distinguished from latex as an input format.
This commit also activates parsing of overlay specifications
after commands in general (e.g. `\item`), since they can occur
in many contexts in beamer.
+ Parse more siunitx unit commands (#4296, #4773).
+ Be more forgiving in key/value option parsing (#4761).
* Markdown reader:
+ Allow empty code spans, e.g. `` ` ` ``.
+ Emojis are now wrapped in Spans with class `emoji` and
attribute `data-emoji` (Anders Waldenborg, #4743).
This allows the writer to handle them in a special way
(e.g. using a special font, or just rendering the
emoji name).
* Muse reader (Alexander Krotov, except where indicated):
+ Get rid of non-exhaustive pattern match warning (Mauro Bieg).
+ Add support for floating images.
+ Add support for images with specified width.
+ Parse image URLs without "guard" and "takeExtension".
+ Split link and image parsing into separate functions.
+ Parse links starting with "URL:" explicitly instead of trying to strip
"URL:" prefix after parsing.
* Texinfo writer: Use `@sup` and `@sub` instead of custom macros (#4728,
Alexander Krotov).
* Markdown writer: Preserve `implicit_figures` with attributes, even if
`implicit_attributes` is not set, by rendering in raw HTML (#4677).
* Markdown and commonmark/github writers now respect the `emoji`
extension. So, `-f markdown+emoji -t markdown+emoji` now leaves
`:smile:` as `:smile:` rather than converting it to a smile
character.
* Docx writer: Be sensitive to `toc` in YAML metadata (#4645).
* ODT/OpenDocument writer: Make internal links work (#4358).
This adds proper bookmarks to the headers with non-null IDs.
* EPUB writer: Properly escape pagetitle. Previously we weren't
escaping `&` and other XML characters in the pagetitle, so a title
containing a `&` would be invalid.
* AsciiDoc Writer: Eescape square brackets at start of line (#4545,
Mauro Bieg).
* RST writer:
+ Don't treat 'example' as a syntax name (#4748).
This fixes conversions from org with example blocks.
+ Support `--number-sections` via the `section-numbering`
directive in standalone output.
* reveal.js writer and template: reuse mathjax URL
provided by the argument to `--mathjax` or the normal pandoc default,
rather than a hard-coded one in the template (#4701).
* LaTeX writer:
+ Properly handle footnotes in table captions (#4683).
Refactored code from figure captions to use in both places.
+ In beamer output, fix single digit column percentage (#4690, Mauro
Bieg).
* FB2 writer (Alexander Krotov):
+ Convert Plain to Para in annotation (#2424).
+ Fix order of items in title-info (#2424).
* Custom writer: fix error message on script failure (Albert Krewinkel).
Error messages produced by Lua were not displayed by Pandoc.
* Text.Pandoc.Emoji now exports `emojiToInline`, which returns a Span
inline containing the emoji character and some attributes with metadata
(class `emoji`, attribute `data-emoji` with emoji name). (API change,
Anders Waldenborg, #4743).
* Text.Pandoc.PDF:
+ Revert fix for #4484 (only compress images on last run, #4755).
This will mean some increase in the time it takes to
produce an image-heavy PDF with xelatex, but it will
make tables of contents correct, which is more important.
+ Fix logic error in `runTeXProgram`. We were running the tex program
one more time than requested. This should speed up PDF production.
* Allow `--template` to take a URL as argument.
* Text.Pandoc.Highlighting: Add missing re-export of `breezeDark`
highlighting style (#4687, Adrian Sieber, API change).
* Clarify macOS install in INSTALL.md (#4661). Make the binary package
installer the recommended method, and note that on some older versions of
macOS, homebrew installs from source and takes a lot of disk space
(#4664, Ian).
* MANUAL:
+ Clarify EPUB linked media (#4756, Mauro Bieg)
+ Update manual for "true" YAML values. Now that we're using HsYAML and
YAML 1.2, the valid true values are `true`, `True`, `TRUE`. NOTE!
`y`, `yes`, `on` no longer count as true values.
+ Document `-F` as alias for `--filter` (thanks to Gandalf Saxe).
+ Update manual on how math is rendered in LaTeX.
+ Add proxy description (#4131, Mauro Bieg).
+ Clarify that `--toc` requires `--standalone` (#4703).
+ Update citation styles link (#4699, wiefling).
* In API docs, clarify how `Ext_east_asian_line_breaks` extension works
(kaizshang91). Note that it will not take effect when readers/writers
are called as libraries (#4674).
* Improved translations/fr (#4766, lux-lth).
* Removed inadvertently added `.orig` files from repository (#4648).
* Remove `network-uri` flag and use 'Network.Socket'.
This removes a compiler warning. There is no need for the old
`network-uri` flag, since network 2.6 was released in 2014.
* Add stack.lts10.yaml, stack.lts11.yaml. use lts-12 in stack.yaml.
* Bump upper bounds for dependent packages.
* Exclude foundation 0.0.21 for ghc 7.10. Otherwise cabal gets
confused because of the way ghc 7.10 is excluded in foundation's
cabal file. This can be removed when haskell-foundation/foundation#500
is fixed.
* Require cabal-version >= 2.0. This is needed for haddock-library.
pandoc (2.2.1)
* Restored and undeprecated gladtex for HTML math (#4607).
+ Added `GladTeX` constructor to `Text.Pandoc.Options.HTMLMathMethod`
[API change, reverts removal in v2.2]
+ Restored and undeprecated `--gladtex` option, removed in v2.2.
* LaTeX reader: Handle `$` in `/text{..}` inside math (#4576).
* Org reader: Fix image filename recognition (Albert Krewinkel).
Use a function from the filepath library to check whether a string is a
valid file name. The custom validity checker that was used before gave
wrong results (e.g. for absolute file paths on Windows,
kawabata/ox-pandoc#52).
* FB2 reader: Replace some errors with warnings (Alexander Krotov).
* HTML writer:
+ Strip links from headers when creating TOC (#4340).
Otherwise the TOC entries will not link to the sections.
+ Fix regression with tex math environments in HTML + MathJax (#4639).
* Muse writer (Alexander Krotov): Add support for left-align and
right-align classes (#4542).
* Docx writer: Support underline (#4633).
* Text.Pandoc.Parsing: Lookahead for non-whitespace after
`singleQuoteStart` and `doubleQuoteStart` (#4637).
* `test-pandoc-utils.lua`: more robust testing on both windows
and \*nix. Previously the pipe tests were only run if
`\bin/false` and `/bin/sed` were present, which they aren't
in default MacOS and Windows systems. Fixed by using `tr`
and `false`, which should always be in the path on a \*nix
system, and `find` and `echo` for Windows.
* Text.Pandoc.Shared: add `uriPathToPath`.
This adjusts the path from a file: URI in a way that is sensitive
to Windows/Linux differences. Thus, on Windows,
`/c:/foo` gets interpreted as `c:/foo`, but on Linux,
`/c:/foo` gets interpreted as `/c:/foo`. See #4613.
* Use `uriPathToPath` with file: URIs (#4613).
* Revert piping HTML to pdf-engine (Mauro Bieg, #4413). Use a temp
file as before.
* Text.Pandoc.Class: Catch IO errors when writing media files
and issue a warning, rather than an error (Francesco Occhipinti, #4559).
* Don't lowercase custom writer filename (Alexander Krotov, #4610).
* MANUAL (Mauro Bieg):
+ Clarify truthiness in template variables (#2281).
+ Clarify pipe table width calculation (#4520).
* ConTeXt template: New Greek fallback typeface (Pablo Rodríguez, #4405).
CMU Serif gives better typographic results than the previous
Greek fallback DejaVu Serif.
* Make HTML template polyglot (#4606, OvidiusCicero), by making
`<link rel="stylesheet" href="$css$">` self-closing.
* Use texmath 0.11, allowing better translation of non-ASCII
characters in math (#4642).
pandoc (2.2)
* New input format: `fb2` (FictionBook2) (Alexander Krotov).
* Make `--ascii` work for all XML formats (ICML, OPML, JATS,...),
and for `ms` and `man`.
* Remove deprecated `--latexmathml`, `--gladtex`, `--mimetex`, `--jsmath`, `-m`,
`--asciimathml` options.
* New module Text.Pandoc.Readers.FB2, exporting readFB2 (Alexander
Krotov, API change).
* Markdown reader:
+ Allow empty key-value attributes, like `title=""` (#2944).
+ Handle table w/o following blank line in fenced div (#4560).
+ Remove "fallback" for `doubleQuote` parser. Previously the
parser tried to be efficient -- if no end double quote was found,
it would just return the contents. But this could backfire in a
case `**this should "be bold**`, since the fallback would return
the content `"be bold**` and the closing boldface delimiter
would never be encountered.
+ Improve computation of the relative width of the last column in a
multiline table, so we can round-trip tables without constantly
shrinking the last column.
* EPUB reader:
+ Fix images with space in file path (#4344).
* LaTeX reader:
+ Properly resolve section numbers with `\ref` and chapters (#4529).
+ Parse sloppypar environment (#4517, Marc Schreiber).
+ Improve handling of raw LaTeX (for markdown etc.) (#4589, #4594).
Previously there were some bugs in how macros were handled.
+ Support `\MakeUppercase`, `\MakeLowercase', `\uppercase`, `\lowercase`,
and also `\MakeTextUppercase` and `\MakeTextLowercase` from textcase
(#4959).
* Textile reader:
+ Fixed tables with no body rows (#4513).
Previously these raised an exception.
* Mediawiki reader:
+ Improve table parsing (#4508). This fixes detection of table
attributes and also handles `!` characters in cells.
* DocBook reader:
+ Properly handle title in `section` element (#4526).
Previously we just got `section_title` for `section` (though `sect1`,
`sect2`, etc. were handled properly).
+ Read tex math as output by asciidoctor (#4569, Joe Hermaszewski).
* Docx reader:
+ Combine adjacent CodeBlocks with the same attributes into
a single CodeBlock. This prevents a multiline codeblock in
Word from being read as different paragraphs.
* RST reader:
+ Allow < 3 spaces indent under directives (#4579).
+ Fix anonymous redirects with backticks (#4598).
* Muse reader (Alexander Krotov):
+ Add support for Text::Amuse multiline headings.
+ Add `<math>` tag support.
+ Add support for `<biblio>` and `<play>` tags.
+ Allow links to have empty descriptions.
+ Require block `<literal>` tags to be on separate lines.
+ Allow `-` in anchors.
+ Allow verse to be indented.
+ Allow nested footnotes.
+ Internal improvements.
* Muse writer (Alexander Krotov):
+ Escape `>` only at the beginning of a line.
+ Escape `]` in image title.
+ Escape `]` brackets in URLs as `%5D`.
+ Only escape brackets when necessary.
+ Escape ordered list markers.
+ Do not escape list markers unless preceded by space.
+ Escape strings starting with space.
+ Escape semicolons and markers after line break.
+ Escape `;` to avoid accidental comments.
+ Don't break headers, line blocks and tables with line breaks.
+ Correctly output empty headings.
+ Escape horizontal rule only if at the beginning of the line.
+ Escape definition list terms starting with list markers.
+ Place header IDs before header.
+ Improve span writing.
+ Do not join Spans in normalization.
+ Don't align ordered list items.
+ Remove key-value pairs from attributes before normalization.
+ Enable `--wrap=preserve` for all tests by default.
+ Reduced `<verbatim>` tags in output.
+ Internal changes.
* RST writer:
+ Use more consistent indentation (#4563). Previously we
used an odd mix of 3- and 4-space indentation. Now we use 3-space
indentation, except for ordered lists, where indentation must
depend on the width of the list marker.
+ Flatten nested inlines (#4368, Francesco Occhipinti).
Nested inlines are not valid RST syntax, so we flatten them following
some readability criteria discussed in #4368.
* EPUB writer:
+ Ensure that `pagetitle` is always set, even when structured titles
are used. This prevents spurious warnings about empty title
elements (#4486).
* FB2 writer (Alexander Krotov):
+ Output links inline instead of producing notes. Previously all links
were turned into footnotes with unclickable URLs inside.
+ Allow emphasis and notes in titles.
+ Don't intersperse paragraph with empty lines.
+ Convert metadata value `abstract` to book annotation.
+ Use `<empty-line />` for `HorizontalRule` rather than `LineBreak`.
FB2 does not have a way to represent line breaks inside paragraphs;
previously we used `<empty-line />` elements, but these are not allowed
inside paragraphs.
* Powerpoint writer (Jesse Rosenthal):
+ Handle Quoted Inlines (#4532).
+ Simplify code with `ParseXml`.
+ Allow fallback options when looking for placeholder type.
+ Check reference-doc for all layouts.
+ Simplify speaker notes logic.
+ Change notes state to a simpler per-slide value.
+ Remove `Maybe` from `SpeakerNotes` in `Slide`. `mempty`
means no speaker notes.
+ Add tests for improved speaker notes.
+ Handle speaker notes earlier in the conversion process.
+ Keep notes with related blocks (#4477). Some blocks automatically
split slides (imgs, tables, `column` divs). We assume that any
speaker notes immediately following these are connected to these
elements, and keep them with the related blocks, splitting after them.
+ Remove `docProps/thumbnail.jpeg` in data dir (Jesse Rosenthal, #4588).
It contained a nonfree ICC color calibration profile and is not needed
for production of a powerpoint document.
* Markdown writer:
+ Include a blank line at the end of the row in a single-row multiline
table, to prevent it from being interpreted as a simple table (#4578).
* CommonMark writer:
+ Correctly ignore LaTeX raw blocks when `raw_tex` is not
enabled (#4527, quasicomputational).
* EPUB writer:
+ Add `epub:type="footnotes"` to notes section in EPUB3 (#4489).
* LaTeX writer:
+ In beamer, don't use format specifier for default ordered lists
(#4556). This gives better results for styles that put ordered list
markers in boxes or circles.
+ Update `\lstinline` delimiters (#4369, Tim Parenti).
* Ms writer:
+ Use `\f[R]` rather than `\f[]` to reset font (#4552).
+ Use `\f[BI]` and `\f[CB]` in headers, instead of `\f[I]` and `\f[C]`,
since the header font is automatically bold (#4552).
+ Use `\f[CB]` rather than `\f[BC]` for monospace bold (#4552).
+ Create pdf anchor for a Div with an identifier (#4515).
+ Escape `/` character in anchor ids (#4515).
+ Improve escaping for anchor ids: we now use _uNNN_ instead of uNNN
to avoid ambiguity.
* Man writer:
+ Don't escape U+2019 as `'` (#4550).
* Text.Pandoc.Options:
+ Removed `JsMath`, `LaTeXMathML`, and `GladTeX` constructors from
`Text.Pandoc.Options.HTMLMathMethod` [API change].
* Text.Pandoc.Class:
+ `writeMedia`: unescape URI-escaping in file path. This avoids
writing things like `file%20one.png` to the file system.
* Text.Pandoc.Parsing:
+ Fix `romanNumeral` parser (#4480). We previously accepted 'DDC'
as 1100.
+ `uri`: don't treat `*` characters at end as part of URI (#4561).
* Text.Pandoc.MIME:
+ Use the alias `application/eps` for EPS (#2067).
This will ensure that we retain the eps extension after reading the
image into a mediabag and writing it again.
* Text.Pandoc.PDF:
+ Use `withTempDir` in `html2pdf`.
+ With `xelatex`, don't compress images til the last run (#4484).
This saves time for image-heavy documents.
+ Don't try to convert EPS files (#2067). `pdflatex` converts them
itself, and JuicyPixels can't do it.
+ For `pdflatex`, use a temp directory in the working directory.
Otherwise we can have problems with the EPS conversion pdflatex
tries to do, which can't operate on a file above the working
directory without `--shell-escape`.
* Changes to tests to accommodate changes in pandoc-types.
In <https://github.com/jgm/pandoc-types/pull/36> we changed
the table builder to pad cells. This commit changes tests
(and two readers) to accord with this behavior.
* Set default extensions for `beamer` same as `latex`.
* LaTeX template:
+ Add `beameroption` variable (#4359, Étienne Bersac).
+ Use `pgfpages` package; this is needed for notes on second
screen in beamer (Étienne Bersac).
+ Add `background-image` variable (#4601, John Muccigrosso).
* reveal.js template: Add `background-image` variable (#4600,
John Muccigrosso).
* ms template: Fix date. Previously `.ND` was used, but this only
works if you have a title page, which we don't. Thanks to @teoric.
* Removed pragmas for unused extensions (#4506, Anabra).
* Fix bash completion for `--print-default-data-file` (#4549).
Previously this looked in the filesystem, even if pandoc
was compiled with `embed_data_files` (and sometimes it looked
in a nonexistent build directory). Now the bash completion
script just includes a hard-coded list of data file names.
* MANUAL:
+ Clarify template vs metadata variables (#4501, Mauro Bieg).
+ Fix raw content example (#4479, Mauro Bieg).
+ Specify that you use html for raw output in epub.
+ Add examples for raw docx blocks (#4472, Tristan Stenner).
The documentation states that the target format name should match
the output format, which isn't the case for `docx`/`openxml` and
some others.
+ Don't say that `empty_paragraphs` affects markdown output (#4540).
+ Consolidate input/output format documentation (#4577, Mauro Bieg).
* New README template. Take in/out formats from manual.
* Fix example in lua-filters docs (#4459, HeirOfNorton).
* Use the `-threaded` GHC flag when building benchmarks (#4587,
Francesco Occhipinti).
* Bump temporary upper bound to 1.4.
* Use pandoc-citeproc 0.14.3.1.
* Use texmath-0.10.1.2 (fixes escapes in math in ms, #4597).
* Removed old lib directory. This was used for something long ago,
but plays no role now.
* Removed unneeded data file `LaTeXMathML.js`.
* Create 64- and 32-bit versions of Windows binary packages.
pandoc (2.1.3)
* Docx reader (Jesse Rosenthal):
+ Add tests for nested smart tags.
+ Parse nested smart tags.
+ Make unwrapSDT into a general `unwrap` function that can unwrap both
nested SDT tags and smartTags. This makes the SmartTags constructor in
the Docx type unnecessary, so we remove it (#4446).
+ Remove unused `docxWarnings` (Alexander Krotov).
* RST reader: Allow unicode bullet characters (#4454).
* Haddock reader: Better table handling, using haddock-library's
new table support, if compiled against a version that
includes it. Note that tables with col/rowspans will not
translate well into Pandoc.
* Muse reader (Alexander Krotov):
+ Require closing tag to have the same indentation as opening.
+ Do not reparse blocks inside unclosed block tag (#4425).
+ Parse `<class>` tag (supported by Emacs Muse).
+ Do not produce empty Str element for unindented verse lines.
+ Don't allow footnote references inside links.
+ Allow URL to be empty.
+ Require that comment semicolons are in the first column (#4551).
+ Various internal improvements.
* LaTeX reader:
+ Add support to parse unit string of `\SI` command (closes #4296,
Marc Schreiber).
* Haddock writer: In the writer, we now render tables always as
grid tables, since Haddock supports these.
* DokuWiki writer: rewrite backSlashLineBreaks (#4445, Mauro Bieg).
* Docx writer: Fixed formatting of `DefaultStyle` ordered lists in
docx writer. We want decimal for the top level, not lower roman.
* RST writer:
+ Strip whitespace at beginning and ending of inline containers
(#4327, Francesco Occhipinti).
+ Filter out empty inline containers (#4434). There is nothing in
RST that corresponds to e.g. `Emph []`, so we just ignore elements
like this (Francesco Occhipinti).
* Muse writer (Alexander Krotov):
+ Support spans with anchors.
+ Replace smallcaps with emphasis before normalization.
+ Output smallcaps as emphasis.
+ Expand Cite before list normalization.
+ Write empty inline lists as `<verbatim></verbatim>`.
+ Remove empty Str from the beginning of inline lists during normalization.
+ Escape "-" to avoid creating bullet lists.
+ Fix math expansion for more than one expression per paragraph.
+ Expand math before inline list normalization.
* Dokuwiki writer: fix LineBreaks in Tables (#4313, Mauro Bieg).
* Ms writer:
+ Asciify pdf anchors, since unicode anchors don't work (#4436).
Internal links should be converted automatically, so this shouldn't
affect users directly.
+ Don't escape hyphens as `\-`; that's for a minus sign (#4467).
* Beamer writer: put hyperlink after `\begin{frame}` and not in the title
(#4307). If it's in the title, then we get a titlebar on slides with
the `plain` attribute, when the id is non-null. This fixes a regression
in 2.0.
* EPUB writer: Remove notes from TOC in nav.xhtml (#4453, Mauro Bieg).
* JATS writer: Remove extraneous, significant whitespace (#4335,
Nokome Bentley).
* html2pdf: inject base tag with current working directory (#4413, Mauro
Bieg). This helps ensure that linked resources are included.
* Add Semigroup instances for everything for which we defined a
Monoid instance previously (API change):
+ Text.Pandoc.Class.FileTree.
+ Text.Pandoc.Translations.Translations.
+ Text.Pandoc.Extensions.Extensions.
+ Text.Pandoc.Readers.Odt.StyleReader.Styles.
+ Text.Pandoc.Pretty.Doc.
+ Text.Pandoc.MediaBag.MediaBag.
* Add custom Prelude to give clean code for Monoid and Semigroup
that works with ghc 7.10-8.4. The custom Prelude (`prelude/Prelude`)
is used for ghc versions < 8.4. `NoImplicitPrelude` is used
in all source files, and Prelude is explicitly imported
(this is necessary for ghci to work properly with the custom prelude).
* Text.Pandoc.Writers.Shared (Francesco Occhipinti):
+ Export `stripLeadingTrailingSpace`.
+ Don't wrap lines in grid tables when `--wrap=none` (#4320).
+ `gridTable`: Don't wrap lines in tables when `--wrap=none`. Instead,
expand cells, even if it results in cells that don't respect relative
widths or surpass page column width. This change affects RST,
Markdown, and Haddock writers.
* Raise error if someone tries to print docx, odt, etc. template (#4441).
* LaTeX template: Provide `bidi` package's option using
`\PassOptionsToPackage` (#4357, Václav Haisman). This avoid a
clash when `polyglossia` loads it first and then it is loaded again
for XeLaTeX.
* ConTeXt template: Added `pdfa` variable to generate PDF/A (#4294, Henri
Menke). Instructions on how to install the ICC profiles on ConTeXt
standalone can be found in the wiki:
<http://wiki.contextgarden.net/PDFX#ICC_profiles>.
If the ICC profiles are not available the log will contain error
messages.
* Use latest pandoc-types, skylighting
* Use latest pandoc-citeproc in binary package.
* Bump upper bound for time, criterion, haddock-library, exceptions,
http-types, aeson, haddock-library.
* Bump upper bound tasty-quickcheck 0.10 (#4429, Felix Yan).
* pandoc.cabal: fix up other-extensions and language fields.
Language is now consistently `Haskell2010`, and other-extensions
is consistently `NoImplicitPrelude`. Everything else to be specified
in the module header as needed.
* Removed `old-locale` flag and Text.Pandoc.Compat.Time.
This is no longer necessary since we no longer support ghc 7.8.
* Make `weigh-pandoc` into a benchmark program.
Remove `weigh-pandoc` flag. `weigh-pandoc` is now built (and run)
automatically when you build (and run) benchmarks.
* MANUAL: add instructions for background images reveal.js (#4325, John
Muccigrosso).
* appveyor: use VS 2013 environment instead of VS 2015 for Windows builds.
pandoc (2.1.2)
* Markdown reader:
+ Fix parsing bug with nested fenced divs (#4281). Previously we allowed
"nonindent spaces" before the opening and closing `:::`, but this
interfered with list parsing, so now we require the fences to be flush with
the margin of the containing block.
* Commonmark reader:
+ `raw_html` is now on by default. It can be disabled explicitly
using `-f commonmark-raw_html`.
* Org reader (Albert Krewinkel):
+ Move citation tests to separate module.
+ Allow changing emphasis syntax (#4378). The characters allowed before
and after emphasis can be configured via `#+pandoc-emphasis-pre` and
`#+pandoc-emphasis-post`, respectively. This allows to change which
strings are recognized as emphasized text on a per-document or even
per-paragraph basis. Example:
#+pandoc-emphasis-pre: "-\t ('\"{"
#+pandoc-emphasis-post: "-\t\n .,:!?;'\")}["
* LaTeX reader:
+ Fixed comments inside citations (#4374).
+ Fix regression in package options including underscore (#4424).
+ Make `--trace` work.
+ Fixed parsing of `tabular*` environment (#4279).
* RST reader:
+ Fix regression in parsing of headers with trailing space (#4280).
* Muse reader (Alexander Krotov):
+ Enable `<literal>` tags even if amuse extension is enabled.
Amusewiki disables <literal> tags for security reasons.
If user wants similar behavior in pandoc, RawBlocks and RawInlines
can be removed or replaced with filters.
+ Remove space prefix from `<literal>` tag contents.
+ Do not consume whitespace while looking for closing end tag.
+ Convert alphabetical list markers to decimal in round-trip test.
Alphabetical lists are an addition of Text::Amuse.
They are not present in Emacs Muse and can be ambiguous
when list starts with "i.", "c." etc.
+ Allow `<quote>` and other tags to be indented.
+ Allow single colon in definition list term.
+ Fix parsing of verse in lists.
+ Improved parsing efficiency. Avoid `parseFromString`.
Lists are parsed in linear instead of exponential time now.
+ Replace ParserState with MuseState.
+ Prioritize lists with roman numerals over alphabetical lists.
This is to make sure "i." starts a roman numbered list,
instead of a list with letter "i" (followed by "j", "k", ...").
+ Fix directive parsing.
+ Parse definition lists with multiple descriptions.
+ Parse next list item before parsing more item contents.
+ Fixed a bug: headers did not terminate lists.
+ Move indentation parsing from `definitionListItem` to `definitionList`.
+ Paragraph indentation does not indicate nested quote.
Muse allows indentation to indicate quotation or alignment,
but only on the top level, not within a <quote> or list.
+ Require that block tags are on separate lines.
Text::Amuse already explicitly requires it anyway.
+ Fix matching of closing inline tags.
+ Various internal changes.
+ Fix parsing of nested definition lists.
+ Require only one space for nested definition list indentation.
+ Do not remove trailing whitespace from `<code>`.
+ Fix parsing of trailing whitespace. Newline after whitespace now
results in softbreak instead of space.
* Docx reader (Jesse Rosenthal, except where noted):
+ Handle nested sdt tags (#4415).
+ Don't look up dependent run styles if `+styles` is enabled.
+ Move pandoc inline styling inside custom-style span.
+ Read custom styles (#1843). This will read all paragraph and
character classes as divs and spans, respectively. Dependent styles
will still be resolved, but will be wrapped with appropriate style
tags. It is controlled by the `+styles` extension (`-f docx+styles`).
This can be used in conjunction with the `custom-style` feature in the
docx writer for a pandoc-docx editing workflow. Users can convert from
an input docx, reading the custom-styles, and then use that same input
docx file as a reference-doc for producing an output docx file. Styles
will be maintained across the conversion, even if pandoc doesn't
understand them.
+ Small change to Fields hyperlink parser. Previously, unquoted string
required a space at the end of the line (and consumed it). Now we
either take a space (and don't consume it), or end of input.
+ Pick table width from the longest row or header (Francesco Occhipinti,
#4360).
* Muse writer (Alexander Krotov):
+ Change verse markup: `> ` instead of `<verse>` tag.
+ Remove empty strings during inline normalization.
+ Don't indent nested definition lists.
+ Use unicode quotes for quoted text.
+ Write image width specified in percent in Text::Amuse mode.
+ Don't wrap displayMath into `<verse>`.
+ Escape nonbreaking space (`~~`).
+ Join code with different attributes during normalization.
+ Indent lists inside Div.
+ Support definitions with multiple descriptions.
* Powerpoint writer (Jesse Rosenthal):
+ Use table styles This will use the default table style in the
reference-doc file. As a result they will be easier when using
in a template, and match the color scheme.
+ Remove empty slides. Because of the way that slides were split, these
could be accidentally produced by comments after images. When animations
are added, there will be a way to add an empty slide with either
incremental lists or pauses.
+ Implement syntax highlighting. Note that background colors can't
be implemented in PowerPoint, so highlighting styles that require
these will be incomplete.
+ New test framework for pptx. We now compare the output of the
Powerpoint writer with files that we know to (a) not be corrupt,
and (b) to show the desired output behavior (details below).
+ Add `notesMaster` to `presentation.xml` if necessary.
+ Ignore links and (end)notes in speaker notes.
+ Output speaker notes.
+ Read speaker note templates conditionally. If there are speaker
notes in the presentation, we read in the notesMasters templates
from the reference pptx file.
+ Fix deletion track changes (#4303, Jesse Rosenthal).
* Markdown writer: properly escape @ to avoid capture as citation
(#4366).
* LaTeX writer:
+ Put hypertarget inside figure environment (#4388).
This works around a problem with the endfloat package and
makes pandoc's output compatible with it.
+ Fix image height with percentage (#4389). This previously caused
the image to be resized to a percentage of textwidth, rather than
textheight.
* ConTeXt writer (Henri Menke):
+ New section syntax and support `--section-divs` (#2609).
`\section[my-header]{My Header}` ->
`\section[title={My Header},reference={my-header}]`.
The ConTeXt writer now supports the `--section-divs` option to
write sections in the fenced style, with `\startsection` and
`\stopsection`.
+ xtables: correct wrong usage of caption (Henri Menke).
* Docx writer:
+ Fix image resizing with multiple images (#3930, Andrew Pritchard).
+ Use new golden framework (Jesse Rosenthal).
+ Make more deterministic to facilitate testing (Jesse Rosenthal).
- `getUniqueId` now calls to the state to get an incremented digit,
instead of calling to P.uniqueHash.
- we always start the PRNG in mkNumbering/mkAbstractNum with the same
seed (1848), so our randoms should be the same each time.
+ Fix ids in comment writing (Jesse Rosenthal). Comments from
`--track-changes=all` were producing corrupt docx, because the
writer was trying to get id from the `(ID,_,_)` field of
the attributes, and ignoring the "id" entry in the key-value pairs. We
now check both.
* Ms writer: Added papersize variable.
* TEI writer:
+ Use `height` instead of `depth` for images (#4331).
+ Ensure that id prefix is always used.
+ Don't emit `role` attribute; that was a leftover from the
Docbook writer.
+ Use 'xml:id', not 'id' attribute (#4371).
* AsciiDoc writer:
+ Do not output implicit heading IDs (#4363, Alexander
Krotov). Convert to `asciidoc-auto_identifiers` for old behaviour.
* RST writer:
+ Remove `blockToRST'` moving its logic into `fixBlocks`
(Francesco Occhipinti).
+ Insert comment between lists and quotes (#4248, Francesco Occchipinti).
* RST template: remove definition of 'math' role as raw.
This used to be needed prior to v 0.8 of docutils, but
now math support is built-in.
* Slides: Use divs to set incremental/non-incremental (#4381,
Jesse Rosenthal). The old method (list inside blockquote) still
works, but we are encouraging the use of divs with class
`incremental` or `nonincremental`.
* Text.Pandoc.ImageSize:
+ Make image size detection for PDFs more robust (#4322).
+ Determine image size for PDFs (#4322).
+ EMF Image size support (#4375, Andrew Pritchard).
* Text.Pandoc.Extensions:
+ Add `Ext_styles` (Jesse Rosenthal, API change). This will be used in
the docx reader (defaulting to off) to read pargraph and character
styles not understood by pandoc (as divs and spans, respectively).
+ Made `Ext_raw_html` default for `commonmark` format.
* Text.Pandoc.Parsing:
+ Export `manyUntil` (Alexander Krotov, API change).
+ Export improved `sepBy1` (Alexander Krotov).
+ Export list marker parsers: `upperRoman`, `lowerRoman`,
`decimal`, `lowerAlpha`, `upperAlpha` (Alexander Krotov, API change).
* Tests/Lua: fix tests on windows (Albert Krewinkel).
* Lua: register script name in global variable (#4393). The name of the Lua
script which is executed is made available in the global Lua variable
`PANDOC_SCRIPT_FILE`, both for Lua filters and custom writers.
* Tests: Abstract powerpoint tests out to OOXML tests (Jesse Rosenthal).
There is very little pptx-specific in these tests, so we abstract out
the basic testing function so it can be used for docx as well. This
should allow us to catch some errors in the docx writer that slipped
by the roundtrip testing.
* Lua filters: store constructors in registry (Albert Krewinkel). Lua
functions used to construct AST element values are stored in the Lua
registry for quicker access. Getting a value from the registry is much
faster than getting a global value (partly to idiosyncrasies of hslua);
this change results in a considerable performance boost.
* Documentation:
+ `doc/org.md` Add draft of Org-mode documentation (Albert Krewinkel).
+ `doc/lua-filters.md`: document global vars set for filters
(Albert Krewinkel).
+ INSTALL.md: mention Stack version. (#4343, Adam Brandizzi).
+ MANUAL: add documentation on custom styles (Jesse Rosenthal).
+ MANUAL.txt: Document incremental and nonincremental divs (Jesse
Rosenthal). Blockquoted lists are still described, but fenced divs are
presented in preference.
+ MANUAL.txt: document header and footer variables (newmana).
+ MANUAL.txt: self-contained implies standalone (#4304, Daniel Lublin).
+ CONTRIBUTING.md: label was renamed. (#4310, Alexander Brandizzi).
* Require tagsoup 0.14.3 (#4282), fixing HTML tokenization bug.
* Use latest texmath.
* Use latest pandoc-citeproc.
* Allow exceptions 0.9.
* Require aeson-pretty 0.8.5 (#4394).
* Bump blaze-markup, blaze-html lower bounds to 0.8, 0.9 (#4334).
* Update tagsoup to 0.14.6 (Alexander Krotov, #4282).
* Removed ghc-prof-options. As of cabal 1.24, sensible defaults are used.
* Update default.nix to current nixpkgs-unstable for hslua-0.9.5 (#4348,
jarlg).
pandoc (2.1.1)
* Markdown reader:
+ Don't coalesce adjacent raw LaTeX blocks if they are separated by a
blank line. See lierdakil/pandoc-crossref#160.
+ Improved `inlinesInBalancedBrackets` (#4272, jgm/pandoc-citeproc#315).
The change both improves performance and fixes a regression whereby
normal citations inside inline notes and figure captions were not
parsed correctly.
* RST reader:
+ Better handling for headers with an anchor (#4240). Instead of creating a
Div containing the header, we put the id directly on the header.
This way header promotion will work properly.
+ Add aligned environment when needed in math (#4254). `rst2latex.py`
uses an `align*` environment for math in `.. math::` blocks, so this
math may contain line breaks. If it does, we put the math in an
`aligned` environment to simulate `rst2latex.py`'s behavior.
* HTML reader:
+ Fix col width parsing for percentages < 10% (#4262, n3fariox).
* LaTeX reader:
+ Advance source position at end of stream.
+ Pass through macro defs in `rawLaTeXBlock` even if the `latex_macros`
extension is set (#4246). This reverts to earlier behavior and is
probably safer on the whole, since some macros only modify things in
included packages, which pandoc's macro expansion can't modify.
+ Fixed pos calculation in tokenizing escaped space.
+ Allow macro definitions inside macros (#4253). Previously we went into
an infinite loop with
```
\newcommand{\noop}[1]{#1}
\noop{\newcommand{\foo}[1]{#1}}
\foo{hi}
```
+ Fix inconsistent column widths (#4238). This fixes a bug whereby column
widths for the body were different from widths for the header in some
tables.
* Docx reader (Jesse Rosenthal):
+ Parse hyperlinks in `instrText` tags (#3389, #4266). This was a form of
hyperlink found in older versions of word. The changes introduced for
this, though, create a framework for parsing further fields in MS Word
(see the spec, ECMA-376-1:2016, §17.16.5, for more on these fields).
We introduce a new module, `Text.Pandoc.Readers.Docx.Fields` which
contains a simple parsec parser. At the moment, only simple hyperlink
fields are accepted, but that can be extended in the future.
* Muse reader (Alexander Krotov):
+ Parse `~~` as non-breaking space in Text::Amuse mode.
+ Refactor list parsing.
* Powerpoint writer (Jesse Rosenthal):
+ Change reference to `notesSlide` to `endNotesSlide`.
+ Move image sizing into `picProps`.
+ Improve table placement.
+ Make our own `_rels/.rels` file.
+ Import reference-doc images properly.
+ Move `Presentation.hs` out of `PandocMonad`.
+ Refactor into separate modules. T.P.W.Powerpoint.Presentation
defines the Presentation datatype and goes Pandoc->Presentation;
T.P.W.Pandoc.Output goes Presentation->Archive.
Text.Pandoc.Writers.Powerpoint a thin wrapper around the two modules.
+ Avoid overlapping blocks in column output.
+ Position images correctly in two-column layout.
+ Make content shape retrieval environment-aware.
+ Improve image handling. We now determine image and caption placement
by getting the dimensions of the content box in a given layout.
This allows for images to be correctly sized and positioned in a
different template. Note that images without captions and headers are
no longer full-screened. We can't do this dependably in different
layouts, because we don't know where the header is (it could be to
the side of the content, for example).
+ Read presentation size from reference file. Our presentation size is
now dependent on the reference/template file we use.
+ Handle (sub)headers above slidelevel correctly. Above the slidelevel,
subheaders will be printed in bold and given a bit of extra space
before them. Note that at the moment, no distinction is made between
levels of headers above the slide header, though that can be changed.
+ Check for required files. Since we now import from reference/dist
file by glob, we need to make sure that we're getting the files we
need to make a non-corrupt Powerpoint. This performs that check.
+ Improve templating using `--reference-doc`. Templating should work
much more reliably now.
+ Include Notes slide in TOC.
+ Set notes slide header to slide-level.
+ Add table of contents. This is triggered by the `--toc` flag. Note
that in a long slide deck this risks overrunning the text box. The user
can address this by setting `--toc-depth=1`.
+ Set notes slide number correctly.
+ Clean up adding metadata slide. We want to count the slide numbers
correctly if it's in there.
+ Add anchor links. For anchor-type links (`[foo](#bar)`) we produce
an anchor link. In powerpoint these are links to slides, so we keep
track of a map relating anchors to the slides they occur on.
+ Make the slide number available to the blocks. For anchors,
block-processing functions need to know what slide number
they're in. We make the `envCurSlideId` available to blocks.
+ Move `curSlideId` to environment.
+ Allow setting `toc-title` in metadata.
+ Link notes to endnotes slide.
* Markdown writer:
+ Fix cell width calculation (#4265). Previously we could get
ever-lengthening cell widths when a table was run repeatedly through
`pandoc -f markdown -t markdown`.
* LaTeX writer:
+ Escape `&` in lstinline (Robert Schütz).
* ConTeXt writer:
+ Use xtables instead of Tables (#4223, Henri Menke).
Default to xtables for context output. Natural Tables are used
if the new `ntb` extension is set.
* HTML writer:
+ Fixed footnote backlinks with `--id-prefix` (#4235).
* `Text.Pandoc.Extensions`: Added `Ext_ntb` constructor (API change,
Henri Menke).
* `Text.Pandoc.ImageSize`: add derived `Eq` instance to `Dimension`
(Jesse Rosenthal, API change).
* Lua filters (Albert Krewinkel):
+ Make `PANDOC_READER_OPTIONS` available.
The options which were used to read the document are made available to
Lua filters via the `PANDOC_READER_OPTIONS` global.
+ Add lua module `pandoc.utils.run_json_filter`, which runs a JSON filter
on a Pandoc document.
+ Refactor filter-handling code into `Text.Pandoc.Filter.JSON`,
`Text.Pandoc.Filter.Lua`, and `Text.Pandoc.Filter.Path`.
+ Improve error messages. Provide more context about the task
which caused an error.
* data/pandoc.lua (Albert Krewinkel):
+ Accept singleton inline as a list. Every constructor which accepts a
list of inlines now also accepts a single inline element for
convenience.
+ Accept single block as singleton list. Every constructor which accepts
a list of blocks now also accepts a single block element for
convenience. Furthermore, strings are accepted as shorthand for
`{pandoc.Str "text"}` in constructors.
+ Add attr, listAttributes accessors. Elements with
attributes got an additional `attr` accessor. Attributes were
accessible only via the `identifier`, `classes`, and `attributes`,
which was in conflict with the documentation, which indirectly states
that such elements have the an `attr` property.
+ Drop `_VERSION`. Having a `_VERSION` became superfluous, as this
module is closely tied to the pandoc version, which is available via
`PANDOC_VERSION`.
+ Fix access to Attr components. Accessing an Attr value (e.g.,
` Attr().classes`) was broken; the more common case of accessing it via
an Inline or Block element was unaffected by this.
* Move `metaValueToInlines` to from Docx writer to
`Text.Pandoc.Writers.Shared`, so it can be used by other writers
(Jesse Rosenthal).
* MANUAL.txt:
+ Clarify otherlangs in LaTeX (#4072).
+ Clarify `latex_macros` extension.
+ Recommend use of `raw_attribute` extension in header includes (#4253).
* Allow latest QuickCheck, tasty, criterion.
* Remove custom prelude and ghc 7.8 support.
* Reduce compiler noise (exact paths for compiled modules).
pandoc (2.1)
* Allow filters and lua filters to be interspersed (#4196). Previously
we ran all lua filters before JSON filters. Now we run filters in
the order they are presented on the command line, whether lua or JSON.
There are two incompatible API changes: The type of `applyFilters`
has changed, and `applyLuaFilters` has been removed. `Filter` is
also now exported.
* Use latest skylighting and omit the `missingIncludes` check, fixing
a major performance regression in earlier releases of the 2.x series
(#4226). Behavior change: If you use a custom syntax definition that
refers to a syntax you haven't loaded, pandoc will now complain when
it is highlighting the text, rather than doing a check at the start.
This change dramatically speeds up invocations of pandoc on short
inputs.
* Text.Pandoc.Class: make `FileTree` opaque (don't export
`FileTree` constructor). This forces users to interact with it using
`insertInFileTree` and `getFileInfo`, which normalize file names.
* Markdown reader:
+ Rewrite `inlinesInBalancedBrackets`. The rewrite is much more
direct, avoiding `parseFromString`. And it performs significantly
better; unfortunately, parsing time still increases exponentially
(see #1735).
+ Avoid parsing raw tex unless `\` + letter seen. This seems to
help with the performance problem, #4216.
* LaTeX reader: Simplified a check for raw tex command.
* Muse reader (Alexander Krotov):
+ Enable round trip test (#4107).
+ Automatically translate `#cover` into `#cover-image`.
Amusewiki uses #cover directive to specify cover image.
* Docx reader (Jesse Rosenthal):
+ Allow for insertion/deletion of paragraphs (#3927).
If the paragraph has a deleted or inserted paragraph break (depending
on the track-changes setting) we hold onto it until the next
paragraph. This takes care of accept and reject. For this we introduce
a new state which holds the ils from the previous para if necessary.
For `--track-changes=all`, we add an empty span with class
`paragraph-insertion`/`paragraph-deletion` at the end of the paragraph
prior to the break to be inserted or deleted.
+ Remove unused anchors (#3679). Docx produces a lot of anchors with
nothing pointing to them---we now remove these to produce cleaner
output. Note that this has to occur at the end of the process
because it has to follow link/anchor rewriting.
+ Read multiple children of `w:sdtContents`.
+ Combine adjacent anchors. There isn't any reason to have numerous
anchors in the same place, since we can't maintain docx's
non-nesting overlapping. So we reduce to a single anchor.
+ Improved tests.
* Muse writer (Alexander Krotov): don't escape URIs from AST
* Docx writer:
+ Removed redundant subtitle in title (Sebastian Talmon).
+ `firstRow` table definition compatibility for Word 2016 (Sebastian
Talmon). Word 2016 seems to use a default value of "1" for table
headers, if there is no firstRow definition (although a default
value of 0 is documented), so all tables get the first Row formatted
as header. Setting the parameter to 0 if the table has no header
row fixes this for Word 2016
+ Fix custom styles with spaces in the name (#3290).
* Powerpoint writer (Jesse Rosenthal):
+ Ignore Notes div for parity with other slide outputs.
+ Set default slidelevel correctly. We had previously defaulted to
slideLevel 2. Now we use the correct behavior of defaulting to the
highest level header followed by content. We change an expected test
result to match this behavior.
+ Split blocks correctly for linked images.
+ Combine adjacent runs.
+ Make inline code inherit code size. Previously (a) the code size
wasn't set when we force size, and (b) the properties was set from
the default, instead of inheriting.
+ Simplify `replaceNamedChildren` function.
+ Allow linked images. The following markdown:
`[![Image Title](image.jpg)](http://www.example.com)`
will now produce a linked image in the resulting PowerPoint file.
+ Fix error with empty table cell. We require an empty `<a:p>` tag,
even if the cell contains no paragraphs---otherwise PowerPoint
complains of corruption.
+ Implement two-column slides. This uses the columns/column div
format described in the pandoc manual. At the moment, only two
columns (half the screen each) are allowed. Custom widths are not
supported.
+ Added more tests.
* OpenDocument/ODT writers: improved rendering of formulas (#4170, oltolm).
* Lua filters (Albert Krewinkel):
+ `data/pandoc.lua`: drop 'pandoc-api-version' from Pandoc objects
+ The current pandoc-types version is made available to Lua programs in
the global `PANDOC_API_VERSION`. It contains the version as a list of
numbers.
+ The pandoc version available as a global `PANDOC_VERSION` (a list
of numbers).
+ `data/pandoc.lua`: make `Attr` an `AstElement`.
+ `data/pandoc.lua`: make all types subtypes of `AstElement`.
`Pandoc`, `Meta`, and `Citation` were just plain functions and did
not set a metatable on the returned value, which made it difficult
to amend objects of these types with new behavior. They are now
subtypes of AstElement, meaning that all their objects can gain
new features when a method is added to the behavior object
(e.g., `pandoc.Pandoc.behavior`).
+ `data/pandoc.lua`: split type and behavior tables. Clearly distinguish
between a type and the behavioral properties of an instance of that
type. The behavior of a type (and all its subtypes) can now be
amended by adding methods to that types `behavior` object, without
exposing the type objects internals. E.g.:
```lua
pandoc.Inline.behavior.frob = function () print'42' end
local str = pandoc.Str'hello'
str.frob() -- outputs '42'
```
+ `data/pandoc.lua`: fix Element inheritance. Extending all elements
of a given type (e.g., all inline elements) was difficult, as the
table used to lookup unknown methods would be reset every time a
new element of that type was created, preventing recursive property
lookup. This is was changed in that all methods and attributes of
supertypes are now available to their subtypes.
+ `data/pandoc.lua`: fix attribute names of Citation (#4222). The
fields were named like the Haskell fields, not like the documented,
shorter version. The names are changed to match the documentation
and Citations are given a shared metatable to enable simple
extensibility.
+ `data/pandoc.lua`: drop function `pandoc.global_filter`.
+ Bump `hslua` version to 0.9.5. This version fixes a bug that made it
difficult to handle failures while getting lists or a Map from Lua.
A bug in pandoc, which made it necessary to always pass a tag when
using MetaList or MetaBlock, is fixed as a result. Using the pandoc
module's constructor functions for these values is now optional
(if still recommended).
+ Stop exporting `pushPandocModule` (API change). The introduction
of `runPandocLua` renders direct use of this function obsolete.
+ Update generation of module docs for lua filters.
+ `Lua.Module.Utils`: make stringify work on `MetaValues` (John
MacFarlane). I'm sure this was intended in the first place,
but currently only `Meta` is supported.
* Improve benchmarks.
+ Set the default extensions properly.
+ Improve benchmark argument parsing. You can now say
`make bench BENCHARGS="markdown latex reader"` and both the
markdown and latex readers will be benchmarked.
* MANUAL.txt simplify and add more structure (Mauro Bieg).
* Generate README.md from template and MANUAL.txt.
`make README.md` will generate the README.md after changes
to MANUAL.txt have been made.
* Update copyright notices to include 2018 (Albert Krewinkel).
pandoc (2.0.6)
* Added `jats` as an input format.
+ Add Text.Pandoc.Readers.JATS, exporting `readJATS` (API
change) (Hamish Mackenzie).
+ Improved citation handling in JATS reader. JATS citations
are now converted to pandoc citations, and JATS ref-lists
are converted into a `references` field in metadata, suitable
for use with pandoc-citeproc. Thus a JATS article with embedded
bibliographic information can be processed with pandoc and
pandoc-citeproc to produce a formatted bibliography.
* Allow `--list-extensions` to take an optional FORMAT argument.
This lists the extensions set by default for the selected FORMAT.
The extensions are now alphabetized, and the `+` or `-`
indicating the default setting comes before, rather than after,
the extension.
* Markdown reader:
+ Preserve original whitespace between blocks.
+ Recognize `\placeformula` as context.
+ Be pickier about table captions. A caption starts with a `:` which
can't be followed by punctuation. Otherwise we can falsely interpret
the start of a fenced div, or even a table header line like
`:--:|:--:`, as a caption.
+ Always use four space rule for example lists. It would be awkward
to indent example list contents to the first non-space character after
the label, since example list labels are often long. Thanks to
Bernhard Fisseni for the suggestion.
+ Improve raw tex parsing. Note that the Markdown reader is also
affected by the `latex_macros` extension changes described below
under the LaTeX reader.
* LaTeX reader:
+ `latex_macros` extension changes (#4179). Don't pass through macro
definitions themselves when `latex_macros` is set. The macros
have already been applied. If `latex_macros` is enabled, then
`rawLaTeXBlock` in Text.Pandoc.Readers.LaTeX will succeed in parsing
a macro definition, and will update pandoc's internal macro map
accordingly, but the empty string will be returned.
+ Export `tokenize`, `untokenize` (API change).
+ Use `applyMacros` in `rawLaTeXBlock`, `rawLaTeXInline`.
+ Refactored `inlineCommand`.
+ Fix bug in tokenizer. Material following `^^` was
dropped if it wasn't a character escape. This only affected
invalid LaTeX, so we didn't see it in the wild, but it appeared
in a QuickCheck test failure.
+ Fix regression in LateX tokenization (#4159). This mainly affects the
Markdown reader when parsing raw LaTeX with escaped spaces.
+ Add tests of LaTeX tokenizer.
+ Support `\foreignlanguage` from babel.
+ Be more tolerant of `&` character (#4208). This allows us to parse
unknown tabular environments as raw LaTeX.
* Muse reader (Alexander Krotov):
+ Parse anchors immediately after headings as IDs.
+ Require that note references does not start with 0.
+ Parse empty comments correctly.
* Org reader (Albert Krewinkel):
+ Fix asterisks-related parsing error (#4180).
+ Support minlevel option for includes (#4154). The level of headers
in included files can be shifted to a higher level by specifying a
minimum header level via the `:minlevel` parameter. E.g.
`#+include: "tour.org" :minlevel 1` will shift the headers in
tour.org such that the topmost headers become level 1 headers.
+ Break-up org reader test file into multiple modules.
* OPML reader:
+ Enable raw HTML and other extensions by default for notes
(#4164). This fixes a regression in 2.0. Note that extensions can
now be individually disabled, e.g. `-f opml-smart-raw_html`.
* RST reader:
+ Allow empty list items (#4193).
+ More accurate parsing of references (#4156). Previously we erroneously
included the enclosing backticks in a reference ID (#4156). This
change also disables interpretation of syntax inside references, as
in docutils. So, there is no emphasis in `` `my *link*`_ ``.
* Docx reader:
+ Continue lists after interruption (#4025, Jesse Rosenthal).
Docx expects that lists will continue where they left off after an
interruption and introduces a new id if a list is starting again. So
we keep track of the state of lists and use them to define a "start"
attribute, if necessary.
+ Add tests for structured document tags unwrapping (Jesse Rosenthal).
+ Preprocess Document body to unwrap `w:sdt` elements (Jesse Rosenthal,
#4190).
* Plain writer:
+ Don't linkify table of contents.
* RST writer:
+ Fix anchors for headers (#4188). We were missing an `_`.
* PowerPoint writer (Jesse Rosenthal):
+ Treat lists inside BlockQuotes as lists. We don't yet produce
incremental lists in PowerPoint, but we should at least treat lists
inside BlockQuotes as lists, for compatibility with other slide formats.
+ Add ability to force size. This replaces the more specific
`blockQuote runProp`, which only affected the size of blockquotes. We
can use this for notes, etc.
+ Implement notes. This currently prints all notes on a final slide.
Note that at the moment, there is a danger of text overflowing the
note slide, since there is no logic for adding further slides.
+ Implement basic definition list functionality to PowerPoint writer.
+ Don't look for default template file for Powerpoint (#4181).
+ Add pptx to isTextFormat list. This is used to check standalone
and not writing to the terminal.
+ Obey slide level option (Jesse Rosenthal).
+ Introduce tests.
* Docx writer:
+ Ensure that `distArchive` is the one that comes with pandoc
(#4182). Previously a `reference.docx` in `~/.pandoc` (or the user data
dir) would be used instead, and this could cause problems because a
user-modified docx sometimes lacks vital sections that we count
on the `distArchive` to supply.
* Org writer:
+ Do not wrap "-" to avoid accidental bullet lists (Alexander Krotov).
+ Don't allow fn refs to wrap to beginning of line (#4171, with help from
Alexander Krotov). Otherwise they can be interpreted as footnote
definitions.
* Muse writer (Alexander Krotov):
+ Don't wrap note references to the next line (#4172).
* HTML writer:
+ Use br elements in line blocks instead of relying on CSS
(#4162). HTML-based templates have had the custom CSS for
`div.line-block` removed. Those maintaining custom templates will want
to remove this too. We still enclose line blocks in a div with class
`line-block`.
* LaTeX writer:
+ Use `\renewcommand` for `\textlatin` with babel (#4161).
This avoids a clash with a deprecated `\textlatin` command defined
in Babel.
+ Allow fragile=singleslide attribute in beamer slides (#4169).
+ Use `\endhead` after `\toprule` in headerless tables (#4207).
* FB2 writer:
+ Add cover image specified by `cover-image` meta (Alexander Krotov,
#4195).
* JATS writer (Hamish Mackenzie):
+ Support writing `<fig>` and `<table-wrap>` elements
with `<title>` and `<caption>` inside them by using Divs with class set
to one of `fig`, `table-wrap` or `caption` (Hamish Mackenzie). The
title is included as a Heading so the constraint on where Heading can
occur is also relaxed.
+ Leave out empty alt attributes on links.
+ Deduplicate image mime type code.
+ Make `<p>` optional in `<td>` and `<th>` (#4178).
+ Self closing tags for empty xref (#4187).
+ Improve support for code language.
* Custom writer:
+ Use init file to setup Lua interpreter (Albert Krewinkel).
The same init file (`data/init`) that is used to setup the Lua
interpreter for Lua filters is also used to setup the interpreter of
custom writers.lua.
+ Define instances for newtype wrapper (Albert Krewinkel). The custom
writer used its own `ToLuaStack` instance definitions, which made
it difficult to share code with Lua filters, as this could result
in conflicting instances. A `Stringify` wrapper is introduced to
avoid this problem.
+ Added tests for custom writer.
+ Fixed definition lists and tables in `data/sample.lua`.
* Fixed regression: when target is PDF, writer extensions were being
ignored. So, for example, `pandoc -t latex-smart -o file.pdf`
did not work properly.
* Lua modules (Albert Krewinkel):
+ Add `pandoc.utils` module, to hold utility functions.
+ Create a Haskell module Text.Pandoc.Lua.Module.Pandoc to
define the `pandoc` lua module.
+ Make a Haskell module for each Lua module. Move definitions for the
`pandoc.mediabag` modules to a separate Haskell module.
+ Move `sha1` from the main `pandoc` module to `pandoc.utils`.
+ Add function `pandoc.utils.hierarchicalize` (convert list of
Pandoc blocks into (hierarchical) list of Elements).
+ Add function `pandoc.utils.normalize_date` (parses a date and
converts it (if possible) to "YYYY-MM-DD" format).
+ Add function `pandoc.utils.to_roman_numeral` (allows conversion
of numbers below 4000 into roman numerals).
+ Add function `pandoc.utils.stringify` (converts any AST element
to a string with formatting removed).
+ `data/init.lua`: load `pandoc.utils` by default
+ Turn pipe, read into full Haskell functions. The `pipe` and `read`
utility functions are converted from hybrid lua/haskell functions
into full Haskell functions. This avoids the need for intermediate
`_pipe`/`_read` helper functions, which have dropped.
+ pandoc.lua: re-add missing MetaMap function. This was a bug
introduced in version 2.0.4.
* Text.Pandoc.Class: Add `insertInFileTree` [API change]. This gives
a pure way to insert an ersatz file into a `FileTree`. In addition, we
normalize paths both on insertion and on lookup.
* Text.Pandoc.Shared: export `blocksToInlines'` (API change, Maura Bieg).
* Text.Pandoc.MIME: Add opus to MIME type table as audio/ogg (#4198).
* Text.Pandoc.Extensions: Alphabetical order constructors for
`Extension`. This makes them appear in order in `--list-extensions`.
* Allow lenient decoding of latex error logs, which are not always
properly UTF8-encoded (#4200).
* Update latex template to work with recent versions of beamer.
The old template produced numbered sections with some recent
versions of beamer. Thanks to Thomas Hodgson.
* Updated reference.docx (#4175). Instead of just "Hello, world", the
document now contains exemplars of most of the styles that have an
effect on pandoc documents. This makes it easier to see the effect
of style changes.
* Removed `default.theme` data file (#4096). It is no longer needed now
that we have `--print-highlight-style`.
* Added `stack.lts9.yaml` for building with lts 9 and ghc 8.0.2.
We still need this for the alpine static linux build, since
we don't have ghc 8.2.2 for that yet.
* Removed `stack.pkg.yaml`. We only really need `stack.yaml`; we
can put flag settings for pandoc-citeproc there.
* Makefile: Add 'trypandoc' and 'pandoc-templates' targets to
make releases easier.
* MANUAL.txt:
+ Add note on what formats have `+smart` by default.
+ Use native syntax for custom-style (#4174, Mauro Bieg).
+ Introduce dedicated Extensions section, since some extensions
affect formats other than markdown (Mauro Bieg, #4204).
+ Clarify default html output for `--section-divs` (Richard Edwards).
* filters.md: say that Text.Pandoc.JSON comes form pandoc-types.
Closes jgm/pandoc-website#16.
* epub.md: Delete removed `-S` option from command (#4151, Georger Araújo).
pandoc (2.0.5)
* Fix a bug in 2.0.4, whereby pandoc could not read the theme files
generated with `--print-highlight-style` (#4133). Improve JSON
serialization of styles.
* Fix CSS issues involving line numbers (#4128).
Highlighted code blocks are now enclosed in a div with class `sourceCode`.
Highlighting CSS no longer sets a generic color for pre and code; we only
set these for class `sourceCode`.
* `--pdf-engine-opt`: fix bug where option order was reversed (#4137).
* Add PowerPoint (pptx) writer (Jesse Rosenthal).
It works following the standard Pandoc conventions for making other
sorts of slides. Caveats:
+ Syntax highlighting is not yet implemented. (This is difficult
because there are no character classes in Powerpoint.)
+ Footnotes and Definition lists are not yet implemented. (Notes will
usually take the form of a final slide.
+ Image placement and auto-resizing has a few glitches.
+ Reference powerpoint files don't work dependably from the command
line. This will be implemented, but at the moment users are advised
to change themes from within Powerpoint.
* Create shared Text.Pandoc.Writers.OOXML module (Jesse Rosenthal).
This is for functions used by both Powerpoint and Docx writers.
* Add default pptx data for Powerpoint writer (Jesse Rosenthal).
* Add `empty_paragraphs` extension.
+ Deprecate `--strip-empty-paragraphs` option. Instead we now
use an `empty_paragraphs` extension that can be enabled on
the reader or writer. By default, disabled.
+ Add `Ext_empty_paragraphs` constructor to `Extension`.
+ Revert "Docx reader: don't strip out empty paragraphs."
This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b.
+ Implement `empty_paragraphs` extension in docx reader and writer,
opendocument writer, HTML reader and writer.
+ Add tests for `empty_paragraphs` extension.
* Markdown reader:
+ Don't parse native div as table caption (#4119).
+ Improved computation of column widths in pipe tables.
Pipe tables with lines longer than the text width (as set
by `--columns`) are now scaled to text width, with the relative
widths of columns determined by the ratios between the
header lines. Previously we computed column widths using
the ratio of header line lengths to column width, so that
tables with narrow header lines were extremely thin, which
was very rarely the desired result.
* LaTeX reader: fix `\` before newline (#4134). This should be a space,
as long as it's not followed by a blank line. This has been fixed at the
tokenizer level.
* Muse reader (Alexander Krotov):
+ Add test for `#disable-tables` directive in Emacs mode.
+ Don't allow emphasis to be preceded by letter.
+ Add underline support in Emacs Muse mode..
+ Support multiline directives in Amusewiki mode
* Man writer: omit internal links (#4136). That is, just print the link
text without the URL.
* Markdown reader: accept processing instructions as raw HTML (#4125).
* Lua filters (Albert Krewinkel):
+ Use script to initialize the interpreter. The file `init.lua` is
used to initialize the Lua interpreter which is used in Lua filters.
This gives users the option to require libraries which they want to
use in all of their filters, and to extend default modules.
+ Fix package loading for Lua 5.1. The list of package searchers is
named `package.loaders` in Lua 5.1 and LuaJIT, and `package.searchers`
in Lua 5.2 and later.
+ Refactor lua module handling. The integration with Lua's package/module
system is improved: A pandoc-specific package searcher is prepended to
the searchers in `package.searchers`. The modules `pandoc` and
`pandoc.mediabag` can now be loaded via `require`.
+ Bump lower bound of hslua. The release hslua 0.9.3 contains a new
function which makes using Haskell functions as package loaders much
easier.
* reveal.js template: add title-slide identifier to title slide (#4120).
This allows it to be styled more easily.
* LaTeX template: Added support for `pagestyle` variable (#4135,
Thomas Hodgson)
* Add `-threaded` to ghc-options for executable (#4130, fixes a build
error on linux).
pandoc (2.0.4)
* Add `--print-highlight-style` option. This generates a JSON version
of a highlighting style, which can be saved as a `.theme` file, modified,
and used with `--highlight-style` (#4106, #4096).
* Add `--strip-empty-paragraphs` option. This works for any input format.
It is primarily intended for use with docx and odt documents where
empty paragraphs have been used for inter-paragraph spaces.
* Support `--webtex` for `gfm` output.
* Recognize `.muse` file extension.
* Support beamer `\alert` in LaTeX reader. Closes #4091.
* Docx reader: don't strip out empty paragraphs (#2252).
Users who have a conversion pipeline from docx may want to consider adding
`--strip-empty-paragraphs` to the command line.
* Org reader (Albert Krewinkel): Allow empty list items (#4090).
* Muse reader (Alexander Krotov):
+ Parse markup in definition list terms.
+ Allow definition to end with EOF.
+ Make code blocks round trip.
+ Drop common space prefix from list items.
+ Add partial round trip test.
+ Don't interpret XML entities.
+ Remove `nested`.
+ Parse `~~` as non-breaking space in Emacs mode.
+ Correctly remove indentation from notes. Exactly one space is
required and considered to be part of the marker.
+ Allow list items to be empty.
+ Add ordered list test.
+ Add more multiline definition tests.
+ Don't allow blockquotes within lists.
+ Fix reading of multiline definitions.
+ Add inline `<literal>` support.
+ Concatenate inlines of the same type
* Docx writer: allow empty paragraphs (#2252).
* CommonMark/gfm writer:
+ Use raw html for native divs/spans (#4113). This allows a pandoc
markdown native div or span to be rendered in gfm using raw html tags.
+ Implement `raw_html` and `raw_tex` extensions. Note that `raw_html`
is enabled by default for `gfm`, while `raw_tex` is disabled by default.
* Muse writer (Alexander Krotov):
+ Test that inline math conversion result is normalized.
Without normalization this test produced
`<em>a</em><em>b</em><em>c</em>`.
+ Improve inline list normalization and move to writer.
+ Escape hash symbol.
+ Escape `----` to avoid accidental horizontal rules.
+ Escape only `</code>` inside code tag.
+ Additional `<verbatim>` is not needed as `<code>` is verbatim already.
* LaTeX writer:
+ Allow specifying just width or height for image size.
Previously both needed to be specified (unless the image was
being resized to be smaller than its original size).
If height but not width is specified, we now set width to
textwidth. If width but not height is specified, we now set
height to textheight. Since we have `keepaspectratio`, this
yields the desired result.
+ Escape `~` and `_` in code with `--listings` (#4111).
* HTML writer: export `tagWithAttributes`. This is a helper allowing
other writers to create single HTML tags.
* Let papersizes `a0`, `a1`, `a2`, ... be case-insensitive by
converting the case as needed in LaTeX and ConTeXt writers.
* Change `fixDisplayMath` from `Text.Pandoc.Writers.Shared`
so that it no longer produces empty `Para`'s as an artifact.
* `Text.Pandoc.Shared.blocksToInlines`: rewrote using builder.
This gives us automatic normalization, so we don't get
for example two consecutive Spaces.
* Include default CSS for 'underline' class in HTML-based templates.
* revealjs template: add `tex2jax` configuration for the
math plugin. With the next release of reveal.js, this will
fix the problem of `$`s outside of math contexts being
interpreted as math delimiters (#4027).
* `pandoc.lua` module for use in lua filters (Albert Krewinkel):
+ Add basic lua List module (#4099, #4081). The List module is
automatically loaded, but not assigned to a global variable. It can be
included in filters by calling `List = require 'List'`. Lists of blocks,
lists of inlines, and lists of classes are now given `List` as a metatable,
making working with them more convenient. E.g., it is now possible to
concatenate lists of inlines using Lua's concatenation operator `..`
(requires at least one of the operants to have `List` as a metatable):
function Emph (emph)
local s = {pandoc.Space(), pandoc.Str 'emphasized'}
return pandoc.Span(emph.content .. s)
end
The `List` metatable is assigned to the tables which get passed to
the constructors `MetaBlocks`, `MetaInline`, and `MetaList`. This
enables the use of the resulting objects as lists.
+ `Lua/StackInstances`: push Pandoc and Meta via constructor.
Pandoc and Meta elements are now pushed by calling the respective
constructor functions of the pandoc Lua module. This makes serialization
consistent with the way blocks and inlines are pushed to lua and allows
to use List methods with the `blocks` value.
+ Add documentation for pandoc.List in `lua-filters.md`.
* Use latest tagsoup. This fixes a bug in parsing HTML tags with
`&` (but not a valid entity) following them (#4094, #4088).
* Use skylighting 0.4.4.1, fixing the color of unmarked code text
when `numberLines` is used (#4103).
* Make `normalizeDate` more forgiving (Mauro Bieg, #4101), not
requiring a leading 0 on single-digit days.
* Fix `--help` output for `--highlight-style` to include `FILE` (Mauro
Bieg, #4095).
* Clearer deprecation warning for `--latexmathml, --asciimathml, -m`.
Previously we only mentioned `--latexmathml`, even if `-m` was
used.
* Changelog: fix description of lua filters in 2.0 release
(Albert Krewinkel). Lua filters were initially run *after* conventional
(JSON) filters. However, this was changed later to make it easier to deal
with files in the mediabag. The changelog is updated to describe that
feature of the 2.0 release correctly.
* Change Generic JSON instances to TemplateHaskell (Jasper Van der Jeugt,
#4085). This reduces compile time and memory usage significantly.
* `lua-filters.md`: Added tikz filter example.
* Create alternative zip file for macOS binaries.
* Create alternative zip file for Windows binaries.
* Update INSTALL.md since we now provide zips for binaries.
* Relax `http-types` dependency (Justus Sagemüller, #4084).
* Add `epub.md`, `getting-started.md` to docs. These used to live in
the website repo.
* Add `packages` target to Makefile.
* Bump bounds for binary, http-types, tasty-hunit
pandoc (2.0.3)
* Lua filters: preload text module (Albert Krewinkel, #4077).
The `text` module is preloaded in lua. The module contains some UTF-8
aware string functions, implemented in Haskell. The module is loaded on
request only, e.g.:
text = require 'text'
function Str (s)
s.text = text.upper(s.text)
return s
end
* Allow table-like access to attributes in lua filters (Albert Krewinkel,
#4071). Attribute lists are represented as associative lists in Lua. Pure
associative lists are awkward to work with. A metatable is attached to
attribute lists, allowing to access and use the associative list as if
the attributes were stored in as normal key-value pair in table.
Note that this changes the way `pairs` works on attribute lists. Instead
of producing integer keys and two-element tables, the resulting iterator
function now returns the key and value of those pairs. Use `ipairs` to
get the old behavior. Warning: the new iteration mechanism only works if
pandoc has been compiled with Lua 5.2 or later (current default: 5.3).
* Text.Pandoc.Parsing.uri: allow `&` and `=` as word characters (#4068).
This fixes a bug where pandoc would stop parsing a URI with an
empty attribute: for example, `&a=&b=` wolud stop at `a`.
(The uri parser tries to guess which punctuation characters
are part of the URI and which might be punctuation after it.)
* Introduce `HasSyntaxExtensions` typeclass (Alexander Krotov, #4074).
+ Added new `HasSyntaxExtensions` typeclass for `ReaderOptions` and
`WriterOptions`.
+ Reimplemented `isEnabled` function from `Options.hs` to accept both
`ReaderOptions` and `WriterOptions`.
+ Replaced `enabled` from `CommonMark.hs` with new `isEnabled`.
* Add `amuse` extension (Alexander Krotov) to enable Amuse wiki
behavior for `muse`. New `Ext_amuse` constructor for
`Extension`. Note: this is switched on by default; for
Emacs behavior, use `muse-amuse`.
* Muse reader (Alexander Krotov):
+ Count only one space as part of list item marker.
+ Produce SoftBreaks on newlines. Now wrapping can be preserved
with `--wrap=preserve`.
+ Add Text::Amuse footnote extensions. Footnote end is indicated by
indentation, so footnotes can be placed anywhere in the text,
not just at the end of it.
+ Accept Emacs Muse definition lists when `-amuse`.
Emacs Muse does not require indentation.
* HTML reader:
+ Ensure we don't produce level 0 headers (#4076), even for chapter
sections in epubs. This causes problems because writers aren't set
up to expect these.
+ Allow spaces after `\(` and before `\)` with `tex_math_single_backslash`.
Previously `\( \frac{1}{a} < \frac{1}{b} \)` was not parsed as math in
`markdown` or `html` `+tex_math_single_backslash`.
+ Parse div with class `line-block` as LineBlock.
+ Don't fail with block-level content in figcaption (Mauro Bieg, #4183).
* MANUAL: clarify that math extensions work with HTML.
Clarify that `tex_math_dollars` and `tex_math_single_backslash`
will work with HTML as well as Markdown.
* Creole reader: Fix performance issue for longer lists (Sascha Wilde,
#4067).
* RST reader: better support for 'container' directive (#4066).
Create a div, incorporate name attribute and classes.
* LaTeX reader:
+ Support column specs like `*{2}{r}` (#4056). This is equivalent to
`rr`. We now expand it like a macro.
+ Allow optional args for parbox (#4056).
+ Allow optional arguments on `\footnote` (#4062).
* EPUB writer: Fixed path for cover image (#4069). It was previously
`media/media/imagename`, and should have been `media/imagename`.
* Markdown writer: fix bug with doubled footnotes in grid tables
(#4061).
* LaTeX template: include natbib/biblatex after polyglossia (#4073).
Otherwise we seem to get an error; biblatex wants polyglossia
language to be defined.
* Added examples to lua filters documentation.
pandoc (2.0.2)
* Deprecated ancient HTML math methods: `--latexmathml`, `--gladtex`,
`--mimetex`, `--jsmath`.
* Fixed URIs in `data/jats.csl`. They were being rendered twice,
leading to invalid XML in default JATS output with pandoc-citeproc.
* `lua-filters.md`: use real-world man page filter as example.
* Add lua filter functions `walk_inline` and `walk_block`
in the pandoc module, to apply filters inside particular
inline and block elements.
* Refactored some code from `Text.Pandoc.Lua.PandocModule`
into new internal module `Text.Pandoc.Lua.Filter`.
* Markdown reader:
+ Allow fenced code blocks to be indented 1-3 spaces (#4011).
This brings our handling of them into alignment with CommonMark's.
+ Fix YAML metadata with "chomp" (`|-`). Previously if a
YAML block under `|-` contained a blank line, pandoc would
not parse it as metadata.
* Removed `etc.` from abbreviations file. Often `etc.` ends a
sentence, and we want the period to be treated as a
sentence-ending period.
* Fix regression with `--metadata` (#4054). Values specified with
`--metadata` should replace a metadata value set in the document
itself, rather than creating a list including a new value.
* EPUB writer:
+ Fix EPUB OCF structure. #3720 had been improperly implemented.
+ Fix modified paths for raw HTML tags (src, poster, etc.)
(#4050, #4055). This had not been updated for the new EPUB
container layout, with a separate text/ subdirectory.
+ Fix image paths with empty `--epub-subdirectory`.
* Miscellaneous code cleanup (Alexander Krotov).
* Use pandoc-types 1.17.3, which adds `Walkable` instances
for `[Block] Block` and `[Inline] Inline`.
* Remove obsolete `stack.full.yaml` (#4052).
* Change to using pandoc-citeproc 0.12.1 in binary packages.
* Consolidate math output method documentation (#4049, Mauro Bieg).
* `MANUAL.txt`: fix header level of "Extension: emoji" (Albert Krewinkel).
* Use lua filter to generate man page from `MANUAL.txt`, replacing old
Haskell filters. This is easier and faster.
* Improved `INSTALL.md`.
* Update commands to extract deb archive on Linux (#4043, Salim B).
pandoc (2.0.1.1)
* Improved fix to #3989 (parsing of HTML tags containing
`>` in an attribute or comment). The previous fix (in 2.0.1) only
worked in certain cases.
* FB2 writer (Alexander Krotov):
+ Add `unrecognised` genre to `<title-info>`
(Alexander Krotov). XML schema requires at least one genre.
+ Remove `<annotation>` from `<body>`.
* CommonMark writer: fix strikethrough for `gfm` (#4038).
* Use texmath 0.10, which adds support for a wider range of
symbols and fixes default column alignments in MathML
and OMML.
* Highlighting fixes, using skylighting 0.4.3.2:
+ Fix invalid CSS.
+ Support `lineAnchors` (or `line-anchors`) in HTML code blocks.
+ Ensure that code lines don't get duplicate identifiers (#4031).
The line identifiers are built using the code block's identifier
as a prefix. If the code block has null identifier, we use
`cb1`, `cb2`, etc.
* Added a few abbreviations to `data/abbreviations`,
and sorted the list (#3984, Wandmalfarbe).
* Improved support for columns in HTML writer (#4028).
+ Remove `width` attribute from the `div`.
+ Remove space between `<div class="column">` elements,
since this prevents columns whose widths sum to 100%
(the space takes up space).
+ Move as much as possible of the CSS to the template.
+ Ensure that all the HTML-based templates (including epub)
contain the CSS for columns.
+ Columns default to 50% width unless they are given a width
attribute. So if you want two equal-width columns, you
can use a div with class `column` and no `width` attribute.
* SelfContained: use `base64` for css links with media attribute (#4026).
This fixes `--self-contained` with S5.
* Improve `pandoc-template-mode.el` (Vaclav Haisman).
* Issue INFO, not WARNING, when a .sty file cannot be
read in LaTeX reader. It is normally not an issue requiring
a fix from the user if .sty files are not found.
* INSTALL.md: MacOS instructions needed xar -f (adam234).
* MANUAL.txt:
+ Clarify that --setext-headers doesn't affect gfm output (#4035).
+ Clarify what is needed to open and close a div in `fenced_divs`
(#4039, Tristano Ajmone).
+ Removed reference to `default.beamer` in docs (#4024).
Also added mention of other templates affecting PDF output
with different settings.
pandoc (2.0.1)
* Fixed regression in parsing of HTML comments in markdown and other
non-HTML formats (`Text.Pandoc.Readers.HTML.htmlTag`) (#4019).
The parser stopped at the first `>` character, even if it wasn't
the end of the comment.
* Creole reader (Sascha Wilde):
+ Fix some minor typos and formatting.
+ Add additional test on nowiki-block after para.
+ Fix lists with trailing white space.
* LaTeX reader: handle `%` comment right after command.
For example, `\emph%`.
* Markdown reader: make sure fenced div closers work in lists.
Previously the following failed:
::: {.class}
1. one
2. two
:::
and you needed a blank line before the closing `:::`.
* Make `fenced_divs` affect the Markdown writer. If `fenced_divs` is
enabled, Divs will be rendered as fenced divs.
* LaTeX/Beamer writer: support "blocks" inside columns and other Divs
(#4016).
* HTML Writer: consistently use dashed class-names (Mauro Bieg, #3556).
Note: this change may require some changes in CSS rules.
`footnoteRef` has become `footnote-ref`, `titleslide` has
become `title-slide`, and `footnoteBack` has become `footnote-back`.
* JATS writer: Properly pass through author metadata (#4020).
* FB2 writer (Alexander Krotov):
+ Write blocks outside of `<p>` in definitions.