` 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 `` optional in `
` and ` ` (#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 `` 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
`a b c `.
+ Improve inline list normalization and move to writer.
+ Escape hash symbol.
+ Escape `----` to avoid accidental horizontal rules.
+ Escape only `` inside code tag.
+ Additional `` is not needed as `` 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 ``
(Alexander Krotov). XML schema requires at least one genre.
+ Remove `` from ``.
* 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 `` 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 `
` in definitions.
+ Make bullet lists consistent with ordered lists, repeating
the marker for the outer list rather than indenting sublists,
since indentation does not work in readers.
+ Add new style FB2 tests.
* `Text.Pandoc.ImageSize`: Add `Millimeter` constructor to `Dimension`
(#4012) [API change]. Now sizes given in 'mm' are no longer converted
to 'cm'.
* Revise documentation of small caps syntax (Andrew Dunning, #4013).
* Fix broken reference links in manual (Andrew Dunning, #4014)
* Fixed example of slide columns structure in changelog (#4015).
Also documented this feature in MANUAL.txt.
pandoc (2.0.0.1)
* EPUB writer:
+ Fixed filepaths for nonstandard epub-subdirectory values.
+ Ensure that epub2 is recognized as a non-text format,
so that a template is used.
+ Don't include "prefix" attribute for ibooks for epub2.
It doesn't validate.
+ Fix stylesheet paths; previously we had an incorrect
stylesheet path for the cover page and nav page.
* LaTeX reader:
+ Insert space when needed in macro expansion (#4007).
Sometimes we need to insert a space after a control sequence
to prevent it merging with a following letter.
+ Allow unbraced arguments for macros (#4007).
+ Allow body of macro definition to be unbraced (#4007).
* Linux package build: ensure that pandoc-citeproc is statically linked.
* trypandoc: add native, ms.
pandoc (2.0)
[new features]
* New output format `ms` (groff ms). Complete support, including
tables, math, syntax highlighting, and PDF bookmarks. The writer uses
texmath's new eqn writer to convert math to eqn format, so a ms file
produced with this writer should be processed with `groff -ms -e` if
it contains math.
* New output format `jats` (Journal Article Tag Suite). This is an XML
format used in archiving and publishing articles. Note that a
URI-encoded CSL stylesheet (`data/jats.csl`) is added automatically
unless a stylesheet is specified using `--css`.
* New output format `gfm` (GitHub-flavored CommonMark) (#3841).
This uses bindings to GitHub's fork of cmark, so it should parse
gfm exactly as GitHub does (excepting certain postprocessing
steps, involving notifications, emojis, etc.). `markdown_github`
has been deprecated in favor of `gfm`.
* New output format `muse` (Emacs Muse) (Alexander Krotov, #3489).
* New input format `gfm` (GitHub-flavored CommonMark) (#3841).
This uses bindings to GitHub's fork of cmark. `markdown_github`
has been deprecated in favor of `gfm`.
* New input format `muse` (Emacs Muse) reader (Alexander Krotov, #3620).
* New input format `tikiwiki` (TikiWiki markup) (rlpowell, #3800).
* New input format `vimwiki` (Vimwiki markup) (Yuchen Pei, #3705).
Note that there is a new data file, `data/vimwiki.css`, which can
be used to display the HTML produced by this reader and
pandoc's HTML writer in the style of vimwiki's own HTML
export.
* New input format `creole` (Creole 1.0) (#3994, Sascha Wilde).
* New syntax for Divs, with `fenced_divs` extension enabled by
default (#168). This gives an attractive, plain-text way to create
containers for block-level content.
* Added new syntax for including raw content in any output format,
enabled by the `raw_attribute` extension (which is on by default
for `markdown` and `multimarkdown`). The syntax is the same as
for fenced code blocks or code inlines, only with `{=FORMAT}` for
attributes, where `FORMAT` is the name of the output format
(e.g., `ms`, `html`).
* Implement multicolumn support for slide formats (#1710).
The structure expected is:
:::::::::::::: {.columns}
::: {.column width="40%"}
contents...
:::
::: {.column width="60%"}
contents...
:::
::::::::::::::
Support has been added for beamer and all HTML slide formats.
* Allows line comments in templates, beginning with `$--` (#3806).
(Requires doctemplates 0.2.1.)
* Add `--eol=crlf|lf|native` flag and writer option to control line endings
(Stefan Dresselhaus, #3663, #2097).
* Add `--log` option to save log messages in JSON format to a file (#3392).
* Add `--request-header` option, to set request headers when pandoc
makes HTTP requests to fetch external resources. For example:
`--request-header User-Agent:blah`.
* Added lua filters (Albert Krewinkel, #3514). The new `--lua-filter`
option works like `--filter` but takes pathnames of special lua filters
and uses the lua interpreter baked into pandoc, so that no external
interpreter is needed. Note that lua filters are all applied before
regular filters, regardless of their position on the command line.
For documentation of lua filters, see `doc/lua-filters.md`.
* Set `PANDOC_READER_OPTIONS` in environment where filters are run.
This contains a JSON representation of `ReaderOptions`, so filters
can access it.
* Support creation of pdf via groff `ms` and pdfroff.
`pandoc -t ms -o output.pdf input.txt`.
* Support for PDF generation via HTML and `weasyprint` or `prince`
(Mauro Bieg, #3909). `pandoc -t html5 -o output.pdf --pdf-engine=prince`.
* Added `--epub-subdirectory` option (#3720). This specifies the
subdirectory in the OCF container that holds the EPUB specific content.
We now put all EPUB related content in an `EPUB/` subdirectory by default
(later this will be configurable).
```
mimetype
META-INF/
com.apple.ibooks.display-options.xml
container.xml
EPUB/ <<--configurable-->>
fonts/ <<--static-->>
font.otf
media/ <<--static-->>
cover.jpg
fig1.jpg
styles/ <<--static-->>
stylesheet.css
content.opf
toc.ncx
text/ <<--static-->>
ch001.xhtml
```
* Added `--resource-path=SEARCHPATH` command line option (#852).
SEARCHPATH is separated by the usual character, depending on OS
(: on unix, ; on windows). Default resource path is just working
directory. However, the working directory must be explicitly
specified if the `--resource-path` option is used.
* Added `--abbreviations=FILE` option for custom abbreviations file
(#256). Default abbreviations file (`data/abbreviations`) contains
a list of strings that will be recognized by pandoc's
Markdown parser as abbreviations. (A nonbreaking space will
be inserted after the period, preventing a sentence space in
formats like LaTeX.) Users can override the default by putting a file
abbreviations in their user data directory (`~/.pandoc` on *nix).
* Allow a theme file as argument to `--highlight-style`.
Also include a sample, `default.theme`, in `data/`.
* Allow `--syntax-definition` option for dynamic loading of syntax
highlighting definitions (#3334).
* Lists in `markdown` by default now use the CommonMark variable
nesting rules (#3511). The indentation required for a block-level
item to be included in a list item is no longer fixed, but is
determined by the first line of the list item. To be included in
the list item, a block must be indented to the level of the first
non-space content after the list marker. Exception: if are 5 or more
spaces after the list marker, then the content is interpreted as an
indented code block, and continuation paragraphs must be indented
two spaces beyond the end of the list marker. See the CommonMark
spec for more details and examples.
Documents that adhere to the four-space rule should, in most cases,
be parsed the same way by the new rules. Here are some examples
of texts that will be parsed differently:
- a
- b
will be parsed as a list item with a sublist; under the four-space
rule, it would be a list with two items.
- a
code
Here we have an indented code block under the list item, even though it
is only indented six spaces from the margin, because it is four spaces
past the point where a continuation paragraph could begin. With the
four-space rule, this would be a regular paragraph rather than a code
block.
- a
code
Here the code block will start with two spaces, whereas under
the four-space rule, it would start with `code`. With the four-space
rule, indented code under a list item always must be indented eight
spaces from the margin, while the new rules require only that it
be indented four spaces from the beginning of the first non-space
text after the list marker (here, `a`).
This change was motivated by a slew of bug reports from people
who expected lists to work differently (#3125, #2367, #2575, #2210,
#1990, #1137, #744, #172, #137, #128) and by the growing prevalance
of CommonMark (now used by GitHub, for example). Those who
prefer the old behavior can use `-f markdown+four_space_rule`.
* Added `four_space_rule` extension. This triggers the old pandoc
parsing rule for content nested under list items (the "four space
rule").
* Added `spaced_reference_links` extension (#2602). It allows whitespace
between the two parts of a reference link: e.g.
[a] [b]
[b]: url
This was previously enabled by default; it is now forbidden by default.
* Add `space_in_atx_header` extension (#3512). This is enabled by default
in pandoc and GitHub markdown but not the other flavors.
This requires a space between the opening #'s and the header
text in ATX headers (as CommonMark does but many other implementations
do not). This is desirable to avoid falsely capturing things like
#hashtag
or
#5
* Add `sourcefile` and `outputfile` template variables (Roland Hieber,
#3431).
* Allow ibooks-specific metadata in epubs (#2693). You can now have
the following fields in your YAML metadata, and it will be treated
appropriately in the generated EPUB:
```
ibooks:
version: 1.3.4
specified-fonts: false
ipad-orientation-lock: portrait-only
iphone-orientation-lock: landscape-only
binding: true
scroll-axis: vertical
```
[behavior changes]
* Reader functions no longer presuppose that CRs have been
stripped from the input. (They strip CRs themselves, before
parsing, to simplify the parsers.)
* Added support for translations (localization) (#3559).
Currently this only affects the LaTeX reader, for things
like `\figurename`. Translation data files for 46 languages
can be found in `data/translations`.
* Make `--ascii` work with DocBook output too.
* Rename `--latex-engine` to `--pdf-engine`,
and `--latex-engine-opt` to `--pdf-engine-opt`.
* Removed `--parse-raw` and `readerParseRaw`. These were confusing.
Now we rely on the `+raw_tex` or `+raw_html` extension with latex or html
input. Thus, instead of `--parse-raw -f latex` we use `-f latex+raw_tex`,
and instead of `--parse-raw -f html` we use `-f html+raw_html`.
* With `--filter` R filters are now recognized, even if they are
not executable (#3940, #3941, Andrie de Vries).
* Support SVG in PDF output, converting with `rsvg2pdf` (#1793).
* Make epub an alias for epub3, not epub2.
* Removed `--epub-stylesheet`; use `--css` instead (#3472, #847).
Multiple stylesheets may be used. Stylesheets will be taken both from
`--css` and from the `stylesheet` metadata field (which can contain
either a file path or a list of them).
* `--mathml` and MathML in HTMLMathMethod no longer take an argument.
The argument was for a bridge JavaScript that used to be necessary
in 2004. We have removed the script already.
* `--katex` improvements. The latest version is used, and the
autoload script is loaded by default.
* Change MathJax CDN default since old one is shutting down (#3544).
Note: The new URL requires a version number, which we'll have
to update manually in subsequent pandoc releases in order to
take advantage of mathjax improvements.
* `--self-contained`: don't incorporate elements with `data-external="1"`
(#2656). You can leave an external link as it is by adding the attribute
data-external="1" to the element. Pandoc will then not try to
incorporate its content when `--self-contained` is used. This is
similar to a feature already supported by the EPUB writer.
* Allow `--extract-media` to work with non-binary input formats
(#1583, #2289). If `--extract-media` is supplied with a non-binary
input format, pandoc will attempt to extract the contents of all
linked images, whether in local files, data: uris, or external uris.
They will be named based on the sha1 hash of the contents.
* Make `papersize: a4` work regardless of the case of `a4`.
It is converted to `a4` in LaTeX and `A4` in ConTeXt.
* Make `east_asian_line_breaks` affect all readers/writers (#3703).
* Underlined elements are now treated consistently by readers
(#2270, hftf); they are always put in a Span with class `underline`.
This allows the user to treat them differently from other emphasis,
using a filter. Docx, Org, Textile, Txt2Tags, and HTML readers
have been changed.
* Improved behavior of `auto_identifiers` when there are explicit ids
(#1745). Previously only autogenerated ids were added to the list
of header identifiers in state, so explicit ids weren't taken
into account when generating unique identifiers. Duplicated
identifiers could result. This simple fix ensures that explicitly given
identifiers are also taken into account.
* Use `table-of-contents` for contents of toc, make `toc` a boolean
(#2872). Changed markdown, rtf, and HTML-based templates accordingly.
This allows you to set `toc: true` in the metadata; this
previously produced strange results in some output formats.
For backwards compatibility, `toc` is still set to the
toc contents. But it is recommended that you update templates
to use `table-of-contents` for the toc contents and `toc`
for a boolean flag.
* Change behavior with binary format output to stdout.
Previously, for binary formats, output to stdout was disabled
unless we could detect that the output was being piped (and not
sent to the terminal). Unfortunately, such detection is not
possible on Windows, leaving windows users no way to pipe binary
output. So we have changed the behavior in the following way:
+ Output to stdout is allowed when it can be determined that
the output is being piped (on non-Windows platforms).
+ If the `-o` option is not used, binary output is never sent
to stdout by default; instead, an error is raised.
+ If `-o -` is used, binary output is sent to stdout, regardless
of whether it is being piped. This works on Windows too.
* Better error behavior: uses of `error` have been replaced by
raising of `PandocError`, which can be trapped and handled by the
calling program.
* Removed `hard_line_breaks` extension from `markdown_github` (#3594).
GitHub has two Markdown modes, one for long-form documents like READMEs
and one for short things like issue coments. In issue comments, a line
break is treated as a hard line break. In README, wikis, etc., it is
treated as a space as in regular Markdown. Since pandoc is more likely to
be used to convert long-form documents from GitHub Markdown,
`-hard_line_breaks` is a better default.
* Include `backtick_code_blocks` extension in `mardkown_mmd` (#3637).
* Escape `MetaString` values (as added with `-M/--metadata` flag) (#3792).
Previously they would be transmitted to the template without any
escaping. Note that `--M title='*foo*'` yields a different result from
---
title: *foo*
---
In the latter case, we have emphasis; in the former case, just
a string with literal asterisks (which will be escaped
in formats, like Markdown, that require it).
* Allow `em`, `cm`, `in` for image height/width in HTML, LaTeX (#3450).
* HTML writer: Insert `data-` in front of unsupported attributes. Thus,
a span with attribute `foo` gets written to HTML5 with `data-foo`, so
it is valid HTML5. HTML4 is not affected. This will allow us to use
custom attributes in pandoc without producing invalid HTML. (With help
from Wandmalfarbe, #3817.)
* Plain writer: improved super/subscript rendering. We now
handle more non-digit characters for which there are
sub/superscripted unicode characters. When unicode
sub/superscripted characters are not available, we use
`_(..)` or `^(..)` (#3518).
* Docbook, JATS, TEI writers: print INFO message when omitting interior
header (#3750). This only applies to section headers inside list items,
e.g., which were otherwise silently omitted.
* Change to `--reference-links` in Markdown writer (#3701). With
`--reference-location` of `section` or `block`, pandoc will now repeat
references that have been used in earlier sections. The Markdown
reader has also been modified, so that *exactly* repeated references
do not generate a warning, only references with the same label but
different targets. The idea is that, with references after every block,
one might want to repeat references sometimes.
* ODT/OpenDocument writer:
+ Support `lang` attribute (#1667).
+ Added support for `--toc` (#2836). Thanks to @anayrat.
* Docx writer:
+ `lang` meta, see #1667 (Mauro Bieg, #3515).
+ Change `FigureWithCaption` to `CaptionedFigure` (iandol, #3658).
+ Use `Table` rather than `Table Normal` for table style (#3275).
`Table Normal` is the default table style and can't be modified.
+ Pass through comments (#2994). We assume that comments are defined as
parsed by the docx reader:
I want some text to
have a comment on it.
We assume also that the id attributes are unique and properly
matched between comment-start and comment-end.
+ Bookmark improvements. Bookmark start/end now surrounds content rather
than preceding it. Bookmarks generated for Div with id
(jgm/pandoc-citeproc#205).
+ Add `keywords` metadata to docx document properties (Ian).
* RST writer: support unknown interpreted text roles by
parsing them as `Span` with `role` attributes (#3407). This
way they can be manipulated in the AST.
* HTML writer:
+ Line block: Use class instead of style attribute (#1623). We now
issue `
` and include a default definition
for `line-block` in the default templates, instead of hard-coding a
`style` on the div.
+ Add class `footnoteBack` to footnote back references (Timm Albers).
This allows for easier CSS styling.
+ Render SmallCaps as span with smallcaps class (#1592), rather than
using a style attribute directly. This gives the user more flexibility
in styling small caps in CSS.
+ With reveal.js we use `data-src` instead of `src` for images for
lazy loading.
+ Special-case `.stretch` class for images in reveal.js (#1291).
Now in reveal.js, an image with class `stretch` in a paragraph
by itself will stretch to fill the whole screen, with no
caption or figure environment.
* Added warnings for non-rendered blocks to writers.
* Writers now raise an error on template failure.
* When creating a PDF via LaTeX, warn if the font is missing some
characters (#3742).
* Remove initial check for PDF-creating program (#3819).
Instead, just try running it and raise the exception if it
isn't found at that point. This improves things for users of Cygwin
on Windows, where the executable won't be found by `findExecutable`
unless `.exe` is added. The same exception is raised as before, but
at a later point.
* Readers issue warning for duplicate header identifiers (#1745).
Autogenerated header identifiers are given suffixes so as not to clash
with previously used header identifiers. But they may still coincide with
an explicit identifier that is given for a header later in the document,
or with an identifier on a div, span, link, or image. We now issue
a warning in this case, so users can supply an explicit identifier.
* CommonMark reader now supports `emoji`, `hard_line_breaks`, `smart`,
and `raw_html` extensions.
* Markdown reader:
+ Don't allow backslash + newline to affect block structure (#3730).
Note that as a result of this change, the following, which formerly
produced a header with two lines separated by a line break, will
now produce a header followed by a paragraph:
# Hi\
there
This may affect some existing documents that relied on
this undocumented and unintended behavior. This change makes pandoc
more consistent with other Markdown implementations, and with itself
(since the two-space version of a line break doesn't work inside ATX
headers, and neither version works inside Setext headers).
* Org reader (Albert Krewinkel, unless noted):
+ Support `table.el` tables (#3314).
+ Support macros (#3401).
+ Support the `#+INCLUDE:` file inclusion mechanism (#3510).
Recognized include types are `example`, `export`, `src`, and
normal org file inclusion. Advanced features like line numbers
and level selection are not implemented yet.
+ Interpret more meta value as inlines. The values of the following
meta variables are now interpreted using org-markup instead of
treating them as pure strings: `keywords` (comma-separated list of
inlines), `subtitle` (inline values), `nocite` (inline values, can
be repeated).
+ Support `\n` export option (#3940). This turns all newlines in the
text into hard linebreaks.
* RST reader:
+ Improved admonition support (#223). We no longer add an
`admonition` class, we just use the class for the type of admonition,
`note` for example. We put the word corresponding to the label in
a paragraph inside a `Div` at the beginning of the admonition with
class `admonition-title`. This is about as close as we can get to
RST's own output.
+ Initial support of `.. table` directive. This allows adding captions
to tables.
+ Support `.. line-block` directive. This is deprecated but may still
be in older documents.
+ Support scale and align attributes of images (#2662).
+ Implemented implicit internal header links (#3475).
+ Support RST-style citations (#853). The citations appear at the end
of the document as a definition list in a special div with id
`citations`. Citations link to the definitions.
+ Recurse into bodies of unknown directives (#3432).
In most cases it's better to preserve the content than
to emit it. This isn't guaranteed to have good results;
it will fail spectacularly for unknown raw or verbatim directives.
+ Handle chained link definitions (#262). For example,
.. _hello:
.. _goodbye: example.com
Here both `hello` and `goodbye` should link to `example.com`.
+ Support anchors (#262). E.g.
`hello`
.. _hello:
paragraph
This is supported by putting "paragraph" in a `Div` with id `hello`.
+ Support `:widths:` attribute for table directive.
+ Implement csv-table directive (#3533). Most attributes are supported,
including `:file:` and `:url:`.
+ Support unknown interpreted text roles by parsing them as Span
with "role" attributes (#3407). This way they can be manipulated in
the AST.
* HTML reader: parse a span with class `smallcaps` as `SmallCaps`.
* LaTeX reader:
+ Implemented `\graphicspath` (#736).
+ Properly handle column prefixes/suffixes. For example, in
`\begin{tabular}{>{$}l<{$}>{$}l<{$} >{$}l<{$}}`
each cell will be interpreted as if it has a `$`
before its content and a `$` after (math mode).
+ Handle komascript `\dedication` (#1845). It now adds a
`dedication` field to metadata. It is up to the user to supply
a template that uses this variable.
+ Support all `\textXX` commands, where XX = `rm`, `tt`, `up`, `md`,
`sf`, `bf` (#3488). Spans with a class are used when there is
nothing better.
+ Expand `\newenvironment` macros (#987).
+ Add support for LaTeX subfiles package (Marc Schreiber, #3530).
+ Better support for subfigure package (#3577).
A figure with two subfigures turns into two pandoc
figures; the subcaptions are used and the main caption
ignored, unless there are no subcaptions.
+ Add support for \vdots (Marc Schreiber, #3607).
+ Add basic support for hyphenat package (Marc Schreiber, #3603).
+ Add basic `\textcolor` support (Marc Schreiber).
+ Add support for `tabularx` environment (Marc Schreiber, #3632).
+ Better handling of comments inside math environments (#3113).
This solves a problem with commented out `\end{eqnarray}` inside
an eqnarray (among other things).
+ Parse tikzpicture as raw verbatim environment if `raw_tex` extension
is selected (#3692). Otherwise skip with a warning. This is better
than trying to parse it as text!
+ Add `\colorbox` support (Marc Schreiber).
+ Set identifiers on Spans used for `\label`.
+ Have `\setmainlanguage` set `lang` in metadata.
+ Support etoolbox's `\ifstrequal`.
+ Support `plainbreak`, `fancybreak` et al from the memoir class
(bucklereed, #3833).
+ Support `\let`. Also, fix regular macros so they're expanded at the
point of use, and NOT also the point of definition. `\let` macros,
by contrast, are expanded at the point of definition. Added an
`ExpansionPoint` field to `Macro` to track this difference.
+ Support simple `\def` macros. Note that we still don't support
macros with fancy parameter delimiters, like `\def\foo#1..#2{...}`.
+ Support \chaptername, \partname, \abstractname, etc. (#3559,
obsoletes #3560).
+ Put content of `\ref`, `\label`, `\eqref` commands into `Span` with
attributes, so they can be handled in filters (Marc Schreiber, #3639)
+ Add Support for `glossaries` and `acronym` package (Marc Schreiber,
#3589). Acronyms are not resolved by the reader, but acronym and
glossary information is put into attributes on Spans so that they
can be processed in filters.
+ Use `Link` instead of `Span` for `\ref`. This makes more sense
semantically and avoids unnecessary `Span [Link]` nestings when
references are resolved.
+ Rudimentary support for `\hyperlink`.
+ Support `\textquoteleft|right`, `\textquotedblleft|right` (#3849).
+ Support `\lq`, `\rq`.
+ Implement `\newtoggle`, `\iftoggle`, `\toggletrue|false` from etoolbox
(#3853).
+ Support `\RN` and `\Rn`, from biblatex (bucklereed, #3854).
+ Improved support for `\hyperlink`, `\hypertarget` (#2549).
+ Support `\k` ogonek accent.
+ Improve handling of accents. Handle ogonek, and fall back correctly
with forms like `\"{}`.
+ Better support for ogonek accents.
+ Support for `\faCheck` and `\faClose` (Marc Schreiber, #3727).
+ Support for `xspace` (Marc Schreiber, #3797).
+ Support `\setmainlanguage` or `\setdefaultlanguage` (polyglossia)
and `\figurename`.
+ Better handling of `\part` in LaTeX (#1905). Now we parse chapters as
level 0 headers, and parts as level -1 headers. After parsing, we
check for the lowest header level, and if it's less than 1 we bump
everything up so that 1 is the lowest header level. So `\part` will
always produce a header; no command-line options are needed.
+ Add block version of `\textcolor` (Marc Schreiber).
+ `\textcolor` works as inline and block command (Marc Schreiber).
+ `\textcolor` will be parse as span at the beginning of a paragraph
(Marc Schreiber).
+ Read polyglossia/babel `\text(LANG){...}` (bucklereed)
+ Improved handling of include files in LaTeX reader (#3971).
Previously `\include` wouldn't work if the included file
contained, e.g., a begin without a matching end.
+ Support `\expandafter` (#3983).
+ Handle `\DeclareRobustCommand` (#3983). Currently it's just treated
as a synonym for `\newcommand`.
+ Handle `\lettrine` (Mauro Bieg).
* Math improvements due to updates in texmath:
+ Improved handling of accents and upper/lower delimiters.
+ Support for output in GNU eqn format (used with *roff).
+ Allow `\boldsymbol` + a token without braces, and similarly
with other styling commands.
+ Improve parsing of `\mathop` to allow multi-character operator names.
+ Add thin space after math operators when "faking it with
unicode."
* `walk` is now used instead of `bottomUp` in the `ToJSONFilter`
instance for `a -> [a]` (pandoc-types). Note that behavior
will be slightly different, since `bottomUp`'s treatment of
a function `[a] -> [a]` is to apply it to each sublist of a
list, while walk applies it only to maximal sublists.
Usually the latter behavior is what is wanted, and the
former can be simulated when needed. But there may be
existing filters that need to be rewritten in light of the
new behavior. Performance should be improved.
* There are some changes to syntax highlighting due to revisions
in the `skylighting` library:
+ Support for `powershell` has been added, and many syntax
definitions have been updated.
+ Background colors have been added to the `kate` style.
+ The way highlighted code blocks are formatted in HTML has
been changed (David Baynard), in ways that may require
changes in hard-coded CSS affecting highlighting.
(If you haven't included hard-coded highlighting CSS in
your template, you needn't change anything.)
[API changes]
* New module `Text.Pandoc.Class` (Jesse Rosenthal, John MacFarlane).
This contains definitions of the `PandocMonad` typeclass, the
`PandocIO` and `PandocPure` monads, and associated functions.
* Changed types of all writers and readers.
+ We now use `Text` instead of `String` in the interface (#3731).
(We have not yet changed the internals of most readers to work
with `Text`, but making this change in the API now opens up a
path to doing that.)
+ The result is now of form `m a` with constraint `PandocMonad m`.
Readers and writers can be combined to form monadic values which
can be run using either `runIO` or `runPure`. If `runIO` is used,
then both readers and writers will be able to do IO when needed
(for include files, for example); if `runPure` is used,
then the functions are pure and will not touch IO.
+ Where previously you used
`writeRST def (readMarkdown def "[foo](url)")`, now you
would use
`runPure $ readMarkdown def (pack "[foo](url)") >>= writeRST def`.
* New module `Text.Pandoc.Readers` (Albert Krewinkel). This
contains reader helper functions formerly defined in the
top-level `Text.Pandoc` module.
+ Changed `StringReader` -> `TextReader`.
+ `getReader` now returns a pair of a reader and
`Extensions`, instead of building the extensions into the
reader (#3659). The calling code must explicitly set
`readerExtensions` using the `Extensions` returned. The
point of the change is to make it possible for the calling
code to determine what extensions are being used.
* New module `Text.Pandoc.Writers` (Albert Krewinkel).
This contains writer helper functions formerly defined in the
top-level `Text.Pandoc` module.
+ Changed `StringWriter` -> `TextWriter`.
+ `getWriter` now retuns a pair of a reader and
`Extensions`, instead of building the extensions into the
reader (#3659). The calling code must explicitly set
`readerExtensions` using the `Extensions` returned. The
point of the change is to make it possible for the calling
code to determine what extensions are being used.
* New module `Text.Pandoc.Lua`, exporting `runLuaFilter` (Albert Krewinkel,
#3514).
* New module `Text.Pandoc.App`. This abstracts out the functionality
of the command line program (`convertWithOpts`), so it can be reproduced
e.g. in a desktop or web application. Instead of exiting, we throw errors
(#3548), which are caught (leading to exit) in pandoc.hs, but allow other
users of `Text.Pandoc.App` to recover. `pandoc.hs` is now a 2-liner.
The module also exports some utility functions for parsing options
and running filters.
* New module `Text.Pandoc.Logging` (exported module) (#3392).
This now contains the `Verbosity` definition previously in
`Text.Pandoc.Options`, as well as a new `LogMessage` datatype that will
eventually be used instead of raw strings for warnings. This will enable
us, among other things, to provide machine-readable warnings if desired.
Include ToJSON instance and showLogMessage. This gives us the possibility
of both machine-readable and human-readable output for log messages.
* New module `Text.Pandoc.BCP47`, with `getLang`, `Lang(..)`, `parseBCP47`.
* New module `Text.Pandoc.Translations`, exporting `Term`,
`Translations`, `readTranslations`.
* New module `Text.Pandoc.Readers.LaTeX.Types', exporting `Macro`, `Tok`,
`TokType`, `Line`, `Column`.
* `Text.Pandoc.Error`: added many new constructors for `PandocError`.
* Expose some previously private modules (#3260). These are often
helpful to people writing their own reader or writer modules:
+ `Text.Pandoc.Writers.Shared`
+ `Text.Pandoc.Parsing`
+ `Text.Pandoc.Asciify`
+ `Text.Pandoc.Emoji`
+ `Text.Pandoc.ImageSize`
+ `Text.Pandoc.Highlighting`
`
* New module `Text.Pandoc.Extensions` (Albert Krewinkel):
Extension parsing and processing functions were defined in the top-level
`Text.Pandoc` module. These functions are moved to the Extensions
submodule as to enable reuse in other submodules.
* Add `Ext_raw_attribute` constructor for `Extension`.
* Add `Ext_fenced_divs` constructor for `Extension'.
* Add `Ext_four_space_rule` constructor in `Extension`.
* Add `Ext_gfm_auto_identifiers` constructor for `Extension`.
* Add `Monoid` instance for `Extensions`.
* Add `Text.Pandoc.Writers.Ms`, exporting `writeMs`.
* Add `Text.Pandoc.Writers.JATS`, exporting `writeJATS`.
* Add `Text.Pandoc.Writers.Muse`, exporting `writeMuse`.
* Add `Text.Pandoc.Readers.Muse`, exporting `readMuse`.
* Add `Text.Pandoc.Readers.TikiWiki`, exporting `readTikiWiki`.
* Add `Text.Pandoc.Readers.Vimwiki`, exporting `readVimwiki`.
* Add `Text.Pandoc.Readers.Creole`, exporting `readCreole`.
* Export `setVerbosity` from `Text.Pandoc`.
* `Text.Pandoc.Pretty`: Add `Eq` instance for `Doc`.
* `Text.Pandoc.XML`: `toEntities`: changed type to `Text -> Text`.
* `Text.Pandoc.UTF8`:
+ Export `fromText`, `fromTextLazy`, `toText`, `toTextLazy`.
Define `toString`, `toStringLazy` in terms of them.
+ Add new functions parameterized on `Newline`: `writeFileWith`,
`putStrWith`, `putStrLnWith`, `hPutStrWith`, `hPutStrLnWith`.
* `Text.Pandoc.MediaBag`: removed `extractMediaBag`.
* `Text.Pandoc.Highlighting`:
+ `highlighting` now returns an Either rather than Maybe.
This allows us to display error information returned by the skylighting
library. Display a warning if the highlighting library throws an error.
+ Add parameter for `SyntaxMap` to `highlight`.
* `Text.Pandoc.Writers.Math`:
+ Export `defaultMathJaxURL`, `defaultKaTeXURL`. This will ensure that
we only need to update these in one place.
* `Text.Pandoc.SelfContained`:
+ Removed `WriterOptions` parameter from `makeSelfContained`.
+ Put `makeSelfContained` in PandocMonad instead of IO. This removes
the need to pass MediaBag around and improves exceptions. It also
opens up the possibility of using makeSelfContained purely.
+ Export `makeDataURI`.
* `Text.Pandoc.ImageSize`:
+ Export `lengthToDim`, new function `scaleDimension`.
+ Export `inEm` from ImageSize (#3450).
+ Change `showFl` and `show` instance for `Dimension` so
extra decimal places are omitted.
+ Added `Em` as a constructor of `Dimension`.
+ Add `WriterOptions` parameter to `imageSize` signature (Mauro Bieg).
* `Text.Pandoc.Templates`:
+ Change type of `renderTemplate'`. Now it runs in `PandocMonad`
and raises a proper `PandocTemplateError` if there are problems, rather
than failing with uncatchable `error`.
+ Change signature of `getDefaultTemplate`. Now it runs in any instance
of `PandocMonad`, and returns a `String` rather than an `Either` value.
And it no longer takes a `datadir` parameter, since this can be
retrieved from `CommonState`.
* `Text.Pandoc.Options`:
+ Added `writerEpubSubdirectory` to `WriterOptions` (#3720).
The EPUB writer now takes its EPUB subdirectory from this option.
+ In `WriterOptions`, rename `writerLaTeXEngine` to `writerPdfEngine`
and `writerLaTeXArgs` to `writerPdfArgs` (Mauro Bieg, #3909).
+ Add `writerSyntaxMap` to `WriterOptions`.
+ Removed `writerEpubStylesheet` from `WriterOptions`.
+ Remove `writerUserDataDir` from `WriterOptions`. It is now carried
in `CommonState` in `PandocMonad` instances. (And thus it can be used
by readers too.)
+ Changed `writerEpubMetadata` to a `Maybe String`.
+ Removed `readerApplyMacros` from `ReaderOptions`. Now we just check
the `latex_macros` reader extension.
+ FromJSON/ToJSON instances for `ReaderOptions`.
+ In `HTMLMathMethod`, the `KaTeX` contsructor now takes only
one string (for the KaTeX base URL), rather than two.
+ Removed `writerSourceURL` from `WriterOptions`. We now use
`stSourceURL` in `CommonState`, which is set by `setInputFiles`.
* `Text.Pandoc.Shared`:
+ `tabFilter` now takes a `Text`, not `String`.
+ `openURL`: Changed type from an Either. Now it will just raise
an exception to be trapped later.
+ Remove `normalizeSpaces` (#1530).
+ Remove `warn`. (Use `report` from `Text.Pandoc.Class` instead.)
+ Export a new function `crFilter`.
+ Add `eastAsianLineBreakFilter` (previously in Markdown reader).
+ Provide custom `isURI` that rejects unknown schemes.
(Albert Krewinkel, #2713). We also export the set of known
`schemes`. The new function replaces the function of the same name
from `Network.URI`, as the latter did not check whether a scheme is
well-known. All official IANA schemes (as of 2017-05-22) are
included in the set of known schemes. The four non-official schemes
`doi`, `isbn`, `javascript`, and `pmid` are kept.
+ Remove `err`.
+ Remove `readDataFile`, `readDefaultDataFile`, `getReferenceDocx`,
`getReferenceODT`. These now live in `Text.Pandoc.Class`,
where they are defined in terms of `PandocMonad`
primitives and have different signatures.
+ Remove `openURL`. Use `openURL` from `Text.Pandoc.Class` instead.
+ Add `underlineSpan`.
* `Text.Pandoc.Readers.HTML`: export new `NamedTag` class.
* `Text.Pandoc.Readers.Markdown`: remove `readDocxWithWarnings`.
With the new API one can simply use `getLog` after running
the reader.
* `Text.Pandoc.Readers.LaTeX`: Changed types for `rawLaTeXInline`
and `rawLaTeXBlock`. (Both now return a `String`, and they are
polymorphic in state.)
[bug fixes and under-the-hood improvements]
* TEI writer: Added identifiers on `
` elements.
* DokuWiki reader: Better handling for code block in list item (#3824).
* Custom writer: Remove old preprocesesor conditionals (Albert Krewinkel).
* ZimWiki writer: Removed internal formatting from note and table cells,
because ZimWiki does not support it (Alex Ivkin, #3446).
* MediaWiki writer:
+ Updated list of syntax highlighting languages (#3461).
Now `r` gets you `
` rather than `` (among others).
+ Add display attribute on `` tags (#3452). This allows display
math to be rendered properly.
+ Remove newline before `` (#2652).
+ Don't softbreak lines inside list items (#3531).
* Org writer:
+ Reduce to two spaces after bullets (#3417, Albert Krewinkel).
+ Add unit tests (Alexander Krotov).
+ Stop using raw HTML to wrap divs (Albert Krewinkel, #3771).
+ Do not strip `#` from Org anchor links (Alexander Krotov).
* CommonMark writer:
+ Avoid excess blank lines at end of output.
+ Prefer pipe tables to HTML tables even if it means losing relative
column width information (#3734).
+ Support table, strikethrough extensions, when enabled (as with gfm).
Note that we bypass the commonmark writer from cmark and construct our
own pipe tables, with better results.
+ Properly support `--wrap=none`.
+ Use smallcaps class for `SmallCaps` (#1592).
+ Omit "fig:" prefix in image titles. This is used internally to
indicate internal figures.
* RST writer:
+ Properly handle table captions.
+ Don't wrap lines in in definition list terms. Wrapping is not allowed.
+ Implemented `+/-smart` and improved escaping with `+smart`.
+ Add empty comments when needed to avoid including a blockquote
in the indented content of a preceding block (#3675).
+ Improve grid table output, fix bug with empty rows (#3516).
Uses the new `gridTable` in Writers.Shared, which is here
improved to better handle 0-width cells.
+ Remove space at beginning/end of RST code span (#3496). Otherwise
we get invalid RST. There seems to be no way to escape the space.
+ Add header anchors when header has non-standard id (#3937).
+ Correctly handle inline code containing backticks, using a `:literal:`
role (#3974).
+ Don't backslash-escape word-internal punctuation (#3978).
* Markdown writer:
+ Don't include variables in metadata blocks. Previously variables set
on the command line were included in e.g. YAML metadata, contrary to
documentation and intentions.
+ Improved escaping with `+smart`.
+ Fixed grid tables embedded in grid tables (#2834).
+ Use span with class 'smallcaps' for SmallCaps, instead of a style
attribute as before (#1592).
+ Escape initial `%` in a paragraph if the `pandoc_title_blocks`
extension is enabled (#3454). Otherwise in a document starting with
a literal `%` the first line is wrongly interpreted as a title.
+ Fixed false ordered lists in YAML metadata (#3492, #1685). Now we
properly escape things that would otherwise start ordered lists,
such as
---
title: 1. inline
...
+ Better handling of tables with empty columns (#3337). We now
calculate the number of columns based on the longest row (or the
length of aligns or widths).
+ Escape unordered list markers at beginning of paragraph (#3497), to
avoid false interpretation as a list.
+ Escape `|` appropriately.
+ Ensure space before list at top level (#3487).
+ Avoid spurious blanklines at end of document after tables and list,
for example.
+ Fixed bugs in simple/multiline list output (#3384).
Previously we got overlong lists with `--wrap=none`. This is fixed.
Previously a multiline list could become a simple list (and would
always become one with `--wrap=none`).
+ Don't emit a simple table if `simple_tables` disabled (#3529).
+ Case-insensitive reference links (David A Roberts, #3616).
Ensure that we do not generate reference links whose labels differ only
by case. Also allow implicit reference links when the link
text and label are identical up to case.
+ Put space before reference link definitions (Mauro Bieg, #3630).
+ Better escaping for links (David A. Roberts, #3619). Previously the
Markdown writer would sometimes create links where there were none
in the source. This is now avoided by selectively escaping bracket
characters when they occur in a place where a link might be created.
+ Added missing `\n` (David A. Roberts, #3647).
+ Fixed duplicated reference links with `--reference-links`
and `--reference-location=section` (#3674). Also ensure that there
are no empty link references `[]`.
+ Avoid inline surround-marking with empty content (#3715).
E.g. we don't want ` ` to become `****`.
Similarly for emphasis, super/subscript, strikeout.
+ Don't allow soft break in header (#3736).
+ Make sure `plain`, `markdown_github`, etc. work for raw.
Previously only `markdown` worked. Note: currently a raw block labeled
`markdown_github` will be printed for any `markdown` format.
+ Ensure that `+` and `-` are escaped properly so they don't cause
spurious lists (#3773). Previously they were only
if succeeded by a space, not if they were at end of line.
+ Use pipe tables if `raw_html` disabled and `pipe_tables` enabled,
even if the table has relative width information (#3734).
+ Markdown writer: don't crash on `Str ""`.
+ Make `Span` with null attribute transparent. That is, we don't use
brackets or `` tags to mark spans when there are no attributes;
we simply output the contents.
+ Escape pipe characters when `pipe_tables` enabled (#3887).
+ Better escaping of `<` and `>`. If `all_symbols_escapable` is set,
we backslash escape these. Otherwise we use entities as before.
+ When writing plain, don't use ` ` to separate list and indented
code. There's no need for it in this context, since this isn't to be
interpreted using Markdown rules.
+ Preserve classes in JS obfuscated links (Timm Albers, #2989).
HTML links containing classes originally now preserve them when using
JavaScript email obfuscation.
+ Render `SmallCaps` as a native span when `native_spans` are enabled.
+ Always write attributes with `bracketed_spans` (d-dorazio).
* Man writer:
+ Fix handling of nested font commands (#3568). Previously pandoc emitted
incorrect markup for bold + italic, for example, or bold + code.
+ Avoid error for definition lists with no definitions (#3832).
* DocBook writer:
+ Fix internal links with `writerIdentifierPrefix opt`
(#3397, Mauro Bieg).
* Docx writer:
+ Don't include bookmarks on headers unless non-null id (#3476).
+ Support 9 levels of headers (#1642).
+ Allow 9 list levels (#3519).
+ Don't take `distArchive` from datadir (#3322). The docx writer takes
components from the distribution's version of `reference.docx` when it
can't find them in a user's custom `reference.docx`. Previously, we
allowed a `reference.docx` in the data directory (e.g. `~/.pandoc`)
to be used as the distribution's reference.docx. This led to a
bizarre situation where pandoc would produce a good docx using
`--template ~/.pandoc/ref.docx`, but if `ref.docx` were moved to
`~/.pandoc/reference.docx`, it would then produce a corrupted docx.
+ Fixed handling of soft hyphen (0173) (#3691).
+ Better handling of keywords (#3719).
+ Cleaner code for handling dir and style attributes for `Div`.
+ Use `Set` for dynamic styles to avoid duplicates.
+ Removed redundant element from data/docx/word/numbering.xml.
The elements we need are generated when the document is
compiled; this didn't do anything.
+ Activate `evenAndOddHeaders` from reference docx (#3901,
Augustín Martín Barbero).
* ODT/OpenDocument writer:
+ Calculate aspect ratio for percentage-sized images (Mauro Bieg, #3239).
+ Use more widely available bullet characters (#1400). The old
characters weren't available in some font sets. These seem to work
well on Windows and Linux versions of LibreOffice.
+ Wider labels for lists (#2421). This avoids overly narrow labels for
ordered lists with `()` delimiters. However, arguably it creates
overly wide labels for bullets. Also, lists now start flush with
the margin, rather than indented.
+ Fixed dropped elements in some ordered lists (#2434).
* FB2 writer:
+ Don't render `RawBlock` as code.
+ Don't fail with an error on interior headers (e.g. in list) (#3750).
Instead, omit them with an INFO message.
+ Add support for "lang" metadata (Alexander Krotov, #3625).
+ Format `LineBlock` as poem (Alexander Krotov). Previously writer
produced one paragraph with ` ` elements, which are not
allowed inside `` according to FB2 schema.
+ Replace `concatMap` with `cMap` (Alexander Krotov).
+ Write FB2 lists without nesting blocks inside `
` (Alexander
Krotov, #4004)
* HTML writer:
+ Make sure `html4`, `html5` formats work for raw blocks/inlines.
+ Render raw inline environments when `--mathjax` used (#3816).
We previously did this only with raw blocks, on the assumption
that math environments would always be raw blocks. This has changed
since we now parse them as inline environments.
+ Ensure we don't get two style attributes for width and height.
+ Report when not rendering raw inline/block.
+ Issue warning if no title specified and template used (#3473).
+ Info message if `lang` is unspecified (#3486).
+ Removed unused parameter in `dimensionsToAttributeList`.
+ Avoid two class attributes when adding `uri` class (#3716).
+ Fix internal links with `writerIdentifierPrefix opt` (#3397, Mauro
Bieg).
+ Use revealjs's math plugin for mathjax (#3743). This is a thin
wrapper around mathjax that makes math look better on revealjs.
+ Slidy: use h1 for all slides, even if they were originally
level 2 headers (#3566). Otherwise the built-in table of contents
in Slidy breaks.
* LaTeX writer:
+ Don't render LaTeX images with data: URIs (#3636). Note that
`--extract-media` can be used when the input contains data: URIs.
+ Make highlighted code blocks work in footnotes (Timm Albers).
+ Don't use figure inside table cell (#3836).
+ Use proper code for list enumerators (#3891). This should fix problems
with lists that don't use arabic numerals.
+ Always add hypertarget when there's a non-empty identifier (#2719).
Previously the hypertargets were only added when there was actually
a link to that identifier.
+ Use `%` after hypertarget before code block.
+ Add `\leavevmode` before hypertarget at start of paragraph (#2704,
fixes formatting problems in beamer citations).
+ Don't use `lstinline` in \item[..] (#645). If you do, the contents
of item disappear or are misplaced. Use `\texttt` instead.
+ Fix problem with escaping in `lstinline` (#1629). Previously the
LaTeX writer created invalid LaTeX when `--listings` was specified and
a code span occured inside emphasis or another construction.
+ Fix error with line breaks after empty content (#2874). LaTeX
requires something before a line break, so we insert a `~` if no
printable content has yet been emitted.
+ Use BCP47 parser.
+ Fixed detection of otherlangs (#3770). We weren't recursing into
inline contexts.
+ Handle language in inline code with `--listings` (#3422).
+ Write euro symbol directly in LaTeX (Andrew Dunning, #3801).
The textcomp package allows pdfLaTeX to parse `€` directly, making the
`\euro` command unneeded.
+ Fixed footnotes in table captions (#2378). Note that if the table has
a first page header and a continuation page header, the notes will
appear only on the first occurrence of the header.
+ In `writeBeamer` output, allow hyperlinks to frames (#3220).
Previously you could link to a header above or below slide level but
not *to* slide level. This commit changes that. Hypertargets are
inserted inside frame titles; technically the reference is to just
after the title, but in normal use (where slides are viewed full
screen in a slide show), this does not matter.
+ Remove `\strut` at beginning of table cells (#3436). This fixes a
problem with alignment of lists in table cells. The `\strut` at the
end seems to be enough to avoid the too-close spacing that motivated
addition of the strut in #1573.
+ Add partial siunitx Support (Marc Schreiber, #3588).
* ConTeXt writer:
+ Refactored to use BCP47 module.
+ Remove unnecessary `$` (Alexander Krotov, #3482).
+ Use header identifiers for chapters (#3968).
* EPUB writer:
+ `title_page.xhtml` is now put in `text/`.
+ Don't strip formatting in TOC (#1611).
* Textile reader:
+ Fix bug for certain links in table cells (#3667).
+ Allow 'pre' code in list item (#3916).
* HTML reader:
+ Added warnings for ignored material (#3392).
+ Better sanity checks to avoid parsing unintended things as
raw HTML in the Markdown reader (#3257).
+ Revise treatment of `li` with `id` attribute (#3596). Previously we
always added an empty div before the list item, but this created
problems with spacing in tight lists. Now we do this: If the list
item contents begin with a `Plain` block, we modify the `Plain`
block by adding a `Span` around its contents. Otherwise, we add a
`Div` around the contents of the list item (instead of adding an
empty `Div` to the beginning, as before).
+ Add `details` tag to list of block tags (#3694).
+ Removed `button` from block tag list (#3717). It is already in the
`eitherBlockOrInlineTag` list, and should be both places.
+ Use `Set`s instead of lists for block tag lookup.
+ Rewrote to use `Text` throughout. Effect on memory usage is modest
(< 10%).
+ Use the lang value of `` to set the lang meta value (bucklereed,
#3765).
+ Ensure that paragraphs are closed properly when the parent block
element closes, even without `
` (#3794).
+ Parse `` and `` (Mauro Bieg, #3813).
+ Parse `` like `` (bucklereed, #3791).
`
` closes `` and behaves like a block element generally
+ Support column alignments (#1881). These can be set either
with a `width` attribute or with `text-width` in a `style` attribute.
+ Modified state type to be an instance of `HasLogMessages`, so
`registerHeader` can issue warnings.
+ `` or `
` should close any open block tag (#3991).
+ `` should close an open ` ` or ` `.
+ `htmlTag` improvements (#3989). We previously failed on cases
where an attribute contained a `>` character. This patch fixes the
bug, which especially affects raw HTML in Markdown.
* Txt2Tags reader:
+ Newline is not indentation (Alexander Krotov).
* MediaWiki reader:
+ Allow extra hyphens after `|-` in tables (#2649).
+ Allow blank line after table start (#2649).
+ Fixed more table issues (#2649).
+ Ensure that list starts begin at left margin (#2606). Including when
they're in tables or other list items.
+ Make smart double quotes depend on `smart` extension (#3585).
+ Don't do curly quotes inside `` contexts (#3585). Even if `+smart`.
+ Modified state type to be an instance of `HasLogMessages`, so
`registerHeader` can issue warnings.
* TWiki reader (Alexander Krotov):
+ Remove unnecessary `$` (#3597).
+ Simplify `linkText` (#3605).
* EPUB reader:
+ Minor refactoring, avoiding explicit MediaBag handling.
This all works behind the scenes in CommonState plumbing.
* Docx reader:
+ Don't drop smartTag contents (#2242).
+ Handle local namespace declarations (#3365). Previously we didn't
recognize math, for example, when the xmlns declaration occured on
the element and not the root.
+ More efficient trimSps (#1530). Replacing `trimLineBreaks`. This
does the work of `normalizeSpaces` as well, so we avoid the need for
that function here.
+ Avoid 0-level headers (Jesse Rosenthal, #3830). We used to parse
paragraphs styled with "HeadingN" as "nth-level header." But if a
document has a custom style named "Heading0", this will produce a
0-level header, which shouldn't exist. We only parse this style
if N>0. Otherwise we treat it as a normal style name, and
follow its dependencies, if any.
+ Add tests for avoiding zero-level header (Jesse Rosenthal).
* ODT reader:
+ Replaced `collectRights` with Rights from `Data.Either`.
+ Remove dead code (Albert Krewinkel).
* Org reader (Albert Krewinkel, unless noted).
+ Don't allow tables inside list items (John MacFarlane, #3499).
+ Disallow tables on list marker lines (#3499).
+ Convert markup at beginning of footnotes (John MacFarlane, #3576).
+ Allow emphasized text to be followed by `[` (#3577).
+ Handle line numbering switch for src blocks.
The line-numbering switch that can be given to source blocks (`-n` with
an start number as an optional parameter) is parsed and translated to a
class/key-value combination used by highlighting and other readers and
writers.
+ Stop adding rundoc prefix to src params. Source block parameter names
are no longer prefixed with `rundoc`. This was intended to simplify
working with the rundoc project, a babel runner. However, the rundoc
project is unmaintained, and adding those markers is not the reader's
job anyway. The original language that is specified for a source
element is now retained as the `data-org-language` attribute and only
added if it differs from the translated language.
+ Allow multi-word arguments to src block params (#3477). The reader now
correctly parses src block parameter list even if parameter arguments
contain multiple words.
+ Avoid creating `nullMeta` by applying `setMeta` directly
(Alexander Krotov).
+ Replace `sequence . map` with `mapM`.
+ Fix smart parsing behavior. Parsing of smart quotes and special
characters can either be enabled via the `smart` language extension or
the `'` and `-` export options. Smart parsing is active if either the
extension or export option is enabled. Only smart parsing of special
characters (like ellipses and en and em dashes) is enabled by default,
while smart quotes are disabled. Previously, all smart parsing was
disabled unless the language extension was enabled.
+ Subject full doc tree to headline transformations (Albert Krewinkel,
#3695). Emacs parses org documents into a tree structure, which is
then post-processed during exporting. The reader is changed to do the
same, turning the document into a single tree of headlines starting
at level 0.
+ Fix cite parsing behaviour (Herwig Stuetz). Until now, `org-ref`
cite keys included special characters also at the end. This caused
problems when citations occur right before colons or at the end of
a sentence. With this change, all non alphanumeric characters at
the end of a cite key are ignored. This also adds `,` to the list
of special characters that are legal in cite keys to better mirror
the behaviour of org-export.
+ Fix module names in haddock comments. Copy-pasting had lead to
haddock module descriptions containing the wrong module names.
+ Recognize babel result blocks with attributes (#3706). Babel
result blocks can have block attributes like captions and names.
Result blocks with attributes were not recognized and were parsed
as normal blocks without attributes.
+ Include tags in headlines. The Emacs default is to include tags in the
headline when exporting. Instead of just empty spans, which contain the
tag name as attribute, tags are rendered as small caps and wrapped in
those spans. Non-breaking spaces serve as separators for multiple tags.
+ Respect export option for tags (#3713). Tags are appended to
headlines by default, but will be omitted when the `tags` export option
is set to nil.
+ Use `tag-name` attribute instead of `data-tag-name`.
+ Use `org-language` attribute rather than `data-org-language`.
+ Modified state type to be an instance of `HasLogMessages`, so
`registerHeader` can issue warnings.
+ End footnotes after two blank lines. Footnotes can not only be
terminated by the start of a new footnote or a header, but also by two
consecutive blank lines.
+ Update emphasis border chars (#3933). The org reader was updated to
match current org-mode behavior: the set of characters which are
acceptable to occur as the first or last character in an org emphasis
have been changed and now allows all non-whitespace chars at the
inner border of emphasized text (see `org-emphasis-regexp-components`).
* RST reader:
+ Fixed small bug in list parsing (#3432). Previously the parser didn't
handle properly this case:
* - a
- b
* - c
- d
+ Handle multiline cells in simple tables (#1166).
+ Parse list table directive (Keiichiro Shikano, #3432).
+ Make use of `anyLineNewline` (Alexander Krotov, #3686).
+ Use `anyLineNewline` in `rawListItem` (Alexander Krotov, #3702).
+ Reorganize block parsers for ~20% faster parsing.
+ Fixed `..include::` directive (#3880).
+ Handle blank lines correctly in line blocks (Alexander Krotov, #3881).
Previously pandoc would sometimes combine two line blocks separated
by blanks, and ignore trailing blank lines within the line block.
+ Fix indirect hyperlink targets (#512).
* Markdown reader:
+ Allow attributes in reference links to start on next line (#3674).
+ Parse YAML metadata in a context that sees footnotes defined in
the body of the document (#1279).
+ When splitting pipe table cells, skip tex math (#3481).
You might have a `|` character inside math. (Or for that matter
something that the parser might mistake for raw HTML.)
+ Treat span with class `smallcaps` as SmallCaps.
This allows users to specify small caps in Markdown this way:
`[my text]{.smallcaps}` (#1592).
+ Fixed internal header links (#2397).
This patch also adds `shortcut_reference_links` to the list
of mmd extensions.
+ Treat certain environments as inline
when they occur without space surrounding them (#3309, #2171).
E.g. equation, math. This avoids incorrect vertical space
around equations.
+ Optimized `nonindentSpaces`. Makes the benchmark go from 40 to 36 ms.
+ Allow latex macro definitions indented 1-3 spaces.
Previously they only worked if nonindented.
+ Improved parsing of indented raw HTML blocks (#1841).
Previously we inadvertently interpreted indented HTML as
code blocks. This was a regression. We now seek to determine the
indentation level of the contents of an HTML block, and (optionally)
skip that much indentation. As a side effect, indentation may be
stripped off of raw HTML blocks, if `markdown_in_html_blocks` is
used. This is better than having things interpreted as indented
code blocks.
+ Fixed smart quotes after emphasis (#2228). E.g. in `*foo*'s 'foo'`.
+ Warn for notes defined but not used (#1718).
+ Use `anyLineNewline` (Alexander Krotov).
+ Interpret YAML metadata as Inlines when possible (#3755). If
the metadata field is all on one line, we try to interpret it as
Inlines, and only try parsing as Blocks if that fails. If it
extends over one line (including possibly the `|` or `>` character
signaling an indented block), then we parse as Blocks. This was
motivated by some German users finding that `date: '22. Juin 2017'`
got parsed as an ordered list.
+ Fixed spurious parsing as citation as reference def (#3840).
We now disallow reference keys starting with `@` if the
`citations` extension is enabled.
+ Parse `-@roe` as suppress-author citation (pandoc-citeproc#237).
Previously only `[-@roe]` (with brackets) was recognized as
suppress-author, and `-@roe` was treated the same as `@roe`.
+ Fixed parsing of fenced code after list when there is no intervening
blank line (#3733).
+ Allow raw latex commands starting with `\start` (#3558). Previously
these weren't allowed because they were interpreted as starting
ConTeXt environments, even without a corresponding `\stop`...
+ Added `inlines`, `inlines1`.
+ Require nonempty alt text for `implicit_figures` (#2844).
A figure with an empty caption doesn't make sense.
+ Removed texmath macro material; now all this is handled
in the LaTeX reader functions.
+ Fixed bug with indented code following raw LaTeX (#3947).
* LaTeX reader:
+ Rewrote LaTeX reader with proper tokenization (#1390,
#2118, #3236, #3779, #934, #982). This rewrite is primarily
motivated by the need to get macros working properly. A side benefit
is that the reader is significantly faster. We now tokenize the
input text, then parse the token stream. Macros modify the token
stream, so they should now be effective in any context, including
math. Thus, we no longer need the clunky macro processing
capacities of texmath.
+ Parse `\,` to `\8198` (six-per-em space) (Henri Werth).
+ Allow `\newcommand\foo{blah}` without braces.
+ Support `\lstinputlisting` (#2116).
+ Issue warnings when skipping unknown latex commands (#3392).
+ Include contents of `\parbox`.
+ Allow `\hspace` and `\vspace` to count as raw block or inline.
Previously we would refuse to parse anything as raw inline if
it was in the `blockCommands` list. Now we allow exceptions
if they're listed under ignoreInlines in inlineCommands.
This should make it easier e.g. to include an `\hspace`
between two side-by-side raw LaTeX tables.
+ Don't drop contents of `\hypertarget`.
+ Handle spaces before `\cite` arguments.
+ Allow newpage, clearpage, pagebreak in inline contexts as well as
block contexts (#3494).
+ Treat `{{xxx}}` the same as `{xxx}` (#2115).
+ Use `pMacroDefinition` in macro (for more direct parsing).
Note that this means that `macro` will now parse one
macro at a time, rather than parsing a whole group together.
+ Fixed failures on \ref{}, \label{} with `+raw_tex`. Now these
commands are parsed as raw if `+raw_tex`; otherwise, their argument
is parsed as a bracketed string.
+ Don't crash on empty `enumerate` environment (#3707).
+ Handle escaped `&` inside table cell (#3708).
+ Handle block structure inside table cells (#3709). `minipage` is no
longer required.
+ Handle some width specifiers on table columns (#3709). Currently
we only handle the form `0.9\linewidth`. Anything else would have
to be converted to a percentage, using some kind arbitrary assumptions
about line widths.
+ Make sure `\write18` is parsed as raw LaTeX. The change is in the
LaTeX reader's treatment of raw commands, but it also affects the
Markdown reader.
+ Fixed regression with starred environment names (#3803).
+ Handle optional args in raw `\titleformat` (#3804).
+ Improved heuristic for raw block/inline. An unknown command at the
beginning of the line that could be either block or inline is
treated as block if we have a sequence of block commands followed by
a newline or a `\startXXX` command (which might start a raw ConTeXt
environment).
+ Don't remove macro definitions from the output, even if
`Ext_latex_macros` is set, so that macros will be applied.
Since they're only applied to math in Markdown, removing the macros
can have bad effects. Even for math macros, keeping them should be
harmless.
+ Removed `macro`. It is no longer necessary, since the
`rawLaTeXBlock` parser will parse macro definitions. This also avoids
the need for a separate `latexMacro` parser in the Markdown reader.
+ Use `label` instead of `data-label` for label in caption (#3639).
+ Fixed space after \figurename etc.
+ Resolve references to section numbers.
+ Fix `\let\a=0` case, with single character token.
+ Allow `@` as a letter in control sequences. `@` is commonly used
in macros using `\makeatletter`. Ideally we'd make the tokenizer
sensitive to `\makeatletter` and `\makeatother`, but until then this
seems a good change.
+ Track header numbers and correlate with labels.
+ Allow `]` inside group in option brackets (#3857).
+ lstinline with braces can be used (verb cannot be used with braces)
(Marc Schreiber, #3535).
+ Fix keyval funtion: pandoc did not parse options in braces correctly
(Marc Schreiber, #3642).
+ When parsing raw LaTeX commands, include trailing space (#1773).
Otherwise things like `\noindent foo` break and turn into
`\noindentfoo`. Affects `-f latex+raw_tex` and `-f markdown` (and other
formats that allow `raw_tex`).
+ Don't treat "..." as Quoted (#3958). This caused quotes to be omitted in
`\texttt` contexts.
+ Add tests for existing `\includegraphics` behaviour (Ben Firshman).
+ Allow space before `=` in bracketd options (Ben Firshman).
+ Be more forgiving in parsing command options. This was needed, for
example, to make some minted options work.
+ Strip off quotes in `\include` filenames.
* Added `Text.Pandoc.CSV`, simple (unexported) CSV parser.
* `Text.Pandoc.PDF`:
+ Got `--resource-path` working with PDF output (#852).
+ Fetch images when generating PDF via context (#3380).
To do this, we create the temp directory as a subdirectory
of the working directory. Since context mk IV by default looks
for images in the parent directory, this works.
+ Use `report` instead of `warn`, make it sensitive to verbosity settings.
+ Use `fillMediaBag` and `extractMedia` to extract media to temp dir.
This reduces code duplication.
+ `html2pdf`: use stdin instead of intermediate HTML file
+ Removed useless `TEXINPUTS` stuff for `context2pdf`. mkiv context
doesn't use `TEXINPUTS`.
* `Text.Pandoc.Pretty`:
+ Simplified definition of `realLength`.
+ Don't error for blocks of size < 1. Instead, resize to 1 (see #1785).
* `Text.Pandoc.MIME`:
+ Use `application/javascript` (not `application/x-javascript`).
+ Added `emf` to mimeTypes with type `application/x-msmetafile` (#1713).
* `Text.Pandoc.ImageSize`:
+ Improve SVG image size code (Marc Schreiber, #3580).
+ Make `imageSize` recognize basic SVG dimensions (Mauro Bieg, #3462).
* Use `Control.Monad.State.Strict` throughout. This gives 20-30% speedup
and reduction of memory usage in most of the writers.
* Use `foldrWithKey` instead of deprecated `foldWithKey`.
* `Text.Pandoc.SelfContained`:
+ Fixed problem with embedded fonts (#3629).
+ Refactored getData from `getDataURI` in `SelfContained`.
+ Don't use data URIs for script or style (#3423). Instead, just use
script or style tags with the content inside. The old method with
data URIs prevents certain optimizations outside pandoc. Exception:
data URIs are still used when a script contains `` or a
style contains ``.
+ SelfContained: Handle URL inside material retrieved from a URL
(#3629). This can happen e.g. with an @import of a google web font.
(What is imported is some CSS which contains an url reference
to the font itself.) Also, allow unescaped pipe (|) in URL.
+ Load resources from `data-src` (needed for lazy loading in
reveal.js slide shows).
+ Handle `data-background-image` attribute on section (#3979).
* `Text.Pandoc.Parsing`:
+ Added `indentWith` (Alexander Krotov, #3687).
+ Added `stateCitations` to `ParserState`.
+ Removed `stateChapters` from `ParserState`.
+ In `ParserState`, make `stateNotes'` a Map, add `stateNoteRefs`.
+ Added `gobbleSpaces` and `gobbleAtMostSpaces`.
+ Adjusted type of `insertIncludedFile` so it can be used with token
parser.
+ Replace old texmath macro stuff from Parsing. Use Macro from
Text.Pandoc.Readers.LaTeX.Types instead.
+ Export `insertIncludedFile`.
+ Added `HasLogMessages`, `logMessage`, `reportLogMessages` (#3447).
+ Replace partial with total function (Albert Krewinkel).
+ Introduce `HasIncludeFiles` type class (Albert Krewinkel). The
`insertIncludeFile` function is generalized to work with all parser
states which are instances of that class.
+ Add `insertIncludedFilesF` which returns F blocks (Albert Krewinkel).
The `insertIncludeFiles` function was generalized and renamed
to `insertIncludedFiles'`; the specialized versions are based on that.
+ `many1Till`: Check for the end condition before parsing (Herwig
Stuetz). By not checking for the end condition before the first
parse, the parser was applied too often, consuming too much of the
input. This only affects `many1Till p end` where `p` matches on a
prefix of `end`.
+ Provide `parseFromString` (#3690). This is a verison of
`parseFromString` specialied to ParserState, which resets
`stateLastStrPos` at the end. This is almost always what we want.
This fixes a bug where `_hi_` wasn't treated as emphasis in the
following, because pandoc got confused about the position of the
last word: `- [o] _hi_`.
+ Added `takeP`, `takeWhileP` for efficient parsing of `[Char]`.
+ Fix `blanklines` documentation (Alexander Krotov, #3843).
+ Give less misleading line information with `parseWithString`.
Previously positions would be reported past the end of the chunk.
We now reset the source position within the chunk and report
positions "in chunk."
+ Add `anyLineNewline` (Alexander Krotov).
+ Provide shared F monad functions for Markdown and Org readers
(Albert Krewinkel). The `F` monads used for delayed evaluation
of certain values in the Markdown and Org readers are based on a
shared data type capturing the common pattern of both `F` types.
+ Add `returnF` (Alexander Krotov).
+ Avoid parsing `Notes:**` as a bare URI (#3570). This avoids parsing
bare URIs that start with a scheme + colon + `*`, `_`, or `]`.
+ Added `readerAbbreviations` to `ParserState`. Markdown reader
now consults this to determine what is an abbreviation.
+ Combine grid table parsers (Albert Krewinkel, #3638). The grid table
parsers for markdown and rst was combined into one single
parser `gridTable`, slightly changing parsing behavior of both
parsers: (1) The markdown parser now compactifies block content
cell-wise: pure text blocks in cells are now treated as paragraphs
only if the cell contains multiple paragraphs, and as plain blocks
otherwise. Before, this was true only for single-column tables. (2)
The rst parser now accepts newlines and multiple blocks in header
cells.
+ Generalize tableWith, gridTableWith (Albert Krewinkel).
The parsing functions `tableWith` and `gridTableWith` are generalized
to work with more parsers. The parser state only has to be an
instance of the `HasOptions` class instead of requiring a concrete
type. Block parsers are required to return blocks wrapped into a
monad, as this makes it possible to use parsers returning results
wrapped in `Future`s.
* `Text.Pandoc.Shared`:
+ Simplify `toRomanNumeral` using guards (Alexander Krotov, #3445)
+ `stringify`: handle Quoted better (#3958). Previously we were losing
the quotation marks in Quoted elements.
* `Text.Pandoc.Writers.Shared`:
+ Export `metaToJSON'`, `addVariablesToJSON` (#3439).
This allows us to add the variables AFTER using the metadata
to generate a YAML header (in the Markdown writer).
+ Added `unsmartify` (previously in RST writer).
Undo literal double curly quotes. Previously we left these.
+ Generalize type of `metaToJSON` so it can take a Text. Previously a
String was needed as argument; now any ToJSON instance will do.
+ Added `gridTable` (previously in Markdown writer).
+ `gridTable`: Refactored to use widths in chars.
+ `gridTable`: remove unnecessary extra space in cells.
+ Fixed `addVariablesToJSON`. It was previously not allowing multiple
values to become lists.
+ Pipe tables: impose minimum cell size (see #3526).
[default template changes]
* HTML templates (including EPUB and HTML slide show templates):
+ Make default.html5 polyglot markup conformant (John Luke Bentley,
#3473). Polyglot markup is HTML5 that is also valid XHTML. See
. With this change, pandoc's
html5 writer creates HTML that is both valid HTML5 and valid XHTML.
+ Regularized CSS in html/epub/html slide templates (#3485).
All templates now include `code{white-space: pre-wrap}`
and CSS for `q` if `--html-q-tags` is used. Previously some templates
had `pre` and others `pre-wrap`; the `q` styles were only sometimes
included.
+ CSS for `.smallcaps`, (Mauro Bieg, #1592)
+ `default.revealjs`: make `history` default to true.
+ `default.revealjs`: use lazy loading (#2283).
+ `default.revealjs`: add `mathjax` variable and some conditional code
to use the MathJaX plugin.
+ `default.slidy` uses `https` instead of `http` (ickc, #3848).
+ `default.dzslides`: Load Google Font using HTTPS by default
(Yoan Blanc).
* DocBook5 template: Use `lang` and `subtitle` variables (Jens Getreu,
#3855).
* LaTeX/Beamer template:
+ Combine LaTeX/Beamer templates (Andrew Dunning, #3878).
`default.beamer` has been removed; beamer now uses the
`default.latex` template. Beamer-specific parts are conditional
on the `beamer` variable set by the writer. Note that
`pandoc -D beamer` will return this (combined) template.
+ Use `xcolor` for `colorlinks` option (Andrew Dunning, #3877).
Beamer loads `xcolor` rather than `color`, and thus the
`dvipsnames` option doesn't take effect. This also provides a wider
range of colour selections with the `svgnames` option.
+ Use starred versions of `xcolor` names (Andrew Dunning).
Prevents changes to documents defined using the `dvipsnames` list (e.g.
`Blue` gives a different result with svgnames enabled).
+ Load `polyglossia` after header-includes (#3898). It needs to be
loaded as late as possible.
+ Use `unicode-math` (Vaclav Haisman). Use `mathspec` with only
XeLaTeX on request.
+ Don't load `fontspec` before `unicode-math` (over there).
The `unicode-math` package loads `fontspec` so explict loading of
`fontspec` before `unicode-math` is not necessary.
+ Use `unicode-math` by default in default.latex template. mathspec will
be used in xelatex if the `mathspec` variable is set; otherwise
unicode-math will be used (Václav Haisman).
+ Use `dvipsnames` options when `colorlinks` specified (otherwise
we get an error for `maroon`) (Thomas Hodgson).
+ Added beamer `titlegraphic` and `logo` variables (Thomas Hodgson).
+ Fix typo in fix for notes in tables (#2378, zeeMonkeez).
+ Fix `hyperref` options clash (Andrew Dunning, #3847) Avoids an options
clash when loading a package (e.g. `tufte-latex`) that uses
`hyperref` settings different from those in the template.
+ Add `natbiboptions` variable (#3768).
+ Fix links inside captions in LaTeX output with links-as-notes
(Václav Haisman, #3651). Declare our redefined `\href` robust.
+ Load `parskip` before `hyperref` (Václav Haisman, #3654).
+ Allow setting Japanese fonts when using LuaLaTeX (Václav Haisman,
#3873). by using the `luatexja-fontspec` and `luatexja-preset`
packages. Use existing `CJKmainfont` and `CJKoptions` template
variables. Add `luatexjafontspecoptions` for `luatexja-fontspec`
and `luatexjapresetoptions` for `luatexja-preset`.
+ Added `aspectratio` variable to beamer template (Václav Haisman,
#3723).
+ Modified template.latex to fix XeLaTex being used with tables
(lwolfsonkin, #3661). Reordered `lang` variable handling to
immediately before `bidi`.
* ConTeXt template: Improved font handling: `simplefonts` is now
obsolete in ConTeXt (Pablo Rodríguez).
[documentation improvements]
* MANUAL.txt:
+ Add URL for Prince HTML > PDF engine (Ian, #3919).
+ Document that content above slide-level will be omitted in
slide shows. See #3460, #2265.
+ Explain `--webtex` SVG url (Mauro Bieg, #3471)
+ Small clarification in YAML metadata section.
+ Document that html4 is technically XHTML 1.0 transitional.
+ Remove refs to highlighting-kate (#3672).
+ Document ibooks specific epub metadata.
+ Clarify that mathml is used for ODT math.
+ Mention limitations of Literate Haskell Support (#3410,
Joachim Breitner).
+ Add documentation of limitations of grid tables (Stephen
McDowell, #3864).
+ Clarify that meta-json contains transformed values (Jakob Voß,
#3491) Make clear that template variable `meta-json` does not
contain plain text values or JSON output format but field values
transformed to the selected output format.
* COPYRIGHT:
+ Clarify that templates are dual-licensed.
+ Clarify that pandoc-types is BSD3 licensed.
+ List new files not written by jgm (Albert Krewinkel).
+ Update dates in copyright notices (Albert Krewinkel). This follows
the suggestions given by the FSF for GPL licensed software.
* INSTALL.md:
+ Improved instructions for tests with patterns.
+ Put RPM-based distros on separate point (Mauro Bieg, #3449)
* CONTRIBUTING.md:
+ Fixed typos (Wandmalfarbe, #3479).
+ Add "ask on pandoc-discuss" (Mauro Bieg).
* Add lua filter documentation in `doc/lua-filters.md`. Note that the
end of this document is autogenerated from `data/pandoc.lua`
using `make doc/lua-filters.md`, which uses `tools/ldoc.ltp`
(Albert Krewinkel).
* Add `doc/filters.md`. This is the old scripting tutorial from
the website.
* Add `doc/using-the-pandoc-api.md` (#3289). This gives an introduction
to using pandoc as a Haskell library.
[build infrastructure improvements]
* Removed `data/templates` submodule. Templates are now a subtree
in `data/templates`. This removes the need to do `git submodule
update`.
* Renamed `tests` -> `test`.
* Remove `https` flag. Always build with HTTPS support.
* Use `file-embed` instead of `hsb2hs` to embed data files when
`embed_data_files` flag is set. `file-embed` gives us better dependency
tracking: if a data file changes, ghc/stack/cabal know to recompile
the Data module. This also removes `hsb2hs` as a build dependency.
* Add `custom-setup` stanza to pandoc, lowercase field names.
* Add `static` Cabal flag.
* Name change OSX -> MacOS. Add a -MacOS suffix to mac package rather
than -OSX. Changed local names from osx to macos.
* make_macos_package.sh - Use strip to reduce executable size.
* Revised binary linux package. Now a completely static executable
is created, using Docker and alpine. We create both a deb and a
tarball. The old `deb` directory has been replaced with a `linux`
directory. Running `make` in the `linux` directory should
perform the build, putting the binary packages in `artifacts/`.
* `linux/control.in`: add `Replaces:`, so existing pandoc-citeproc and
pandoc-data packages will be uninstalled; this package provides
both (#3822). Add latex packages as 'suggested', update
description.
* Remove cpphs build requirement -- it is no longer needed.
* Replaced `{deb,macos,windows}/stack.yaml` with `stack.pkg.yaml`.
* Name change OSX -> macOS (ickc, #3869).
* Fix casing of Linux, UNIX, and Windows (ickc).
* `.travis.yml`: create a source dist and do cabal build and test there.
That way we catch errors due to files missing from the data
section of pandoc.cabal.
* Makefile:
+ Split `make haddock` from `make full`.
+ Add BRANCH variable for winpkg.
+ Add `lint` target.
+ Improve `make full`. Disable optimizations.
Build everything, inc. trypandoc and benchmarks. Use parallel build.
+ Allow `make test` to take `TESTARGS`.
* Added new command tests (`Tests.Command`), using small text files
in `test/command/`. Any files added in this directory will be treated
as shell tests (see smart.md for an example). This makes it very easy
to add regression tests etc.
* Test fixes so we can find data files. In old tests & command tests,
we now set the environment variable `pandoc_datadir`. In lua tests,
we set the datadir explicitly.
* Refactored `compareOutput` in docx writer test.
* Consolidated some common functions in `Tests.Helper`.
* Small change to unbalanced bracket test to speed up test suite.
* Speed up Native writer quickcheck tests.
* Use tasty for tests rather than test-framework.
* Add simple Emacs mode to help with Pandoc templates editing.
(Václav Haisman, #3889). `tools/pandoc-template-mode.el`
pandoc (1.19.2)
* Use skylighting library instead of highlighting-kate for syntax
highlighting. Skylighting is faster and more accurate (#3363).
Later we'll be able to add features like warning messages, dynamic
loading of xml syntax definitions, and dynamic loading of themes.
* Added a new highlight style, `breezeDark`.
* Text.Pandoc.Highlighting: Update list of `listings` languages (#3374).
This allows more languages to be used when using the `--listings`
option.
* OpenDocument writer:
+ Small refactoring. Removed separate 'parent' parameter in paraStyle.
+ Don't profilerate text styles unnecessarily (#3371).
This change makes the writer create only as many temporary
text styles as are absolutely necessary. It also consolidates
adjacent nodes with the same style.
* Org reader (Albert Krewinkel):
+ Allow short hand for single-line raw blocks (Albert Krewinkel,
#3366). Single-line raw blocks can be given via `#+FORMAT: raw line`,
where `FORMAT` must be one of `latex`, `beamer`, `html`, or `texinfo`.
+ Accept org-ref citations followed by commas (Albert Krewinkel).
Bugfix for an issue which, whenever the citation was immediately
followed by a comma, prevented correct parsing of org-ref citations.
+ Ensure emphasis markup can be nested. Nested emphasis markup (e.g.
`/*strong and emphasized*/`) was interpreted incorrectly in that the
inner markup was not recognized.
+ Remove pipe char irking the haddock coverage tool (Albert Krewinkel).
* Docx reader: Empty header should be list of lists (Jesse Rosenthal).
In the past, the docx reader wrote an empty header as an empty list. It
should have the same width as a row (and be filled with empty cells).
* MediaWiki reader:
+ Improved handling of display math (#3362). Sometimes display math is
indented with more than one colon. Previously we handled these cases
badly, generating definition lists and missing the math.
+ Fix quotation mark parsing (#3336, tgkokk). Change MediaWiki reader's
behavior when the smart option is parsed to match other readers'
behavior.
* Markdown reader:
+ Fixed `-f markdown_github-hard_line_breaks+escaped_line_breaks`
(#3341). Previously this did not properly enable escaped line breaks.
+ Disallow space between inline code and attributes (#3326, #3323,
Mauro Bieg).
* DocBook5 writer: make id attribute xml:id, fixes #3329 (#3330, Mauro Bieg).
* Added some test cases for ODT reader (#3306, #3308, Hubert Plociniczak).
* LaTeX writer: allow tables with empty cells to count as "plain."
This addresses a problem of too-wide tables when empty cells
are used. Thanks to Joost Kremers for reporting the issue.
* Org writer: prefix footnote numbers with `fn:` (Albert Krewinkel).
Unprefixed numbers where used by older org-mode versions, but are no
longer supported.
* HTML writer: don't process pars with empty RawInline, (#1040, #3327,
Mauro Bieg).
* Markdown writer: Fix display math with `--webtex` (#3298).
* Fix sample.lua so it properly handles raw blocks/inlines (#3358,
bumper314).
* Templates:
+ default.latex: Moved geometry after hyperref (Václav Haisman).
Otherwise PDF sizes can be wrong in some circumstances.
+ Copied a few changes from default.latex to default.beamer
(Wandmalfarbe).
+ default.latex, default.beamer: Changed position of `\VerbatimNotes`
and `fancyvrb`. This fixes hyperlinks on footnotes in documents
that contain verbatim in notes (#3361). (Note: the beamer template
was updated to match the LaTeX template, but at this point verbatim
in notes seems not to work in beamer.)
+ default.latex: Allow passing `microtypeoptions` to microtype
(Václav Haisman).
+ default.latex: Add hyphen option to url package.
+ default.docbook5: Fix namespace declarations (Mauro Bieg).
* Moved `make_osx_package.sh` to `osx/` directory.
* Travis continuous integration:
+ Fix false positives with dist build.
+ Speed improvements (Kolen Cheung, #3304, #3357).
* MANUAL.txt:
+ Clarify that blank space is needed around footnotes (#3352).
+ Fixed typo (#3351, Alexey Rogechev).
+ Note that `--wrap=auto` does not work in HTML output.
+ Default `--columns` width is 72, not 80.
+ Fixed broken links (#3316, Kolen Cheung).
+ Document usage of `@*` in nocite section (#3333, John Muccigrosso).
* INSTALL.md:
+ Indent code so it's properly formatted (#3335, Bheesham Persaud).
+ Added instructions for extracting binary from OSX, Windows packages.
* CONTRIBUTING.md: Describe labels currently used in issue tracker
(Albert Krewinkel). The labels have changed over time, the list of
labels is updated to reflect the current set of labels used in the
issue tracker.
* Rearrange and extend badges in README (Albert Krewinkel, #3354)
* Bumped version bounds for dependencies.
pandoc (1.19.1)
* Set `PANDOC_VERSION` environment variable for filters (#2640).
This allows filters to check the pandoc version that produced
the JSON they are receiving.
* Docx reader: Ensure one-row tables don't have header (#3285,
Jesse Rosenthal). Tables in MS Word are set by default to have
special first-row formatting, which pandoc uses to determine whether
or not they have a header. This means that one-row tables will, by
default, have only a header -- which we imagine is not what people
want. This change ensures that a one-row table is not understood to
be a header only. Note that this means that it is impossible to
produce a header-only table from docx, even though it is legal
pandoc. But we believe that in nearly all cases, it will be an
accidental (and unwelcome) result
* HTML reader:
+ Fixed some bad regressions in HTML table parser (#3280).
This regression leads to the introduction of empty rows
in some circumstances.
+ Understand `style=width:` as well as `width` in `col` (#3286).
* RST reader:
+ Print warnings when keys, substitition, notes not found.
Previously the parsers failed and we got raw text. Now we get a
link with an empty URL, or empty inlines in the case of a note or
substitution.
+ Fix hyperlink aliases (#3283).
* Man writer: Ensure that periods are escaped at beginning of line
(#3270).
* LaTeX writer: Fix unnumbered headers when used with `--top-level`
(#3272, Albert Krewinkel). Fix interaction of top-level divisions
`part` or `chapter` with unnumbered headers when emitting LaTeX. Headers
are ensured to be written using stared commands (like `\subsection*{}`).
* LaTeX template: use comma not semicolon to separate keywords for
`pdfkeywords`. Thanks to Wandmalfarbe.
* Markdown writer: Fixed incorrect word wrapping (#3277). Previously pandoc
would sometimes wrap lines too early due to this bug.
* Text.Pandoc.Pretty: Added `afterBreak` [API change]. This makes it
possible to insert escape codes for content that needs escaping at the
beginning of a line.
* Removed old MathMLInHTML.js from 2004, which should no longer
be needed for MathML with modern browsers.
* Fixed tests with dynamic linking (#2709).
* Makefile: Use stack instead of cabal for targets. This is just
a convenience for developers.
* Fixed bash completion of filenames with space (#2749).
* MANUAL: improved documentation on how to create a custom `reference.docx`.
* Fix minor spelling typos in the manual (#3273, Anthony Geoghegan)
pandoc (1.19)
* Changed resolution of filter paths.
+ We now first treat the argument of `--filter` as a full (absolute
or relative) path, looking for a program there. If it's found, we
run it.
+ If not, and if it is a simple program name or a relative path, we
try resolving it relative to `$DATADIR/filters`.
+ If this fails, then we treat it as a program name and look in the
user's PATH.
+ Removed a hardcoded '/' that may have caused problems with
Windows paths.
Previously if you did `--filter foo` and you had `foo` in your path and
also an executable `foo` in your working directory, the one in the path
would be used. Now the one in the working directory is used.
In addition, when you do `--filter foo/bar.hs`, pandoc will now find a
filter `$DATADIR/filters/foo/bar.hs` -- assuming there isn't a
`foo/bar.hs` relative to the working directory.
* Allow `file://` URIs as arguments (#3196). Also improved default reader
format detection. Previously with a URI ending in .md or .markdown,
pandoc would assume HTML input. Now it treats these as markdown.
* Allow to overwrite top-level division type heuristics (#3258,
Albert Krewinkel). Pandoc uses heuristics to determine the most
reasonable top-level division type when emitting LaTeX or
Docbook markup. It is now possible to overwrite this implicitly set
top-level division via the `top-level-division` command line parameter.
* Text.Pandoc.Options \[API changes\]:
+ Removed `writerStandalone` field in `WriterOptions`, made
`writerTemplate` a `Maybe` value. Previously setting
`writerStandalone = True` did nothing unless a template was provided
in writerTemplate. Now a fragment will be generated if
`writerTemplate` is `Nothing`; otherwise, the specified template
will be used and standalone output generated.
+ `Division` has been renamed `TopLevelDivision` (#3197). The
`Section`, `Chapter`, and `Part` constructors were renamed to
`TopLevelSection`, `TopLevelChapter`, and
`TopLevelPart`, respectively. An additional `TopLevelDefault`
constructor was added, which is now also the new default value of
the `writerTopLevelDivision` field in `WriterOptions`.
* Improved error if they give wrong arg to `--top-level-division`.
* Use new module from texmath to lookup MS font codepoints in Docx reader.
Removed unexported module Text.Pandoc.Readers.Docx.Fonts. Its code now
lives in texmath (0.9).
* DocBook reader: Fixed xref lookup (#3243). It previously only worked
when the qnames lacked the docbook namespace URI.
* HTML reader:
+ Improved table parsing (#3027). We now check explicitly for non-1
rowspan or colspan attributes, and fail when we encounter them.
Previously we checked that each row had the same number of cells,
but that could be true even with rowspans/colspans. And there are
cases where it isn't true in tables that we can handle fine -- e.g.
when a tr element is empty. So now we just pad rows with empty cells
when needed.
+ Treat `` as MathML by default unless something else is
explicitly specified in xmlns. Provided it parses as MathML,
of course. Also fixed default which should be to inline math if no
display attribute is used.
+ Only treat "a" element as link if it has href (#3226). Otherwise
treat as span.
* Docx reader (Jesse Rosenthal):
+ Add a placeholder value for CHART. We wrap `[CHART]` in a
``. Note that it maps to inlines because, in
docx, anything in a drawing tag can be part of a larger paragraph.
+ Be more specific in parsing images We not only want `w:drawing`,
because that could also include charts. Now we specify
`w:drawing/pic:pic`. This shouldn't change behavior at all, but it's
a first step toward allowing other sorts of drawing data as well.
+ Abstract out function to avoid code repetition.
+ Update tests for img title and alt (#3204).
+ Handle Alt text and titles in images. We use the "description" field
as alt text and the "title" field as title. These can be accessed
through the "Format Picture" dialog in Word.
+ Docx reader utils: handle empty namespace in `elemName`. Previously,
if given an empty namespace `(elemName ns "" "foo")` `elemName`
would output a QName with a `Just ""` namespace. This is never what
we want. Now we output a `Nothing`. If someone *does* want a
`Just ""` in the namespace, they can enter the QName
value explicitly.
* ODT reader/writer:
+ Inline code when text has a special style (Hubert Plociniczak). When
a piece of text has a text `Source_Text` then we assume that this is
a piece of the document that represents a code that needs to
be inlined. Adapted the writer to also reflect that change.
Previously it was just writing a 'preformatted' text using a
non-distinguishable font style. Code blocks are still not recognized
by the ODT reader. That's a separate issue.
+ Infer table's caption from the paragraph (#3224,
Hubert Plociniczak). ODT's reader always put empty captions for the
parsed tables. This commit
1. checks paragraphs that follow the table definition
2. treats specially a paragraph with a style named 'Table'
3. does some postprocessing of the paragraphs that combines tables
followed immediately by captions
The ODT writer used the `TableCaption` style for the caption
paragraph. This commit follows the OpenOffice approach which allows
for appending captions to table but uses a built-in style named
`Table` instead of `TableCaption`. Users of a custom `reference.odt`
should change the style's name from `TableCaption` to `Table`.
* ODT reader: Infer tables' header props from rows (#3199,
Hubert Plociniczak). ODT reader simply provided an empty header list
which meant that the contents of the whole table, even if not empty, was
simply ignored. While we still do not infer headers we at least have to
provide default properties of columns.
* Markdown reader:
+ Allow reference link labels starting with `@...` if `citations`
extension disabled (#3209). Example: in
\[link text\]\[@a\]
`link text` isn't hyperlinked because `[@a]` is parsed as
a citation. Previously this happened whether or not the `citations`
extension was enabled. Now it happens only if the `citations`
extension is enabled.
+ Allow alignments to be specified in Markdown grid tables. For
example,
+-------+---------------+--------------------+
| Right | Left | Centered |
+=========:+:=================+:=============:+
| Bananas | $1.34 | built-in wrapper |
+-------+---------------+--------------------+
+ Allow Small Caps elements to be created using bracketed spans (as
they already can be using HTML-syntax spans) (#3191, Kolen Cheung).
* LaTeX reader:
+ Don't treat `\vspace` and `\hspace` as block commands (#3256).
Fixed an error which came up, for example, with `\vspace` inside
a caption. (Captions expect inlines.)
+ Improved table handling. We can now parse all of the tables emitted
by pandoc in our tests. The only thing we don't get yet are
alignments and column widths in more complex tables. See #2669.
+ Limited support for minipage.
+ Allow for `[]`s inside LaTeX optional args. Fixes cases like:
+ Handle BVerbatim from fancyvrb (#3203).
+ Handle hungarumlaut (#3201).
+ Allow beamer-style `<...>` options in raw LaTeX (also in Markdown)
(#3184). This allows use of things like `\only<2,3>{my content}` in
Markdown that is going to be converted to beamer.
* Use pre-wrap for code in dzslides template (Nicolas Porcel). Otherwise
overly long code will appear on every slide.
* Org reader (Albert Krewinkel):
+ Respect column width settings (#3246). Table column properties can
optionally specify a column's width with which it is displayed in
the buffer. Some exporters, notably the ODT exporter in org-mode
v9.0, use these values to calculate relative column widths. The org
reader now implements the same behavior. Note that the org-mode
LaTeX and HTML exporters in Emacs don't support this feature yet,
which should be kept in mind by users who use the column
widths parameters.
+ Allow HTML attribs on non-figure images (#3222). Images which are
the only element in a paragraph can still be given HTML attributes,
even if the image does not have a caption and is hence not a figure.
The following will add set the `width` attribute of the image to
`50%`:
+ATTR\_HTML: :width 50%
=======================
\[\[file:image.jpg\]\]
+ Support `ATTR_HTML` for special blocks (#3182). Special
blocks (i.e. blocks with unrecognized names) can be prefixed with an
`ATTR_HTML` block attribute. The attributes defined in that
meta-directive are added to the `Div` which is used to represent the
special block.
+ Support the `todo` export option. The `todo` export option allows to
toggle the inclusion of TODO keywords in the output. Setting this to
`nil` causes TODO keywords to be dropped from headlines. The default
is to include the keywords.
+ Add support for todo-markers. Headlines can have optional
todo-markers which can be controlled via the `#+TODO`, `#+SEQ_TODO`,
or `#+TYP_TODO` meta directive. Multiple such directives can be
given, each adding a new set of recognized todo-markers. If no
custom todo-markers are defined, the default `TODO` and `DONE`
markers are used. Todo-markers are conceptually separate from
headline text and are hence excluded when autogenerating
headline IDs. The markers are rendered as spans and labelled with
two classes: One class is the markers name, the other signals the
todo-state of the marker (either `todo` or `done`).
* LaTeX writer:
+ Use `\autocites*` when "suppress-author" citation used.
+ Ensure that simple tables have simple cells (#2666). If cells
contain more than a single Plain or Para, then we need to set
nonzero widths and put contents into minipages.
+ Remove invalid inlines in sections (#3218, Hubert Plociniczak).
* Markdown writer:
+ Fix calculation of column widths for aligned multiline tables
(#1911, Björn Peemöller). This also fixes excessive CPU and memory
usage for tables when `--columns` is set in such a way that cells
must be very tiny. Now cells are guaranteed to be big enough so that
single words don't need to line break, even if this pushes the line
length above the column width.
+ Use bracketed form for native spans when `bracketed_spans`
enabled (#3229).
+ Fixed inconsistent spacing issue (#3232). Previously a tight bullet
sublist got rendered with a blank line after, while a tight ordered
sublist did not. Now we don't get the blank line in either case.
+ Fix escaping of spaces in super/subscript (#3225). Previously two
backslashes were inserted, which gave a literal backslash.
+ Adjust widths in Markdown grid tables so that they match
on round-trip.
* Docx writer:
+ Give full detail when there are errors converting tex math.
+ Handle title text in images (Jesse Rosenthal). We already handled
alt text. This just puts the image "title" into the docx
"title" attr.
+ Fixed XML markup for empty cells (#3238). Previously the Compact
style wasn't being applied properly to empty cells.
* HTML writer:
+ Updated `renderHtml` import from blaze-html.
* Text.Pandoc.Pretty:
+ Fixed some bugs that caused blank lines in tables (#3251). The bugs
caused spurious blank lines in grid tables when we had things like
`blankline $$ blankline`.
+ Add exported function `minOffet` \[API change\] (Björn Peemöller).
+ Added error message for illegal call to `block` (Björn Peemöller).
* Text.Pandoc.Shared:
+ Put `warn` in MonadIO.
+ `fetchItem`: Better handling of protocol-relative URL (#2635). If
URL starts with `//` and there is no "base URL" (as there would be
if a URL were used on the command line), then default to http:.
* Export Text.Pandoc.getDefaultExtensions \[API change\] (#3178).
* In --version, trap error in `getAppUserDataDirectory` (#3241). This
fixes a crash with `pandoc --version` on unusual systems with no real
user (e.g. SQL Server 2016).
* Added weigh-pandoc for memory usage diagnostics (#3169).
* Use correct mime types for woff and woff2 (#3228).
* Remove make\_travis\_yml.hs (#3235, Kolen Cheung).
* changelog: Moved an item that was misplaced in the 1.17.2 section to the
1.18 section where it belongs.
* CONTRIBUTING.md: minor change in wording and punctuation (#3252,
Kolen Cheung).
* Further revisions to manual for `--version` changes (#3244).
pandoc (1.18)
* Added `--list-input-formats`, `--list-output-formats`,
`--list-extensions`, `--list-highlight-languages`, and
`--list-highlight-styles` (#3173). Removed list of highlighting
languages from `--version` output. Removed list of input and output
formats from default `--help` output.
* Added `--reference-location=block|section|document` option
(Jesse Rosenthal). This determines whether Markdown link references
and footnotes are placed at the end of the document, the end of the
section, or the end of the top-level block.
* Added `--top-level-division=section|chapter|part` (Albert Krewinkel).
This determines what a level-1 header corresponds to in LaTeX,
ConTeXt, DocBook, and TEI output. The default is `section`.
The `--chapters` option has been deprecated in favor of
`--top-level-division=chapter`.
* Added `LineBlock` constructor for `Block` (Albert Krewinkel). This
is now used in parsing RST and Markdown line blocks, DocBook
`linegroup`/`line` combinations, and Org-mode `VERSE` blocks.
Previously `Para` blocks with hard linebreaks were used. `LineBlock`s
are handled specially in the following ouput formats: AsciiDoc
(as `[verse]` blocks), ConTeXt (`\startlines`/`\endlines`),
HTML (`div` with a style), Markdown (line blocks if `line_blocks`
is enabled), Org-mode (`VERSE` blocks), RST (line blocks). In
other output formats, a paragraph with hard linebreaks is emitted.
* Allow binary formats to be written to stdout (but not to tty) (#2677).
Only works on posix, since we use the unix library to check whether
output is to tty. On Windows, pandoc works as before and always requires
an output file parameter for binary formats.
* Changed JSON output format (Jesse Rosenthal). Previously we used
generically generated JSON, but this was subject to change depending
on the version of aeson pandoc was compiled with. To ensure stability,
we switched to using manually written ToJSON and FromJSON
instances, and encoding the API version. **Note:** pandoc filter
libraries will need to be revised to handle the format change.
Here is a summary of the essential changes:
+ The toplevel JSON format is now `{"pandoc-api-version" :
[MAJ, MIN, REV], "meta" : META, "blocks": BLOCKS}`
instead of `[{"unMeta": META}, [BLOCKS]]`.
Decoding fails if the major and minor version numbers don't
match.
+ Leaf nodes no longer have an empty array for their "c" value.
Thus, for example, a `Space` is encoded as `{"t":"Space"}`
rather than `{"t":"Space","c":[]}` as before.
* Removed `tests/Tests/Arbitrary.hs` and added a `Text.Pandoc.Arbitrary`
module to pandoc-types (Jesse Rosenthal). This makes it easier
to use QuickCheck with pandoc types outside of pandoc itself.
* Add `bracketed_spans` Markdown extension, enabled by default
in pandoc `markdown`. This allows you to create a native span
using this syntax: `[Here is my span]{#id .class key="val"}`.
* Added `angle_brackets_escapable` Markdown extension (#2846).
This is needed because github flavored Markdown has a slightly
different set of escapable symbols than original Markdown;
it includes angle brackets.
* Export `Text.Pandoc.Error` in `Text.Pandoc` [API change].
* Print highlighting-kate version in `--version`.
* `Text.Pandoc.Options`:
+ `Extension` has new constructors `Ext_brackted_spans` and
`Ext_angle_brackets_escapable` [API change].
+ Added `ReferenceLocation` type [API change] (Jesse Rosenthal).
+ Added `writerReferenceLocation` field to `WriterOptions` (Jesse
Rosenthal).
* `--filter`: we now check `$DATADIR/filters` for filters before
looking in the path (#3127, Jesse Rosenthal, thanks to Jakob
Voß for the idea). Filters placed in this directory need not
be executable; if the extension is `.hs`, `.php`, `.pl`, `.js`,
or `.rb`, pandoc will run the right interpreter.
* For `--webtex`, replace deprecated Google Chart API by CodeCogs as
default (Kolen Cheung).
* Removed `raw_tex` extension from `markdown_mmd` defaults (Kolen Cheung).
* Execute .js filters with node (Jakob Voß).
* Textile reader:
+ Support `bc..` extended code blocks (#3037). Also, remove trailing
newline in code blocks (consistently with Markdown reader).
+ Improve table parsing. We now handle cell and row attributes, mostly
by skipping them. However, alignments are now handled properly.
Since in pandoc alignment is per-column, not per-cell, we
try to devine column alignments from cell alignments.
Table captions are also now parsed, and textile indicators
for thead and tfoot no longer cause parse failure. (However,
a row designated as tfoot will just be a regular row in pandoc.)
+ Improve definition list parsing. We now allow multiple terms
(which we concatenate with linebreaks). An exponential parsing
bug (#3020) is also fixed.
+ Disallow empty URL in explicit link (#3036).
* RST reader:
+ Use Div instead of BlockQuote for admonitions (#3031).
The Div has class `admonition` and (if relevant) one of the
following: `attention`, `caution`, `danger`, `error`, `hint`,
`important`, `note`, `tip`, `warning`. **Note:** This will change
the rendering of some RST documents! The word ("Warning", "Attention",
etc.) is no longer added; that must be done with CSS or a filter.
+ A Div is now used for `sidebar` as well.
+ Skip whitespace before note (Jesse Rosenthal, #3163). RST requires a
space before a footnote marker. We discard those spaces so that footnotes
will be adjacent to the text that comes before it. This is in line with
what rst2latex does.
+ Allow empty lines when parsing line blocks (Albert Krewinkel).
* Markdown reader:
+ Allow empty lines when parsing line blocks (Albert Krewinkel).
+ Allow attributes on autolinks (#3183, Daniele D'Orazio).
* LaTeX reader:
+ More robust parsing of unknown environments (#3026).
We no longer fail on things like `^` inside options for tikz.
+ Be more forgiving of non-standard characters, e.g. `^` outside of math.
Some custom environments give these a meaning, so we should try not to
fall over when we encounter them.
+ Drop duplicate `*` in bibtexKeyChars (Albert Krewinkel)
* MediaWiki reader:
+ Fix for unquoted attribute values in mediawiki tables (#3053).
Previously an unquoted attribute value in a table row
could cause parsing problems.
+ Improved treatment of verbatim constructions (#3055).
Previously these yielded strings of alternating Code and Space
elements; we now incorporate the spaces into the Code. Emphasis
etc. is still possible inside these.
+ Properly interpret XML tags in pre environments (#3042). They are meant
to be interpreted as literal text.
* EPUB reader: don't add root path to data: URIs (#3150).
Thanks to @lep for the bug report and patch.
* Org reader (Albert Krewinkel):
+ Preserve indentation of verse lines (#3064). Leading spaces in verse
lines are converted to non-breaking spaces, so indentation is preserved.
+ Ensure image sources are proper links. Image sources as those in plain
images, image links, or figures, must be proper URIs or relative file
paths to be recognized as images. This restriction is now enforced
for all image sources. This also fixes the reader's usage of uncleaned
image sources, leading to `file:` prefixes not being deleted from
figure images. Thanks to @bsag for noticing this bug.
+ Trim verse lines properly (Albert Krewinkel).
+ Extract meta parsing code to module. Parsing of meta-data is well
separable from other block parsing tasks. Moving into new module to
get small files and clearly arranged code.
+ Read markup only for special meta keys. Most meta-keys should be read
as normal string values, only a few are interpreted as marked-up text.
+ Allow multiple, comma-separated authors. Multiple authors can be
specified in the `#+AUTHOR` meta line if they are given as a
comma-separated list.
+ Give precedence to later meta lines. The last meta-line of any given
type is the significant line. Previously the value of the first line
was kept, even if more lines of the same type were encounterd.
+ Read LaTeX_header as header-includes. LaTeX-specific header commands
can be defined in `#+LaTeX_header` lines. They are parsed as
format-specific inlines to ensure that they will only show up in LaTeX
output.
+ Set documentclass meta from LaTeX_class.
+ Set classoption meta from LaTeX_class_options.
+ Read HTML_head as header-includes. HTML-specific head content can be
defined in `#+HTML_head` lines. They are parsed as format-specific
inlines to ensure that they will only show up in HTML output.
+ Respect `author` export option. The `author` option controls whether
the author should be included in the final markup. Setting
`#+OPTIONS: author:nil` will drop the author from the final meta-data
output.
+ Respect `email` export option. The `email` option controls whether the
email meta-field should be included in the final markup. Setting
`#+OPTIONS: email:nil` will drop the email field from the final
meta-data output.
+ Respect `creator` export option. The `creator` option controls whether
the creator meta-field should be included in the final markup. Setting
`#+OPTIONS: creator:nil` will drop the creator field from the final
meta-data output. Org-mode recognizes the special value `comment` for
this field, causing the creator to be included in a comment. This is
difficult to translate to Pandoc internals and is hence interpreted the
same as other truish values (i.e. the meta field is kept if it's
present).
+ Respect unnumbered header property (#3095). Sections the `unnumbered`
property should, as the name implies, be excluded from the automatic
numbering of section provided by some output formats. The Pandoc
convention for this is to add an "unnumbered" class to the header. The
reader treats properties as key-value pairs per default, so a special
case is added to translate the above property to a class instead.
+ Allow figure with empty caption (Albert Krewinkel, #3161).
A `#+CAPTION` attribute before an image is enough to turn an image into
a figure. This wasn't the case because the `parseFromString` function,
which processes the caption value, would fail on empty values. Adding
a newline character to the caption value fixes this.
* Docx reader:
+ Use XML convenience functions (Jesse Rosenthal).
The functions `isElem` and `elemName` (defined in Docx/Util.hs) make
the code a lot cleaner than the original XML.Light functions, but they
had been used inconsistently. This puts them in wherever applicable.
+ Handle anchor spans with content in headers. Previously, we would only
be able to figure out internal links to a header in a docx if the
anchor span was empty. We change that to read the inlines out of the
first anchor span in a header.
+ Let headers use exisiting id. Previously we always generated an id for
headers (since they wouldn't bring one from Docx). Now we let it use an
existing one if possible. This should allow us to recurs through anchor
spans.
+ Use all anchor spans for header ids. Previously we only used the first
anchor span to affect header ids. This allows us to use all the anchor
spans in a header, whether they're nested or not (#3088).
+ Test for nested anchor spans in header. This ensures that anchor spans
in header with content (or with other anchor spans inside) will resolve
to links to a header id properly.
* ODT reader (Hubert Plociniczak)
+ Include list's starting value. Previously the starting value of
the lists' items has been hardcoded to 1. In reality ODT's list
style definition can provide a new starting value in one of its
attributes.
+ Infer caption from the text following the image.
Frame can contain other frames with the text boxes.
+ Add `fig:` to title for Image with a caption (as expected
by pandoc's writers).
+ Basic support for images in ODT documents.
+ Don't duplicate text for anchors (#3143). When creating an anchor
element we were adding its representation as well as the original
content, leading to text duplication.
* DocBook writer:
+ Include an anchor element when a div or span has an id (#3102).
Note that DocBook does not have a class attribute, but at least this
provides an anchor for internal links.
* LaTeX writer:
+ Don't use * for unnumbered paragraph, subparagraph. The starred
variants don't exist. This helps with part of #3058...it gets rid of
the spurious `*`s. But we still have numbers on the 4th and 5th level
headers.
+ Properly escape backticks in verbatim (#3121, Jesse Rosenthal).
Otherwise they can cause unintended ligatures like `` ?` ``.
+ Handle NARRAOW NO-BREAK SPACE into LaTeX (Vaclav Zeman) as `\,`.
+ Don't include `[htbp]` placement for figures (#3103, Václav Haisman).
This allows figure placement defaults to be changed by the user
in the template.
* HTML writer (slide show formats): In slide shows, don't change slide title
to level 1 header (#2221).
* TEI writer: remove heuristic to detect book template (Albert Krewinkel).
TEI doesn't have `` elements but only generic `` division
elements. Checking the template for a trailing ` ` is nonsensical.
* MediaWiki writer: transform filename with underscores in images (#3052).
`foo bar.jpg` becomes `foo_bar.jpg`. This was already done
for internal links, but it also needs to happen for images.
* ICML writer: replace partial function (!!) in table handling (#3175,
Mauro Bieg).
* Man writer: allow section numbers that are not a single digit (#3089).
* AsciiDoc writer: avoid unnecessary use of "unconstrained" emphasis
(#3068). In AsciiDoc, you must use a special form of emphasis
(double `__`) for intraword emphasis. Pandoc was previously using
this more than necessary.
* EPUB writer: use stringify instead of plain writer for metadata
(#3066). This means that underscores won't be used for emphasis,
or CAPS for bold. The metadata fields will just have unadorned
text.
* Docx Writer:
+ Implement user-defined styles (Jesse Rosenthal). Divs and Spans
with a `custom-style` key in the attributes will apply the corresponding
key to the contained blocks or inlines.
+ Add ReaderT env to the docx writer (Jesse Rosenthal).
+ Clean up and streamline RTL behavior (Jesse Rosenthal, #3140).
You can set `dir: rtl` in YAML metadata, or use `-M dir=rtl`
on the command line. For finer-grained control, you can set
the `dir` attribute in Div or Span elements.
* Org writer (Albert Krewinkel):
+ Remove blank line after figure caption. Org-mode only treats an image
as a figure if it is directly preceded by a caption.
+ Ensure blank line after figure. An Org-mode figure should be surrounded
by blank lines. The figure would be recognized regardless, but images
in the following line would unintentionally be treated as figures as
well.
+ Ensure link targets are paths or URLs. Org-mode treats links as
document internal searches unless the link target looks like a URL or
file path, either relative or absolute. This change ensures that this
is always the case.
+ Translate language identifiers. Pandoc and Org-mode use different
programming language identifiers. An additional translation between
those identifiers is added to avoid unexpected behavior. This fixes a
problem where language specific source code would sometimes be output
as example code.
+ Drop space before footnote markers (Albert Krewinkel, #3162).
The writer no longer adds an extra space before footnote markers.
* Markdown writer:
+ Don't emit HTML for tables unless `raw_html` extension is set (#3154).
Emit `[TABLE]` if no suitable table formats are enabled and raw HTML
is disabled.
+ Check for the `raw_html` extension before emiting a raw HTML block.
+ Abstract out note/ref function (Jesse Rosenthal).
+ Add ReaderT monad for environment variables (Jesse Rosenthal).
* HTML, EPUB, slidy, revealjs templates: Use `` instead of `
` for
subtitle, author, date (#3119). Note that, as a result of this change,
authors may need to update CSS.
* revealjs template: Added `notes-server` option
(jgm/pandoc-templates#212, Yoan Blanc).
* Beamer template:
+ Restore whitespace between paragraphs. This was
a regression in the last release (jgm/pandoc-templates#207).
+ Added `themeoptions` variable (Carsten Gips).
+ Added `beamerarticle` variable. This causes the `beamerarticle`
package to be loaded in beamer, to produce an article from beamer
slides. (Carsten Gips)
+ Added support for `fontfamilies` structured variable
(Artem Klevtsov).
+ Added hypersetup options (Jake Zimmerman).
* LaTeX template:
+ Added dummy definition for `\institute`.
This isn't a standard command, and we want to avoid a crash when
`institute` is used with the default template.
+ Define default figure placement (Václav Haisman), since pandoc
no longer includes `[htbp]` for figures. Users with custom templates
will want to add this. See #3103.
+ Use footnote package to fix notes in tables (jgm/pandoc-templates#208,
Václav Haisman).
* Moved template compiling/rendering code to a separate library.
`doctemplates`. This allows the pandoc templating system to be
used independently.
* Text.Pandoc.Error: Fix out of index error in `handleError`
(Matthew Pickering). The fix is to not try to show the exact line when
it would cause an out-of-bounds error as a result of included files.
* Text.Pandoc.Shared: Add `linesToBlock` function (Albert Krewinkel).
* Text.Pandoc.Parsing.emailAddress: tighten up parsing of email
addresses. Technically `**@user` is a valid email address, but if we
allow things like this, we get bad results in markdown flavors
that autolink raw email addresses (see #2940). So we exclude a few
valid email addresses in order to avoid these more common bad cases.
* Text.Pandoc.PDF: Don't crash with nonexistent image (#3100). Instead,
emit the alt text, emphasized. This accords with what the ODT writer
currently does. The user will still get a warning about a nonexistent
image.
* Fix example in API documentation (#3176, Thomas Weißschuh).
* Tell where to get tarball in INSTALL (#3062).
* Rename README to MANUAL.txt and add GitHub-friendly README.md
(Albert Krewinkel, Kolen Cheung).
* Replace COPYING with Markdown version COPYING.md from GNU (Kolen Cheung).
* MANUAL.txt:
+ Put note on structured vars in separate paragraph (#2148, Albert
Krewinkel). Make it clearer that structured author variables require a
custom template
+ Note that `--katex` works best with `html5` (#3077).
+ Fix the LaTeX and EPUB links in manual (Morton Fox).
+ Document `biblio-title` variable.
* Improve spacing of footnotes in `--help` output (Waldir Pimenta).
* Update KaTeX to v0.6.0 (Kolen Cheung).
* Allow latest dependencies.
* Use texmath 0.8.6.6 (#3040).
* Allow http-client 0.4.30, which is the version in stackage lts.
Previously we required 0.5.
Remove CPP conditionals for earlier versions.
* Remove support for GHC < 7.8 (Jesse Rosenthal).
+ Remove Compat.Monoid.
+ Remove an inline monad compatibility macro.
+ Remove Text.Pandoc.Compat.Except.
+ Remove directory compat.
+ Change constraint on mtl.
+ Remove unnecessary CPP condition in UTF8.
+ Bump base lower bound to 4.7.
+ Remove 7.6 build from .travis.yaml.
+ Bump supported ghc version in CONTRIBUTING.md.
+ Add note about GHC version support to INSTALL.
+ Remove GHC 7.6 from list of tested versions (Albert Krewinkel).
+ Remove TagSoup compat.
+ Add EOL note to time compat module. Because time 1.4 is a boot library
for GHC 7.8, we will support the compatibility module as long as we
support 7.8. But we should be clear about when we will no longer need
it.
+ Remove blaze-html CPP conditional.
+ Remove unnecessary CPP in custom Prelude.
pandoc (1.17.2)
* Added Zim Wiki writer, template and tests. `zimwiki` is now
a valid output format. (Alex Ivkin)
* Changed email-obfuscation default to no obfuscation (#2988).
+ `writerEmailObfuscation` in `defaultWriterOptions` is now
`NoObfuscation`.
+ the default for the command-line `--email-obfuscation` option is
now `none`.
* Docbook writer: Declare xlink namespace in Docbook5 output (Ivo Clarysse).
* Org writer:
+ Support arbitrary raw inlines (Albert Krewinkel).
Org mode allows arbitrary raw inlines ("export snippets" in Emacs
parlance) to be included as `@@format:raw foreign format text@@`.
+ Improve Div handling (Albert Krewinkel). Div blocks handling is
changed to make the output look more like idiomatic org mode:
- Div-wrapped content is output as-is if the div's attribute is the
null attribute.
- Div containers with an id but neither classes nor key-value pairs
are unwrapped and the id is added as an anchor.
- Divs with classes associated with greater block elements are
wrapped in a `#+BEGIN`...`#+END` block.
- The old behavior for Divs with more complex attributes is kept.
* HTML writer:
+ Better support for raw LaTeX environments (#2758).
Previously we just passed all raw TeX through when MathJax was used for
HTML math. This passed through too much. With this patch, only raw
LaTeX environments that MathJax can handle get passed through.
This patch also causes raw LaTeX environments to be treated
as math, when possible, with MathML and WebTeX output.
* Markdown writer: use raw HTML for simple, pipe tables with linebreaks
(#2993). Markdown line breaks involve a newline, and simple and pipe
tables can't contain one.
* Make --webtex work with the Markdown writer (#1177).
This is a convenient option for people using
websites whose Markdown flavors don't provide for math.
* Docx writer:
+ Set paragraph to FirstPara after display math (Jesse Rosenthal).
We treat display math like block quotes, and apply FirstParagraph style
to paragraphs that follow them. These can be styled as the user
wishes. (But, when the user is using indentation, this allows for
paragraphs to continue after display math without indentation.)
+ Use actual creation time as doc prop (Jesse Rosenthal).
Previously, we had used the user-supplied date, if available, for Word's
document creation metadata. This could lead to weird results, as in
cases where the user post-dates a document (so the modification might be
prior to the creation). Here we use the actual computer time to set the
document creation.
* LaTeX writer:
+ Don't URI-escape image source (#2825). Usually this is a local file,
and replacing spaces with `%20` ruins things.
+ Allow 'standout' as a beamer frame option (#3007).
`## Slide title {.standout}`.
* RST reader: Fixed links with no explicit link text. The link
`` ``_ `` should have `foo` as both its link text and its URL.
See RST spec at
Closes Debian #828167 -- reported by Christian Heller.
* Textile reader:
+ Fixed attributes (#2984). Attributes can't be followed by
a space. So, `_(class)emph_` but `_(noclass) emph_`.
+ Fixed exponential parsing bug (#3020).
+ Fix overly aggressive interpretation as images (#2998).
Spaces are not allowed in the image URL in textile.
* LaTeX reader:
+ Fix `\cite` so it is a NormalCitation not AuthorInText.
+ Strip off double quotes around image source if present (#2825).
Avoids interpreting these as part of the literal filename.
* Org reader:
+ Add semicolon to list of special chars (Albert Krewinkel)
Semicolons are used as special characters in citations syntax. This
ensures the correct parsing of Pandoc-style citations: `[prefix; @key;
suffix]`. Previously, parsing would have failed unless there was a space
or other special character as the last character.
+ Add support for "Berkeley-style" cites (Albert Krewinkel, #1978).
A specification for an official Org-mode citation syntax was drafted by
Richard Lawrence and enhanced with the help of others on the orgmode
mailing list. Basic support for this citation style is added to the
reader.
+ Support arbitrary raw inlines (Albert Krewinkel).
Org mode allows arbitrary raw inlines ("export snippets" in Emacs
parlance) to be included as `@@format:raw foreign format text@@`.
+ Remove partial functions (Albert Krewinkel, #2991).
Partial functions like `head` lead to avoidable errors and should be
avoided. They are replaced with total functions.
+ Support figure labels (Albert Krewinkel, #2496, #2999).
Figure labels given as `#+LABEL: thelabel` are used as the ID of the
respective image. This allows e.g. the LaTeX to add proper `\label`
markup.
+ Improve tag and properties type safety (Albert Krewinkel).
Specific newtype definitions are used to replace stringly typing of tags
and properties. Type safety is increased while readability is improved.
+ Parse as headlines, convert to blocks (Albert Krewinkel).
Emacs org-mode is based on outline-mode, which treats documents as trees
with headlines are nodes. The reader is refactored to parse into a
similar tree structure. This simplifies transformations acting on
document (sub-)trees.
* Refactor comment tree handling (Albert Krewinkel).
Comment trees were handled after parsing, as pattern matching on lists
is easier than matching on sequences. The new method of reading
documents as trees allows for more elegant subtree removal.
* Support archived trees export options (Albert Krewinkel).
Handling of archived trees can be modified using the `arch` option.
Archived trees are either dropped, exported completely, or collapsed to
include just the header when the `arch` option is nil, non-nil, or
`headline`, respectively.
* Put export setting parser into module (Albert Krewinkel).
Export option parsing is distinct enough from general block parsing to
justify putting it into a separate module.
* Support headline levels export setting (Albert Krewinkel).
The depths of headlines can be modified using the `H` option. Deeper
headlines will be converted to lists.
* Replace ugly code with view pattern (Albert Krewinkel).
Some less-than-smart code required a pragma switching of overlapping
pattern warnings in order to compile seamlessly. Using view patterns
makes the code easier to read and also doesn't require overlapping
pattern checks to be disabled.
* Fix parsing of verbatim inlines (Albert Krewinkel, #3016).
Org rules for allowed characters before or after markup chars were not
checked for verbatim text. This resultet in wrong parsing outcomes of
if the verbatim text contained e.g. space enclosed markup characters as
part of the text (`=is_substr = True=`). Forcing the parser to update
the positions of allowed/forbidden markup border characters fixes this.
* LaTeX template: fix for obscure hyperref/xelatex issue.
Here's a minimal case:
\documentclass[]{article}
\usepackage{hyperref}
\begin{document}
\section{\%á}
\end{document}
Without this change, this fails on the second invocation of xelatex.
This affects inputs this like `# %á` with pdf output via xelatex.
* trypandoc: call results 'html' instead of 'result'.
This is for better compatibility with babelmark2.
* Document MultiMarkdown as input/output format (Albert Krewinkel, #2973).
MultiMarkdown was only mentioned as a supported Markdown dialect but not
as a possible input or output format. A brief mention is added
everywhere the other supported markdown dialects are mentioned.
* Document Org mode as a format containing raw HTML (Albert Krewinkel)
Raw HTML is kept when the output format is Emacs Org mode.
* Implement `RawInline` and `RawBlock` in sample lua custom writer (#2985).
* Text.Pandoc.Shared:
+ Introduce blocksToInlines function (Jesse Rosenthal).
This is a lossy function for converting `[Block] -> [Inline]`. Its main
use, at the moment, is for docx comments, which can contain arbitrary
blocks (except for footnotes), but which will be converted to spans.
This is, at the moment, pretty useless for everything but the basic
`Para` and `Plain` comments. It can be improved, but the docx reader
should probably emit a warning if the comment contains more than this.
+ Add BlockQuote to blocksToInlines (Jesse Rosenthal).
+ Add further formats for `normalizeDate` (Jesse Rosenthal).
We want to avoid illegal dates -- in particular years with greater than
four digits. We attempt to parse series of digits first as `%Y%m%d`, then
`%Y%m`, and finally `%Y`.
+ `normalizeDate` should reject illegal years (Jesse Rosenthal).
We only allow years between 1601 and 9999, inclusive. The ISO 8601
actually says that years are supposed to start with 1583, but MS Word
only allows 1601-9999. This should stop corrupted word files if the date
is out of that range, or is parsed incorrectly.
+ Improve year sanity check in normalizeDate (Jesse Rosenthal).
Previously we parsed a list of dates, took the first one, and then
tested its year range. That meant that if the first one failed, we
returned nothing, regardless of what the others did. Now we test for
sanity before running `msum` over the list of Maybe values. Anything
failing the test will be Nothing, so will not be a candidate.
* Docx reader:
+ Add simple comment functionality. (Jesse Rosenthal).
This adds simple track-changes comment parsing to the docx reader. It is
turned on with `--track-changes=all`. All comments are converted to
inlines, which can list some information. In the future a warning will be
added for comments with formatting that seems like it will be excessively
denatured. Note that comments can extend across blocks. For that reason
there are two spans: `comment-start` and `comment-end`. `comment-start`
will contain the comment. `comment-end` will always be empty. The two
will be associated by a numeric id.
+ Enable warnings in top-level reader (Jesse Rosenthal).
Previously we had only allowed for warnings in the parser. Now we allow
for them in the `Docx.hs` as well. The warnings are simply concatenated.
+ Add warning for advanced comment formatting. (Jesse Rosenthal).
We can't guarantee we'll convert every comment correctly, though we'll
do the best we can. This warns if the comment includes something other
than Para or Plain.
+ Add tests for warnings. (Jesse Rosenthal).
+ Add tests for comments (Jesse Rosenthal).
We test for comments, using all track-changes options. Note that we
should only output comments if `--track-changes=all`. We also test for
emitting warnings if there is complicated formatting.
* README: update to include track-changes comments. (Jesse Rosenthal)
* Improved Windows installer - don't ignore properties set on command-line.
See #2708. Needs testing to see if this resolves the issue.
Thanks to @nkalvi.
* Process markdown extensions on command line in L->R order (#2995).
Previously they were processed, very unintuitively, in R->L
order, so that `markdown-tex_math_dollars+tex_math_dollars`
had `tex_math_dollars` disabled.
* Added `secnumdepth` variable to LaTeX template (#2920).
* Include table of contents in README.html in Windows package.
* Writers: treat SoftBreak as space for stripping (Jesse Rosenthal)
In Writers.Shared, we strip leading and trailing spaces for display
math. Since SoftBreak's are treated as spaces, we should strip those
too.
* beamer, latex templates: pass biblatexoptions directly in package load.
This allows runtime optinos to be used. Fixes jgm/pandoc-citeproc#201
* CPP workaround for deprecation of `parseUrl` in http-client.
* Removed some redundant class constraints.
* make_oxs_package.sh - use OSX env variable.
* Replaced INSTALL with INSTALL.md, incorporating INSTALL and the
old installing page from website.
* Added `winpkg` target to Makefile. This downloads the windows package
from appveyor and signs it using the key.
* Document Org mode as a format containing raw TeX (Albert Krewinkel).
Raw TeX is kept verbatim when the output format is Emacs Org mode.
* Support math with haddock-library >= 1.4.
* Removed `-rtsopts` from library stanza. It has no effect, and Hackage
wouldn't accept the package.
* Update library dependency versions.
pandoc (1.17.1)
* New output format: `docbook5` (Ivo Clarysse).
* `Text.Pandoc.Options`: Add `writerDocBook5` to `WriterOptions`
(API change).
* Org writer:
+ Add :PROPERTIES: drawer support (Albert Krewinkel, #1962).
This allows header attributes to be added to org documents in the form
of `:PROPERTIES:` drawers. All available attributes are stored as
key/value pairs. This reflects the way the org reader handles
`:PROPERTIES:` blocks.
+ Add drawer capability (Carlos Sosa). For the implementation of the
Drawer element in the Org Writer, we make use of a generic Block
container with attributes. The presence of a `drawer` class defines
that the `Div` constructor is a drawer. The first class defines the
drawer name to use. The key-value list in the attributes defines
the keys to add inside the Drawer. Lastly, the list of Block elements
contains miscellaneous blocks elements to add inside of the Drawer.
+ Use `CUSTOM_ID` in properties (Albert Krewinkel). The `ID` property is
reserved for internal use by Org-mode and should not be used.
The `CUSTOM_ID` property is to be used instead, it is converted to the
`ID` property for certain export format.
* LaTeX writer:
+ Ignore `--incremental` unless output format is beamer (#2843).
+ Fix polyglossia to babel env mapping (Mauro Bieg, #2728).
Allow for optional argument in square brackets.
+ Recognize `la-x-classic` as Classical Latin (Andrew Dunning).
This allows one to access the hyphenation patterns in CTAN's
hyph-utf8.
+ Add missing languages from hyph-utf8 (Andrew Dunning).
+ Improve use of `\strut` with `\minipage` inside tables
(Jose Luis Duran). This improves spacing in multiline
tables.
+ Use `{}` around options containing special chars (#2892).
+ Avoid lazy `foldl`.
+ Don't escape underscore in labels (#2921). Previously they were
escaped as `ux5f`.
+ brazilian -> brazil for polyglossia (#2953).
* HTML writer: Ensure mathjax link is added when math appears in footnote
(#2881). Previously if a document only had math in a footnote, the
MathJax link would not be added.
* EPUB writer: set `navpage` variable on nav page.
This allows templates to treat it differently.
* DocBook writer:
+ Use docbook5 if `writerDocbook5` is set (Ivo Clarysse).
+ Properly handle `ulink`/`link` (Ivo Clarysse).
* EPUB reader:
+ Unescape URIs in spine (#2924).
+ EPUB reader: normalise link id (Mauro Bieg).
* Docx Reader:
+ Parse `moveTo` and `moveFrom` (Jesse Rosenthal).
`moveTo` and `moveFrom` are track-changes tags that are used when a
block of text is moved in the document. We now recognize these tags and
treat them the same as `insert` and `delete`, respectively. So,
`--track-changes=accept` will show the moved version, while
`--track-changes=reject` will show the original version.
+ Tests for track-changes moving (Jesse Rosenthal).
* ODT, EPUB, Docx readers: throw `PandocError` on unzip failure
(Jesse Rosenthal) Previously, `readDocx`, `readEPUB`, and `readOdt`
would error out if zip-archive failed. We change the archive extraction
step from `toArchive` to `toArchiveOrFail`, which returns an Either value.
* Markdown, HTML readers: be more forgiving about unescaped `&` in
HTML (#2410). We are now more forgiving about parsing invalid HTML with
unescaped `&` as raw HTML. (Previously any unescaped `&`
would cause pandoc not to recognize the string as raw HTML.)
* Markdown reader:
+ Added bracket syntax for native spans (#168).
+ Fix pandoc title blocks with lines ending in 2 spaces (#2799).
+ Added `-s` to markdown-reader-more test.
* HTML reader: fixed bug in `pClose`. This caused exponential parsing
behavior in documnets with unclosed tags in `dl`, `dd`, `dt`.
* MediaWiki reader: Allow spaces before `!` in MediaWiki table header
(roblabla).
* RST reader: Support `:class:` option for code block in RST reader
(Sidharth Kapur).
* Org reader (all Albert Krewinkel, except where noted otherwise):
+ Stop padding short table rows.
Emacs Org-mode doesn't add any padding to table rows. The first
row (header or first body row) is used to determine the column count,
no other magic is performed.
+ Refactor rows-to-table conversion. This refactors
the codes conversing a list table lines to an org table ADT.
The old code was simplified and is now slightly less ugly.
+ Fix handling of empty table cells, rows (Albert Krewinkel, #2616).
This fixes Org mode parsing of some corner cases regarding empty cells
and rows. Empty cells weren't parsed correctly, e.g. `|||` should be
two empty cells, but would be parsed as a single cell containing a pipe
character. Empty rows where parsed as alignment rows and dropped from
the output.
+ Fix spacing after LaTeX-style symbols.
The org-reader was droping space after unescaped LaTeX-style symbol
commands: `\ForAll \Auml` resulted in `∀Ä` but should give `∀ Ä`
instead. This seems to be because the LaTeX-reader treats the
command-terminating space as part of the command. Dropping the trailing
space from the symbol-command fixes this issue.
+ Print empty table rows. Empty table rows should not
be dropped from the output, so row-height is always set to be at least 1.
+ Move parser state into separate module.
The org reader code has become large and confusing. Extracting smaller
parts into submodules should help to clean things up.
+ Add support for sub/superscript export options.
Org-mode allows to specify export settings via `#+OPTIONS` lines.
Disabling simple sub- and superscripts is one of these export options,
this options is now supported.
+ Support special strings export option Parsing of special strings
(like `...` as ellipsis or `--` as en dash) can be toggled using the `-`
option.
+ Support emphasized text export option. Parsing of emphasized text can
be toggled using the `*` option. This influences parsing of text marked
as emphasized, strong, strikeout, and underline. Parsing of inline math,
code, and verbatim text is not affected by this option.
+ Support smart quotes export option. Reading of smart quotes can be
toggled using the `'` option.
+ Parse but ignore export options. All known export options are parsed
but ignored.
+ Refactor block attribute handling. A parser state attribute was used
to keep track of block attributes defined in meta-lines. Global state
is undesirable, so block attributes are no longer saved as part of the
parser state. Old functions and the respective part of the parser state
are removed.
+ Use custom `anyLine`. Additional state changes need to be made after
a newline is parsed, otherwise markup may not be recognized correctly.
This fixes a bug where markup after certain block-types would not be
recognized.
+ Add support for `ATTR_HTML` attributes (#1906).
Arbitrary key-value pairs can be added to some block types using a
`#+ATTR_HTML` line before the block. Emacs Org-mode only includes these
when exporting to HTML, but since we cannot make this distinction here,
the attributes are always added. The functionality is now supported
for figures.
+ Add `:PROPERTIES:` drawer support (#1877).
Headers can have optional `:PROPERTIES:` drawers associated with them.
These drawers contain key/value pairs like the header's `id`. The
reader adds all listed pairs to the header's attributes; `id` and
`class` attributes are handled specially to match the way `Attr` are
defined. This also changes behavior of how drawers of unknown type
are handled. Instead of including all unknown drawers, those are not
read/exported, thereby matching current Emacs behavior.
+ Use `CUSTOM_ID` in properties. See above on Org writer changes.
+ Respect drawer export setting. The `d` export option can be used
to control which drawers are exported and which are discarded.
Basic support for this option is added here.
+ Ignore leading space in org code blocks (Emanuel Evans, #2862).
Also fix up tab handling for leading whitespace in code blocks.
+ Support new syntax for export blocks. Org-mode version 9
uses a new syntax for export blocks. Instead of `#+BEGIN_`,
where `` is the format of the block's content, the new
format uses `#+BEGIN_export ` instead. Both types are
supported.
+ Refactor `BEGIN...END` block parsing.
+ Fix handling of whitespace in blocks, allowing content to be indented
less then the block header.
+ Support org-ref style citations. The *org-ref* package is an
org-mode extension commonly used to manage citations in org
documents. Basic support for the `cite:citeKey` and
`[[cite:citeKey][prefix text::suffix text]]` syntax is added.
+ Split code into separate modules, making for cleaner code and
better decoupling.
* Added `docbook5` template.
* `--mathjax` improvements:
+ Use new CommonHTML output for MathJax (updated default MathJax URL,
#2858).
+ Change default mathjax setup to use `TeX-AMS_CHTML` configuration.
This is designed for cases where the input is always TeX and maximal
conformity with TeX is desired. It seems to be smaller and load faster
than what we used before. See #2858.
+ Load the full MathJax config to maximize loading speed (KolenCheung).
* Bumped upper version bounds to allow use of latest packages
and compilation with ghc 8.
* Require texmath 0.8.6.2. Closes several texmath-related bugs (#2775,
#2310, #2310, #2824). This fixes behavior of roots, e.g.
`\sqrt[3]{x}`, and issues with sub/superscript positioning
and matrix column alignment in docx.
* README:
+ Clarified documentation of `implicit_header_references` (#2904).
+ Improved documentation of `--columns` option.
* Added appveyor setup, with artefacts (Jan Schulz).
* stack.yaml versions: Use proper flags used for texmath, pandoc-citeproc.
* LaTeX template: support for custom font families (vladipus).
Needed for correct polyglossia operation with Cyrillic fonts and perhaps
can find some other usages. Example usage in YAML metadata:
fontfamilies:
- name: \cyrillicfont
font: Liberation Serif
- name: \cyrillicfonttt
options: Scale=MatchLowercase
font: Liberation
* Create unsigned msi as build artifact in appveyor build.
* On travis, test with ghc 8.0.1; drop testing for ghc 7.4.1.
pandoc (1.17.0.3)
* LaTeX writer: Fixed position of label in figures (#2813).
Previously the label wasn't in the right place, and `\ref`
wouldn't work properly.
* Added .tei test files to pandoc.cabal so they'll be included
in tarball (#2811).
* Updated copyright dates.
pandoc (1.17.0.2)
* Fixed serious regression in `htmlInBalanced`, which caused
newlines to be omitted in some raw HTML blocks in Markdown
(#2804).
pandoc (1.17.0.1)
* File scope is no longer used when there are no input files (i.e.,
when input comes from stdin). Previously file scope was triggered
when the `json` reader was specified and input came from `stdin`,
and this caused no output to be produced. (Fix due to Jesse Rosenthal;
thanks to Fedor Sheremetyev for calling the bug to our attention.)
* Improved documentation of templates (#2797).
pandoc (1.17)
* Added `--file-scope` option (Jesse Rosenthal).
By default pandoc operates on multiple files by first concatenating
them (around extra line breaks) and then processing the joined file. So
it only parses a multi-file document at the document scope. This has the
benefit that footnotes and links can be in different files, but for
some purposes it is useful to parse the individual files first
and then combine their outputs (e.g. when the files use footnotes
or links with the same labels). The `--file-scope` option causes
pandoc to parse the files first, and then combine the parsed output,
instead of combining before parsing. `--file-scope` is selected
automatically for binary input files (which cannot be concatenated)
and for pandoc json.
* Add TEI Writer (Chris Forster) and `tei` output format.
* Added a general `ByteStringReader` with warnings, used by the docx
reader (API change, Jesse Rosenthal).
* Add `readDocxWithWarnings` (API change, Jesse Rosenthal).
* Changed type of `Shared.uniqueIdent`'s argument from `[String]`
to `Set String.` This avoids performance problems in documents with
many identically named headers (API change, #2671).
* Removed `tex_math_single_backslash` from `markdown_github` options
(#2707).
* Make language extensions as well as full language names
trigger syntax highlighting. For example, `py` will now work as
well as `python` (jgm/highlighting-kate#83).
* Added `institute` variable to latex, beamer templates (Fraser
Tweedale, Josef Svenningsson).
* Docx reader (Jesse Rosenthal):
+ Handle alternate content. Some word functions (especially graphics)
give various choices for content so there can be backwards compatibility.
+ Don't turn numbered headers into lists.
+ Docx Reader: Add state to the parser, for warnings
+ Update feature checklist in source code.
+ Get rid of `Modifiable` typeclass.
+ Add tests for adjacent hyperlinks.
+ Add a "Link" modifier to `Reducible`. We want to make sure that
links have their spaces removed, and are appropriately smushed
together (#2689).
* HTML reader:
+ Fixed behavior of base tag (#2777).
If the base path does not end with slash, the last component
will be replaced. E.g. base = `http://example.com/foo`
combines with `bar.html` to give `http://example.com/bar.html`.
If the href begins with a slash, the whole path of the base
is replaced. E.g. base = `http://example.com/foo/` combines
with `/bar.html` to give `http://example.com/bar.html`.
+ Rewrote `htmlInBalanced`. This version avoids an exponential
performance problem with ` in a comment or string.
+ More lenient non-quoted attribute values.
Now we accept anything but a space character, quote, or <>.
This helps in parsing e.g. www.google.com!
+ Bare & signs are now parsed as a string. This is a common
HTML mistake.
+ Skip a bare < in malformed HTML.
* Removed html2markdown and hsmarkdown.
+ html2markdown is no longer needed, since you can now pass URI
arguments to pandoc and directly convert web pages. (Note,
however, that pandoc assumes the pages are UTF8. html2markdown
made an attempt to guess the encoding and convert them.)
+ hsmarkdown is pointless -- a large executable that could be
replaced by 'pandoc --strict'.
* In most writers, an image in a paragraph by itself is now rendered
as a figure, with the alt text as the caption. (Texinfo, HTML, RST,
MediaWiki, Docbook, LaTeX, ConTeXt, HTML.) Other images are
rendered inline.
* Depend on extensible-exceptions. This allows pandoc to be compiled
on GHC 6.8.
* Added --base-header-level option. For example, --base-header-level=2
will change level 1 headers to level 2, level 2 to level 3, etc.
Closes Debian #563416.
* Incomplete support for RST tables (simple and grid).
Thanks to Eric Kow. Colspans and rowspans not yet supported.
* Added accessors (docTitle, docAuthors, docDate) to Meta type.
* MediaWiki writer: format links with relative URLs as wikilinks.
The new rule: If the link target is an absolute URL, an external
link is created. Otherwise, a wikilink is created.
* Text.Pandoc.Shared: Export uniqueIdent, and don't allow tilde in
identifier. Note: This may break links to sections that involve
tildes.
* Markdown(+lhs) reader: handle "inverse bird tracks."
Inverse bird tracks (<) are used for haskell example code that is not
part of the literate Haskell program. Resolves Issue #211.
* LaTeX reader:
+ Recognize '\ ' (interword space).
+ Recognize nonbreaking space '~'.
+ Ignore \section, \pdfannot, \pdfstringdef. Ignore alt title in
section headers. Don't treat \section as inline LaTeX.
Resolves Issue #202.
+ LaTeX reader: allow any special character to be escaped.
Resolves Issue #221.
+ LaTeX reader: treat \paragraph and \subparagraph as level 4, 5
headers. Resolves Issue #207.
* Use template variables for include-before/after.
+ These options now imply -s; previously they worked also in fragment
mode.
+ Users can now adjust position of include-before and include-after
text in the templates.
+ Default position of include-before moved back (as it was before 1.4)
before table of contents.
+ Resolves Issue #217.
* Don't print an empty table header: (all writers).
Resolves Issue #210.
* HTML, Docbook writer: Use tbody, thead, and cols in tables.
* HTML writer: Don't include TOC div if table of contents is empty.
* Markdown writer: Fixed citations.
Previously the markdown writer printed raw citation codes, e.g.
[geach1970], rather than the expanded citations provided by
citeproc, e.g. (Geach 1970). Now it prints the expanded citations.
This means that the document produced can be processed as a markdown
document without citeproc. Thanks to dsanson for reporting, and
Andrea Rossato for the patch.
* Improved and simplified title block in context template.
Previously it caused an error if there was no title.
This method should also be easier for users to customize.
* Markdown reader:
+ Treat p., pp., sec., ch., as abbreviations in smart mode.
+ Disallow blank lines in inline code span.
+ Allow footnotes to be indented < 4 spaces.
This fixes a regression. A test case has been added.
+ Escape spaces in URLs as %20. Previously they were incorrectly
escaped as +, which is appropriate only for the query part of
a URL. Resolves Issue #220.
+ Require two spaces after capital letter + period for list item.
Otherwise "E. coli" starts a list. This might change the semantics
of some existing documents, since previously the two-space
requirement was only enforced when the second word started
with a capital letter. But it is consistent with the existing
documentation and follows the principle of least surprise.
Resolves Issue #212.
* LaTeX template: redefine labelwidth when using enumerate package.
Otherwise the list labels (numbers) often extend past the left
margin, which looks bad.
* Mediawiki writer: Don't print a "== Notes ==" header before
references. This is too English-centric. Writers can provide their
own header at the end of the document.
* Promoted mediawiki headers. '= head =' is now level 1, '== head =='
level 2, etc. This seems to be correct; it's only by convention
that wikipedia articles have level 2 headers at most.
Patch due to Eric Kow.
* RunTests.hs: Set LANG to a UTF-8 locale. Use 'pandoc --data-dir=' so
data files don't need to have been installed. This removes the need to
set HOME.
* HTML reader:
+ Handle spaces before . Resolves Issue #216.
+ Be forgiving in parsing a bare list within a list.
The following is not valid xhtml, but the intent is clear:
one
sub
two
We'll treat the as if it's in a . Resolves Issue #215.
* Updated INSTALL instructions. cabal method is now promoted.
* Updated markdown2pdf man page. It no longer says all pandoc options
are accepted.
* README/man pages: Removed advice to pipe through tidy before HTML
reader. This is obsolete, now that we have a forgiving HTML parser.
* LaTeX writer: set numbersections template variable, so
the section numbering options work again.
* Removed obsolete Makefile.
* Website: renamed index.txt.in -> index.txt.
* New batch file to make-windows-installer.
+ Removed old Makefile.windows
+ Added make-windows-installer.bat
+ Modified default installer name in pandoc-setup.iss
* Removed freebsd and macports directories.
They are no longer up to date.
* Setup.hs:
+ Made man page building sensitive to build verbosity.
+ Improved detection of highlighting support in test hook.
+ Install wrapper scripts into cabal bin directory.
+ Also simplified installManpages.
+ Setup.hs: install manpages to mandir. Code borrowed from darcs.
* Changed default of writerXeTeX to False.
* HTML writer: don't include empty UL if --toc but no sections.
Resolves Issue #199.
* LaTeX writer:
+ If book, report, or memoir documentclass, use \chapter{}
for first-level headers. Otherwise use \section{}.
+ Removed stLink, link template variable. Reason: we now always
include hyperref in the template.
* LaTeX template:
+ Only show \author if there are some.
+ Always include hyperref package. It is used not just for links but
for toc, section heading bookmarks, footnotes, etc. Also added
unicode=true on hyperref options.
* markdown2pdf: always do at least two runs. hyperref bookmarks
require this.
* cabal file: Removed unneeded dependency on template-haskell.
* Windows installer - fixed bug in data file locations.
Resolves Issue #197.
* Deprecated --custom-header in documentation.
Removed old "Custom Headers" section in README.
pandoc (1.4)
[ John MacFarlane ]
* Pandoc will now compile with either GHC 6.10 or 6.12.
+ Don't use System.IO.UTF8 when compiling with 6.12
+ Use -fno-warn-unused-do-bind option when compiling with 6.12
* Replaced old headers with templates. Now users have much more
control over the way documents appear in --standalone mode,
and writer code is simplified. Resolves Issues #59, 147.
Every effort has been made to retain backwards compatibilty.
So, the --custom-header option should still work as before.
+ Added Text.Pandoc.Templates. This provides functions for
retrieving default templates and for rendering templates.
+ System templates (in the pandoc data directory) can be
overridden by user templates in $HOME/.pandoc/templates.
+ Removed Text.Pandoc.DefaultHeaders.
+ Removed data/headers directory.
+ Added templates directory.
+ Added writerTemplate and writerVariables fields to WriterOptions.
+ Removed writerTitlePrefix, writerHeader fields from WriterOptions.
+ Changed --print-default-header to --print-default-template.
+ Added --template option.
+ Added -V/--variable option to set custom template variables.
* Pandoc no longer requires Template Haskell. Resolves Issue #186.
+ Removed need for TH in ODT module. Instead get reference.odt from
data file at run time.
+ Removed TH dependency from S5 module. S5 module now exports
s5HeaderIncludes, which pandoc.hs includes if writer is s5 and
standalone.
+ Refactored LaTeXMathML not to use TH.
* Meta is now Meta [Inline] [[Inline]] [Inline] rather than
Meta [Inline] [String] String. Authors and date in Meta are now lists
of Inline elements rather than raw strings. This means that they can
be formatted and can include footnotes. NOTE: This may be a breaking
change for those using pandoc as a library.
* Added readDataFile to Text.Pandoc.Shared. This retrieves
a data file from the user pandoc data directory (~/.pandoc
on unix), or, if not found there, from the system data
directory ($CABALDIR/shared/pandoc-VERSION/). All data
files, including templates, LaTeXMathML.js, s5 styles,
and reference.odt, can be overridden by the user.
* s5 files moved from data/ui/default to s5/default.
* Use unicode instead of entities in HTML and XML output. Resolves
Issue #163.
* Prettier HTML footnote references: put anchor inside sup,
instead of other way. Resolves Issue #191. Thanks to
infinity0x.
* Added --xetex option to pandoc and markdown2pdf.
If --xetex is specified, pandoc produces latex suitable for
processing by xelatex, and markdown2pdf uses xelatex to create
the PDF. Resolves Issue #185.
* RTF writer: multiple authors now occupy multiple paragraphs rather
than using a line break.
* Man writer: now the "--after-body" will come after the "AUTHORS"
section, whereas before it would come before it. This is a
slight break from backwards compatibility.
* Added --reference-odt option, so users may customize the styles
used in pandoc-generated ODT files. Users may also place a
default reference.odt in the ~\.pandoc directory.
* ODT writer:
+ Indented and line-broke styles.xml so it can be modified more easily.
+ Omitted some unnecessary style declarations.
+ Don't wrap text in OpenDocument writer. The tags are too long, making
wrapping ugly and pointless.
* LaTeX reader: use \\ to separate multiple authors.
* Markdown reader: use ; as separator between authors.
This allows you to use ',' within author names: e.g. "John Jones, Jr."
* S5 writer: use linebreak to separate authors in title page.
* RST reader: Allow :: before lhs code block. The RST spec requires the
:: before verbatim blocks. This :: should not be treated as literal
colons. Resolves Issue #189.
* Documented pandoc 1.3's new definition list syntax in README.
(An oversight in the last release.)
* markdown2pdf.hs:
+ interpret ! in a log as an error line.
+ --toc now works properly.
* Changes in RunTests.hs:
+ Use the Diff library rather than a local copy of Diff.hs.
(This vastly increases performance.) This change means that 'cabal
test' presupposes that the Diff library is installed.
+ Removed tests/Diff.hs from cabal file.
+ Changed RunTests to use local environment. We need at least HOME, so
pandoc can find its data directory.
* Updated windows installer to install data files in the app directory.
* Windows installer now installs portable wrappers hsmarkdown and
markdown2pdf.
pandoc (1.3)
[ John MacFarlane ]
* Added --id-prefix option (Issue #41). This adds a prefix to all
automatically generated HTML identifiers, which helps prevent
duplicate identifiers when you're generating a fragment (say a blog
post).
* Added --indented-code-classes option. This specifies classes
to use for indented code blocks. (Patch due to buttock; Issue #87.)
* --number-sections now affects HTML output as well as ConTeXt and LaTeX
(Issue #150).
* Improved syntax for markdown definition lists (Issue #24).
Definition lists are now more compatible with PHP Markdown Extra.
+ You can have multiple definitions for a term (but still not
multiple terms).
+ Multi-block definitions no longer need a column before each block
(indeed, this will now cause multiple definitions).
+ The marker no longer needs to be flush with the left margin,
but can be indented at or two spaces. Also, ~ as well as :
can be used as the marker (this suggestion due to David
Wheeler.)
+ There can now be a blank line between the term and the
definitions.
* Better looking simple tables. Resolves Issue #180.
+ Markdown reader: simple tables are now given column widths of 0.
+ Column width of 0 is interpreted as meaning: use default column width.
+ Writers now include explicit column width information only
for multiline tables. (Exception: RTF writer, which requires
column widths. In this case, columns are given equal widths,
adding up to the text width.)
+ Simple tables should now look better in most output formats.
* Allow markdown tables without headers (Issue #50).
The new syntax is described in README. Also allow optional line of
dashes at bottom of simple tables.
* Compensate for width of final table column (Issue #144).
* Treat a backslash followed by a newline as a hard line break
in markdown. Resolves Issue #154. This is a nice alternative
to markdown's "invisible" way of indicating hardline breaks
using lines that end with two spaces.
* Improved performance of markdown reader by ~10% by eliminating the
need for a separate parsing pass for notes. Raw notes are now stored
on the first pass (which parses references), then parsed when the
note is inserted into the AST. The stateNotes field in ParserState
is now a list of [(String, String)] pairs instead of [(String,
[Block])].
* In markdown reader, treat 4 or more * or _ in a row as literal
text. (Trying to parse long strings of * or _ as strong or emph
leads to exponential performance problems.)
* Markdown reader: Use + rather than %20 for spaces in URLs.
* Fixed htmlComment parser, adding a needed 'try'.
* Don't print raw HTML in man output.
* Allow . _ and ~ in header identifiers.
* Specially mark code blocks that were "literate" in the input.
They can then be treated differently in the writers. This allows
authors to distinguish bits of the literate program they are writing
from source code examples, even if the examples are marked as
Haskell for highlighting. (Issue #174.)
* Modified html+lhs output to use "haskell" highlighter instead
of "literateHaskell". The highlighting module now adds bird tracks
after highlighting (for HTML output), if the code block has the
"literate" class. This gives better results, because kate's
haskell highlighter is much better than the literateHaskell
highlighter.
* Fixed handling of footnotes in titles (HTML) and headers (LaTeX).
(Issue #137.)
* Support for "..code-block" directive in RST reader. Not core
RST, but used in Sphinx for code blocks annotated with syntax
information. Thanks to Luke Plant for the patch.
* Added "head" to list of block-level HTML tags. Resolves
Issue #108.
* Added stripTags to Text.Pandoc.XML. This is used in the HTML writer.
* Set utf-8 encoding in texinfo headers.
* Docbook writer: add ids to sections. Use link for internal links.
(Issue #60.)
* Blank lines after lists in MediaWiki writer.
* Properly handle commented-out list items in markdown.
Resolves Issue #142. Example:
- a
- c
* Changed heuristic in compactify. compactify has to decide whether a
Para that ends a list is a Para intentionally, or just because of
the blank lines at the end of every list. In the latter case the
Para is turned to a Plain. The old heuristic was: change final Para
to Plain iff the other items all end in Plain. This produces bad
results when, for example, an item contains just a Plain and an HTML
comment, as it does in the list above. The new heuristic: change
final Para to Plain iff the other items don't contain a Para.
* Added % as an rst underline character. Resolves Issue #173.
* Fix inline math parser so that \$ is allowed in math.
Resolves Issue #169.
* Translate \int (integral) into unicode when using unicode math
method. Resolves Issue #177.
* markdown2pdf.hs improvements:
+ Use System.IO.UTF8.
+ Print error messages on last attempt.
+ Do not create a backup when overwriting a PDF (Issue #166).
+ Accept --longopt=val options.
+ Added man/man1/markdown2pdf.1 to extra-tmp-files in cabal, so that
it is properly cleaned.
* Added haddock comments warning that readers assume \n line endings.
* Updated COPYRIGHT file.
* Makefile: Changed EXECSBASE so it doesn't pull in hsmarkdown &
markdown2pdf. Otherwise strip tries to strip shell scripts when you
install using 'make'.
* Changed Makefile so it doesn't build Haskell wrappers.
* Fixed Makefile so it doesn't try to build man pages in build-doc.
* Install pcre3.dll in Windows install script; this allows us to
package a version of pandoc with highlighting support.
pandoc (1.2.1)
[ John MacFarlane ]
* Fixed regression with --preserveTabs. Brought back optPreserveTabs.
The trick of setting tabStop to 0 to mean "preserve tabs" had a bad
side effect: strings of 0 spaces were interpreted as indentation.
So, with --preserve-tabs, unindented paragraphs were treated as
code. Resolves Issue #138.
* HTML writer: wrap sections in divs. Resolves Issue #70.
+ hierarchicalize has been rationalized; it builds a hierarchical
representation of the document from the headers, and simultaneously
gives each section a unique identifier based on the heading title.
+ Identifiers are now attached to the divs rather than
to the headers themselves.
+ Table of content backlinks go to the beginning of the table, rather
than to the section reference that was clicked.
+ Code for constructing identifiers has been moved to Text.Pandoc.Shared
from the HTML writer, since it is now consumed only by
hierarchicalize.
+ In --strict mode, pandoc just prints bare headings, as before
(unless --toc has been specified).
+ In s5 output, it does not wrap sections in divs, as that seems to
confuse the s5 javascript.
* Man writer: break lines at end of each sentence. groff expects this
and treats '.' and '?' differently when followed by line ending as
opposed to ordinary space. Also, don't escape periods. Instead, use
zero-width character \& to avoid unwanted interpretation of periods
at start of line. Resolves Issue #148.
* Markdown writer: Added '#' and '>' to list of characters to be
escaped in markdown output. Removed '<', as it is not an officially
escapable character. This partially resolves Issue #96.
* Make --smart the default for man output format. Otherwise we have
trouble dividing lists of endlines into sentences.
* DocBook writer: Use language attribute to indicate source language
in code blocks.
* RST reader:
+ Allow # to continue list, even if the list was started with an
explicit marker. For example:
A. my list
#. continued
Resolves Issue #140.
+ Allow continuation lines in line blocks. Also added test cases for
line blocks for RST reader. Resolves Issue #149.
+ Allow explicit links with spaces in URL: `link `_
* Improved LaTeX reader's coverage of math modes. Remove displaymath*
(which is not in LaTeX) and recognize all the amsmath environments
that are alternatives to eqnarray, namely equation, equation*,
gather, gather*, gathered, multline, multline*, align, align*,
alignat, alignat*, aligned, alignedat, split. Resolves Issue #103.
Thanks to shreevatsa.public for the patch.
* Markdown reader:
+ Allow -, _, :, . in markdown attribute names. These are legal in
XML attribute names.
+ Use non-breaking spaces in abbreviations.
+ Markdown reader: improved efficiency of abbreviation parsing.
Instead of a separate abbrev parser, we just check for
abbreviations each time we parse a string. This gives a huge
performance boost with -S. Resolves Issue #141.
* Improved efficiency of shared parsers: hexNum, htmlComment,
whitespace, indentSpaces.
* Export HTMLMathMethod in Text.Pandoc.
* Export languagesByExtension in Text.Pandoc.Highlighting.
* Added new Haskell version of markdown2pdf, due to
Paulo Tanimoto. This should be more portable than the old
shell script.
* Made 'pandoc -v' more explicit about compiler options.
Resolves Issue #139.
* pandoc.hs: Made --strict compatible with --standalone, --toc.
* Use Paths_pandoc to get version number, instead of hard-coding it
into Text/Pandoc.hs.
pandoc (1.2)
[ John MacFarlane ]
* Added support for literate Haskell. lhs support is triggered by
'+lhs' suffixes in formats. For example, 'latex+lhs' is literate
Haskell LaTeX. '.lhs' files are treated by default as literate
markdown.
+ Added stateLiterateHaskell to parser state.
+ Added parser for lhsCodeBlock to Markdown, RST, LaTeX readers.
+ Added parser for |inline lhs| to LaTeX reader.
+ Added writerLiterateHaskell to WriterOptions.
+ Added lhs support to Markdown, RST, LaTeX, HTML writers.
+ Added definition of code environment to LaTeX header.
+ Added tests (run only if highlighting support compiled in).
+ Documented lhs features in man page and README.
* In Text.Pandoc.Definition, added processWith, processWithM,
and queryWith, and deprecated processPandoc and queryPandoc
for these more general functions.
* Fixed bug in mediawiki writer: improper closing tags in tables.
Thanks to Benct Philip Jonsson for reporting the bug.
* Added --email-obfuscation option.
+ Added writer option for email obfuscation.
+ Implemented email obfuscation options in HTML writer.
+ Added option to option parser.
+ Documented in README and pandoc man page.
+ Resolves Issue #97.
* LaTeX writer: fixed bug with empty table cells.
Resolves Issue #107. Thanks to rodja.trappe for the patch.
* Fixed bug with header spacing in Markdown and RST writers.
A null header (Meta [] [] []) should not cause a blank line
at the beginning of output. But a blank line is needed between
a non-null header and the main text.
* Markdown reader: Relax spacing rules for $$ in display math. Now
space and newlines are allowed after the opening $$ and before the
closing $$. However, the display math cannot contain an entirely
blank line. Resolves Issue #105.
* Markdown reader: Gobble space after Plain blocks containing only
raw html inline. Otherwise following header blocks are not parsed
correctly, since the parser sees blank space before them. Resolves
Issue #124.
* Markdown reader: Allow " as well as '' to end a latex double-quote.
* Conditionally depend on syb and base >= 4 if ghc >= 6.10.
Resolves Issue #109.
* Fixed problems in RST and markdown output due to bug in pretty-1.0.1.0
+ Added hang' function to Text.Pandoc.Shared; this will be used instead
of hang, which doesn't work properly in pretty-1.0.1.0. When pretty
is upgraded, we can go back to hang.
See http://article.gmane.org/gmane.comp.lang.haskell.general/16687
+ Use hang' (and some different techniques) in RST and markdown writers.
Some output is now a bit different.
* Brought citeproc support up to date for citeproc-hs-0.2.
(Patch by Andrea Rossato.)
* Moved all haskell source to src subdirectory. Renamed Main.hs to
pandoc.hs.
* Rewrote hsmarkdown in Haskell for portability (src/hsmarkdown.hs).
For now, keeping the old shell script too.
* Added TemplateHaskell to Extensions for executable, removed
-threaded for library. Thanks to duncan.coutts for the bug report.
Resolves Issue #121.
* Moved some Extra-Source-Files to Data-Files.
* Moved tabFilter to Shared.
* In pandoc.hs, removed optPreserveTabs; instead, tabstop of 0 means
preserve tabs.
* Minor code cleanup based on hlint suggestions.
pandoc (1.1)
[ John MacFarlane ]
* Main.hs:
+ Changed date on copyright message in Main.hs.
+ Have the '-v' option print syntax highlighting languages
separated by commas, and wrapped in lines, instead of in five
columns as before.
* Added --jsmath option. Resolves Issue #68.
+ Added --jsmath option to Main.hs
+ Added JsMath to HTMLMathMethod in Text.Pandoc.Shared.
+ Handle math appropriately in HTML writer when JsMath selected.
+ Documented the option in README and man page.
* Text.Pandoc.Shared: Changed compactify to use a better heuristic
for tight and loose lists. Final Para is changed to Plain if all
other list items *end* with a Plain block. Addresses Issue #99.
* HTML reader:
+ Added colons to protocols in unsanitaryURI. Closes Issue #88.
+ HTML reader: Don't interpret contents of blocks as markdown.
Added rawVerbatimBlock parser. Resolves Issue #94.
* Markdown reader:
+ Allow URLs with spaces in them in links and references, but escape
them as "%20".
+ Allow blank space at the end of horizontal rules.
* RST reader: Modified 'unknownDirective' parser to handle comment
blocks correctly, and added tests for comment blocks. Resolves Issue
#86. Closes Debian Bug #500662.
* HTML writer:
+ Include classes on tr elements in HTML output:
"header", "odd", "even". This allows tables to be styled with
lines in alternating colors. Resolves Issue #91.
+ Enclose all LaTeXMathML bits in .
This prevents parts of the document that are not math from being
interpreted as math by LaTeXMathML.js.
* OpenDocument and ODT writers: Added support for HorizontalRule elements,
which were formerly ignored. Resolves Issue #95.
* Text.Pandoc.Shared: Modified wrappedTeX to eliminate the line break
between a footnote and immediately following nonspace characters in
LaTeX and ConTeXt output. (This gets interpreted as a space, which
is not desired in cases like `text^[note]---`.) Resolves Issue #93.
* Windows installer: Don't require admin privileges to run
installer. Modified pandoc-setup.iss, and changed modpath.iss to
modify HKCU path if user lacks admin privileges. Also fixed case
where oldpath is empty (previously this led to the new path
beginning with a semicolon).
* Updated INSTALL instructions for Arch packages and OS X install using
cabal-install.
* Removed the (now unneeded) debian directory.
Removed empty Codec and System directories.
* Moved odt-styles/ to data/. Removed unneeded variable in Makefile.
* Modified Setup.hs so that the "test" target returns an error status
when tests fail, and "build" returns a success status if
the build succeeds. Resolves Issue #100.
* Added BUGS to files in tarball.
pandoc (1.0.0.1)
[ John MacFarlane ]
* Removed spurious reference to pdf output format from pandoc(1) man page.
pandoc (1.0)
[ Andrea Rossato ]
* Added new OpenDocument writer.
* Added support for SmallCaps inline element.
* Added support for integrating pandoc with citeproc-hs.
+ Added Cite element to definition and writers.
+ Added Text.Pandoc.Biblio module
+ Note: This support is included only if the 'citeproc'
Cabal configuration flag is set.
* Made Pandoc data structure an instance of Typeable.
Added new processPandoc and queryPandoc functions, to query
or transform matching elements in a Pandoc structure.
[ Peter Wang ]
* Added new Texinfo writer.
[ John MacFarlane ]
* Changes to Texinfo writer:
+ No space between paragraph and following @verbatim (provides more
pleasing appearance in text formats)
+ Blank line consistently after list environments.
+ Removed deVerb.
+ Use @code instead of @verb for inline code (this solves the character
escaping problem for texi2dvi and texi2pdf).
+ Added news of Texinfo writer to README.
+ Added Texinfo to list of formats in man page, and removed extra 'groff'.
+ Added texi & texinfo extensions to Main.hs, and fixed bug in determining
default output extension.
+ Modified disallowedInNode in Texinfo writer to correct list of disallowed characters.
* Added tests for OpenDocument writer.
* Added ODT writer (using zip-archive library to package output of
OpenDocument writer). Added odt-styles directory with default ODT styles.
* Added new mediawiki writer and tests.
* Markdown reader: Added support for delimited code blocks, with optional
syntax highlighting using highlighting-kate (if the 'highlighting'
configuration option is selected).
+ Currently highlighting is supported only in the HTML writer.
+ Delimited code blocks can have attributes; using the language name as
class triggers highlighting.
+ New Attributes parameter in CodeBlock structure.
+ --version now indicates whether syntax highlighting support is compiled
in, and prints a list of supported languages
* Removed debian directory. Pandoc is no longer a native debian package.
* Changes to build process: pandoc can now be built from the repository
using Cabal. No unix tools are needed (so, pandoc can be built on Windows
without Cygwin).
+ Include shell scripts themselves in repo, rather than generating from wrappers.
Removed wrappers directory and wrappers Makefile target.
+ Text/Pandoc/ASCIIMathML.hs, Text/Pandoc/DefaultHeaders.hs,
and Text/Pandoc/Writers/S5.hs are no longer built in Makefile
from templates in the templates/ directory. Instead, they use template
haskell to read data at compile time from the relevant files in data/.
Template haskell functions go in a new module, Text.Pandoc.TH.
+ man pages are now generated in Setup.hs hook, not by Makefile
+ Makefile 'tarball' target now calls Cabal's 'sdist'
+ Added "Extra-Source-Files" to pandoc.cabal, so sdist contains everything needed
+ Added "Build-Type" field to pandoc.cabal to avoid warning.
+ Added to "Extra-source-files" and "Extra-tmp-files" in pandoc.cabal,
so 'sdist' and 'clean' will work properly.
+ Setup.hs now generates man pages in a postbuild hook.
+ Added dependency-checking to Setup.hs, so it only rebuilds things
that need rebuilding.
+ Added 'library' and 'executable' configuration flags.
Cabal can now be told to build just the library or just the executable.
+ CABALOPTS may now be specified with 'make' to pass Cabal configuration flags.
For example: CABALOPTS=-fhighlighting make
* Rewrote test suite so it doesn't depend on perl or unix tools.
+ Replaced old runtests.pl with a Haskell script RunTests.hs.
+ Added Diff.hs module to be used by RunTests.hs instead of unix 'diff'.
+ Added test hook to Setup.hs, so tests may be run from cabal.
+ Changed Makefile's 'test' target to run tests via cabal.
+ Removed old generate.sh.
+ Since we no longer have 'sed' to filter out raw HTML sections
from the docbook writer test, or raw LaTeX sections from the
context writer test, we now just include these sections.
They can be taken out if it is necessary to process the files.
+ Updated latex and context writer tests to remove extra spaces
after '\\item'
+ Added a markdown table reader test.
+ Added markdown-reader-more.txt to test suite, for additional test cases
for raw ConTeXt environments and more.
* Compatibility fixes for CPP, Cabal, and haddock:
+ Use CPP in "Extensions" field in pandoc.cabal.
+ Removed use of backslash string continuations in source files.
* Removed pandoc.cabal.ghc66. We now require Cabal >= 1.2, GHC >= 6.8,
base >= 3.
* Require parsec < 3.
The compatibility module in parsec 3.0.0 gives far worse performance than
parsec 2.1. Eventually pandoc will be upgraded to use the new bytestring
version of parsec, and then we'll go to parsec 3.0.0.
* Removed Text.Regex dependencies by rewriting using plain Haskell
(Text.Pandoc.Writers.RTF, Text.Pandoc.Writers.HTML, Main.hs)
* Moved Text.Pandoc.Writers.DefaultHeaders -> Text.Pandoc.DefaultHeaders.
* Makefile:
+ Added 'configure' as dependency of 'uninstall-all'.
(It uses the Cabal build program.)
+ Makefile: only use --with-hc-pkg if GHC_PKG is defined.
Note that Cabal will automatically choose the ghc-pkg appropriate
for the compiler selected, so normally specifying GHC by itself
is sufficient.
* Removed Text.Pandoc.UTF8 module; instead, depend on utf8-string and use
its IO and conversion functions.
* Added -Wall to ghc-options in pandoc.cabal. Cleaned up modules so that
everything is -Wall clean.
+ Added pragma to HTML writer to avoid deprecation warning for use of "start" attribute.
+ Added pragma to Text/Pandoc/Shared.hs to get rid of "orphan instance" warnings.
(These are caused by the Lift instance for ByteString.)
* Changed the comment used to replace unsafe HTML if sanitize-html option
selected.
* Made -c/--css option repeatable on the command line (like -H, -A, -B).
* Moved XML-formatting functions to new unexported module Text.Pandoc.XML.
* Escape '\160' as " ", not " " in XML.
"nbsp" isn't a predefined XML entity.
* Fixed bug in RST reader, which would choke on: "p. one\ntwo\n".
Added some try's in ordered list parsers.
* Man writer: don't escape " as \".
* Allow newline before URL in markdown link references. Resolves Issue #81.
Added tests for this issue in new "markdown-reader-more" tests.
Changed RunTests.hs to run these tests.
* Support for display math. Resolves Issue #47.
+ Added a DisplayMath/InlineMath selector to Math inlines.
+ Markdown parser yields DisplayMath for $$...$$.
+ LaTeX parser yields DisplayMath when appropriate. Removed
mathBlock parsers, since the same effect is achieved by the math
inline parsers, now that they handle display math.
+ Writers handle DisplayMath as appropriate for the format.
+ Modified tests accordingly; added new tests for display math.
* Use LaTeXMathML instead of ASCIIMathML. LaTeXMathML is closer
to LaTeX in its display of math, and supports many non-math LaTeX environments.
+ Changed -m option to use LaTeXMathML rather than ASCIIMathML.
+ Modified HTML writer to print raw TeX when LaTeXMathML is
being used instead of suppressing it.
+ Removed ASCIIMathML files from data/ and added LaTeXMathML.
+ Replaced ASCIIMathML with LaTeXMathML in source files.
+ Modified README and pandoc man page source.
+ Added --latexmathml option (kept --asciimathml as a synonym
for backwards compatibility)
* Markdown reader: Parse setext headers before atx headers.
Test case:
# hi
====
parsed by Markdown.pl as an H1 header with contents "# hi".
* Markdown reader: Treat "mixed" lists the same way as Markdown.pl does.
The marker on the first list item determines the type of the whole
list. Thus, a list like
1. one
- two
* three
gets parsed as a single ordered list. (Previous versions of pandoc
treated this as an ordered list with an unordered sublist.)
* Markdown smart typography:
+ Em dashes no longer eat surrounding whitespace. Resolves Issue #69.
+ Use nonbreaking spaces after known abbreviations in markdown parser.
Thus, for example, "Mr. Brown" comes out as "Mr.~Brown" in LaTeX, and does
not produce a sentence-separating space. Resolves Issue #75.
* Markdown writer: Print unicode \160 literally, rather than as .
* Treat '\ ' in (extended) markdown as nonbreaking space.
Print nonbreaking space appropriately in each writer (e.g. ~ in LaTeX).
* The '--sanitize-html' option now examines URIs in markdown links
and images, and in HTML href and src attributes. If the URI scheme
is not on a whitelist of safe schemes, it is rejected. The main point
is to prevent cross-site scripting attacks using 'javascript:' URIs.
See http://www.mail-archive.com/markdown-discuss@six.pairlist.net/msg01186.html
and http://ha.ckers.org/xss.html. Resolves Issue #62.
* HTML writer:
+ Override Text.XHtml's stringToHtml function,
so that characters below 0xff are not converted to numerical entity
references. Also convert '\160' to " ". This should aid readability
and editability of the HTML source. It does presuppose that the HTML
will be served as UTF-8.
+ In code blocks, change leading newlines to tags.
(Some browsers ignore them.) Resolves Issue #71.
See http://six.pairlist.net/pipermail/markdown-discuss/2008-May/001297.html
+ Use style attributes rather than css classes for strikethrough
and ordered list styles. This works better when fragments, rather than
standalone documents, are generated.
* HTML reader: Count anything that isn't a known block (HTML) tag as an
inline tag (rather than the other way around). Added "html", "head", and
"body" to list of block tags. Resolves Issue #66, allowing
to count as an inline tag.
* RTF writer: Fixed bug. Extra spaces were being printed after emphasized,
boldface, and other inline elements. Resolves Issue #64.
* LaTeX reader: improvements in raw LaTeX parsing.
+ "loose punctuation" (like {}) parsed as Space
+ Para elements must contain more than Str "" and Space elements
+ Added parser for "\ignore" command used in literate haskell.
+ Reworked unknownCommand and rawLaTeXInline: when not in "parse raw"
mode, these parsers simply strip off the command part and allow
the arguments to be parsed normally. So, for example,
\blorg{\emph{hi}} will be parsed as Emph "hi" rather than
Str "{\\emph{hi}}".
+ Parse lhs "code" environments as verbatim.
Refactored parsers for verbatim environments.
+ Removed specialEnvironment parser.
+ parse '{}', if present, after \textless, \textgreater,
\textbar, \textbackslash, \ldots.
+ Parse unescaped special characters verbatim rather than
changing them to spaces. This way arguments of unknown
commands will appear in braces.
* Parse raw ConTeXt environments as TeX in markdown reader.
Resolves Issue #73.
* Moved BlockWrapper and wrappedBlocksToDoc from ConTeXt writer to Shared.
* Made some structural changes to parsing of raw LaTeX environments.
Previously there was a special block parser for LaTeX environments.
It returned a Para element containing the raw TeX inline. This has
been removed, and the raw LaTeX environment parser is now used in the
rawLaTeXInline parser. The effect is exactly the same, except that we
can now handle consecutive LaTeX and ConTeXt environments not separated
by spaces. This new flexibility is required by the example in
Issue #73:
\placeformula \startformula
L_{1} = L_{2}
\stopformula
API change: The LaTeX reader now exports rawLaTeXEnvironment' (which
returns a string) rather than rawLaTeXEnvironment (which returns a block
element). This is more likely to be useful in other applications.
* Use \textsubscr instead of \textsubscript for LaTeX subscript macro.
\textsubscript conflicts with a definition in the memoir class.
Resolves Issue #65.
* Removed unneeded space after "\\item" in LaTeX and ConTeXt output.
* Added amsmath package to default LaTeX header. Resolves Issue #48.
* Added \setupitemize[autointro] to ConTeXt header, to prevent orphaned
list introduction lines.
* Changed Float to Double in definition of Table element.
(Double is more efficient in GHC.)
* Fixed bug in Markdown parser: regular $s triggering math mode.
For example: "shoes ($20) and socks ($5)."
The fix consists in two new restrictions:
+ the $ that ends a math span may not be directly followed by a digit.
+ no blank lines may be included within a math span.
Thanks to Joseph Reagle for noticing the bug.
* Use Data.List's 'intercalate' instead of custom 'joinWithSep'.
Removed 'joinWithSep' from Text.Pandoc.Shared.
* Updated README and man pages. Acknowledge contributors in README.
Added paragraph to README about producing S5 with separate CSS/javascript.
* Updated INSTALL to reflect new build system (including configuration
options) and document new dependencies. Added note to INSTALL that
Cabal >= 1.2 is required for build. Resolves Issue #74.
* Fixed some haddock documentation errors.
* Small fix to markdown2pdf man page: only input needs to be piped through iconv.
pandoc (0.46) unstable; urgency=low
[ John MacFarlane ]
* Made -H, -A, and -B options cumulative: if they are specified
multiple times, multiple files will be included.
* Added optional HTML sanitization using a whitelist.
When this option is specified (--sanitize-html on the command line),
unsafe HTML tags will be replaced by HTML comments, and unsafe HTML
attributes will be removed. This option should be especially useful
for those who want to use pandoc libraries in web applications, where
users will provide the input.
+ Main.hs: Added --sanitize-html option.
+ Text.Pandoc.Shared: Added stateSanitizeHTML to ParserState.
+ Text.Pandoc.Readers.HTML:
- Added whitelists of sanitaryTags and sanitaryAttributes.
- Added parsers to check these lists (and state) to see if a given
tag or attribute should be counted unsafe.
- Modified anyHtmlTag and anyHtmlEndTag to replace unsafe tags
with comments.
- Modified htmlAttribute to remove unsafe attributes.
- Modified htmlScript and htmlStyle to remove these elements if
unsafe.
+ Modified README and man pages to document new option.
* Improved handling of email addresses in markdown and reStructuredText.
Consolidated uri and email address parsers. (Resolves Issue #37.)
+ New emailAddress and uri parsers in Text.Pandoc.Shared.
- uri parser uses parseURI from Network.URI.
- emailAddress parser properly handles email addresses with periods
in them.
+ Removed uri and emailAddress parsers from Text.Pandoc.Readers.RST
and Text.Pandoc.Readers.Markdown.
* Markdown reader:
+ Fixed emph parser so that "*hi **there***" is parsed as a Strong
nested in an Emph. (A '*' is only recognized as the end of the
emphasis if it's not the beginning of a strong emphasis.)
+ Moved blockQuote parser before list parsers for performance.
+ Modified 'source' parser to allow backslash-escapes in URLs.
So, for example, [my](/url\(1\)) yields a link to /url(1).
Resolves Issue #34.
+ Disallowed links within links. (Resolves Issue #35.)
- Replaced inlinesInBalanced with inlinesInBalancedBrackets, which
instead of hard-coding the inline parser takes an inline parser
as a parameter.
- Modified reference and inlineNote to use inlinesInBalancedBrackets.
- Removed unneeded inlineString function.
- Added inlineNonLink parser, which is now used in the definition of
reference.
- Added inlineParsers list and redefined inline and inlineNonLink parsers
in terms of it.
- Added failIfLink parser.
+ Better handling of parentheses in URLs and quotation marks in titles.
- 'source' parser first tries to parse URL with balanced parentheses;
if that doesn't work, it tries to parse everything beginning with
'(' and ending with ')'.
- source parser now uses an auxiliary function source'.
- linkTitle parser simplified and improved, under assumption that it
will be called in context of source'.
+ Make 'block' conditional on strictness state, instead of using
failIfStrict in block parsers. Use a different ordering of parsers
in strict mode (raw HTML block before paragraph) for performance.
In non-strict mode use rawHtmlBlocks instead of htmlBlock.
Simplified htmlBlock, since we know it's only called in strict
mode.
+ Improved handling of raw HTML. (Resolves Issue #36.)
- Tags that can be either block or inline (e.g. ) should
be treated as block when appropriate and as inline when
appropriate. Thus, for example,
hi
should be treated as a paragraph with inline tags, while
hi
should be treated as a paragraph within tags.
- Moved htmlBlock after para in list of block parsers. This ensures
that tags that can be either block or inline get parsed as inline
when appropriate.
- Modified rawHtmlInline' so that block elements aren't treated as
inline.
- Modified para parser so that paragraphs containing only HTML tags and
blank space are not allowed. Treat these as raw HTML blocks instead.
+ Fixed bug wherein HTML preceding a code block could cause it to
be parsed as a paragraph. The problem is that the HTML parser
used to eat all blank space after an HTML block, including the
indentation of the code block. (Resolves Issue #39.)
- In Text.Pandoc.Readers.HTML, removed parsing of following space
from rawHtmlBlock.
- In Text.Pandoc.Readers.Markdown, modified rawHtmlBlocks so that
indentation is eaten *only* on the first line after the HTML
block. This means that in
foo
the foo won't be treated as a code block, but in
foo
it will. This seems the right approach for least surprise.
* RST reader:
+ Fixed bug in parsing explicit links (resolves Issue #44).
The problem was that we were looking for inlines until a '<' character
signaled the start of the URL; so, if you hit a reference-style link,
it would keep looking til the end of the document. Fix: change
inline => (notFollowedBy (char '`') >> inline). Note that this won't
allow code inlines in links, but these aren't allowed in resT anyway.
+ Cleaned up parsing of reference names in key blocks and links.
Allow nonquoted reference links to contain isolated '.', '-', '_', so
so that strings like 'a_b_' count as links.
+ Removed unnecessary check for following link in str.
This is unnecessary now that link is above str in the definition of
'inline'.
* HTML reader:
+ Modified rawHtmlBlock so it parses and tags.
This allows these tags to be handled correctly in Markdown.
HTML reader now uses rawHtmlBlock', which excludes and