It is now possible to return a single filter from a filter file, e.g.
``` lua
-- Switch single- and double quotes
return {
Quoted = function (q)
elem.quotetype = elem.quotetype == 'SingleQuote'
and 'DoubleQuote' or 'SingleQuote'
return elem
end
}
The filter must not contain numerical indexes, or it might be treated as
a list of filters.
In these cases we emit an empty comment to fix the point from
which indentation is measured; otherwise the block quote is not
parsed as a block quote.
This affects list items and admonitions.
Cloess #10236.
In commit a26ec96d89 we added an
empty `\item[]` to the beginning of a list that occurs first
in a definition list, to avoid having one item on the line with
the label.
This gave bad results in some cases (#10241) and there is a more
idiomatic solution anyway: using `\hfill`.
Closes#10241.
+ Split out common parts of latex template into partials: common.latex,
fonts.latex, font-settings.latex, passoptions.latex, hypersetup.latex,
after-header-includes.latex.
+ Split out old latex template into default.latex and default.beamer.
+ Make default.beamer the default template for beamer.
Pandoc already depends on `crypton-conntection`, and thus transitively
on `crypton`. The latter provides a vast variety of hashing algorithms
and makes the dependency on SHA unnecessary.
- Fix alignment of list items corresponding to cells.
- Don't enclose the list table in a `.. table::`; this leads to
doubled captions.
Closes#10226.
Closes#10227.
Modified test output for #4564.
making them internal links to a fragment derived from the
filename. There was already code to handle links like
`#foo`, but not to handle links like `ch0001.html#foo`.
Closes#10207.
Two new command-line options are added:
`--lof[=true|false]`, `--list-of-figures[=true|false]`
`--lot[=true|false]`, `--list-of-tables[=true|false]`
Only docx, latex, and context are supported at this point.
Setting the `lof` and `lot` variables will also work for the formats that are
currently supported.
[API changes]
+ Lua: `list_of_figures` and `list_of_tables` can now be used in writer options.
+ Text.Pandoc.Options: add `writerListOfFigures` and `writerListOfTables` fields
to `WriterOptions`.
+ Text.Pandoc.App.Opt: add `optListOfFigures` and `optListOfTables` to `Opt`.
Closes#8245.
Co-authored-by: John MacFarlane <jgm@berkeley.edu>
Closes#6461.
Blockquotes are not really block containers in DokuWiki;
the lines are interpreted literally (so, e.g., you can't
start a list), and line breaks are added at the ends.
The use of these tags is now strongly discouraged for security
reasons, and will be removed.
We previously used them as a fallback for lists that could not
be represented using DokuWiki syntax, e.g. ordered lists with
fancy numbers or lists with multiple blocks in their items.
We also used them for block quotes with multiple blocks as
their contents.
We now use the `<WRAP>` syntax (from the optional WRAP plugin)
to handle lists with multiple blocks as their contents.
A new method of handling block quotes with complex contents
has the side benefit of also handling nested block quotes,
which weren't supported before.
`<HTML>` and `<html>` tags are only for raw HTML blocks and
inlines, and only if the `raw_html` extension is enabled. (It is
now a valid extension for `dokuwiki`, though off by default.)
Closes#7413.
The `Doc` values produced and handled by the `pandoc.layout` module can
now be styled using `bold`, `italic`, `underlined`, or `strikeout`. The
style is ignored in normal rendering, but becomes visible when rendering
to ANSI output. The `pandoc.layout.render` function now takes a third
parameter that defines the output style, either *plain* or *ansi*.
The module now comes with a method `:at(index[, def])` that allows to access
indices, accepts negative indices to count from the end, and will return the
`def` value as a default if the list has no item at the given position.
Furthermore, the list constructor `pandoc.List` now accepts iterators. E.g.,
`pandoc.List(text:gmatch '%S+')` returns the list of words in `text`.
Closes: #9835
The content of the `floats-group` variable is now rendered in a
`<floats-group>` element when using the *publishing* or *archiving* tag
sets.
Discussion: #10196
Add parsing of id (xml:id), class, and tabstyle XML attributes
for table and informaltable in the DocBook reader.
The tabstyle value is put in the 'custom-style' attribute.
fixes#10181
The new commonmark-pandoc version automatically adds the
attribute `wrapper="1"` on all Divs and Spans that
are introduced just as containers for attributes that belong
properly to their contents. So we don't need to add the
attribute here.
This gives much better results in some cases. Previously the
wrapper attribute was being added even for explicit Divs and
Spans in djot, but it is not needed in these cases.
The ANSI Superscript writer was copy-pasted and incompletely modified to
create the Subscript output writer and I forgot to call the right
function, so subscripts were getting rendered with superscripted
numbers. Adds a line for this to the ANSI golden test.