Age | Commit message (Collapse) | Author | Files | Lines |
|
Custom writers have access to the global variable `PANDOC_DOCUMENT`. The
variable contains a userdata wrapper around the full pandoc AST and
exposes two fields, `meta` and `blocks`. The field content is only
marshaled on-demand, performance of scripts not accessing the fields
remains unaffected.
|
|
|
|
Custom writers can specify an optional `Setup` function. The function
takes the full Pandoc document as input and should not return any value.
Users can use this function to configure the writer depending on the
given document's content or its metadata.
data/sample.lua: add sample use of Setup function.
The change allows to control the image format used to encode the image
produced from dot code.
Closes #4957
|
|
Hierarchical Elements were pushed to Lua as plain tables. This is
simple, but has the disadvantage that marshaling is eager: all child
elements will be marshaled as part of the object. Using a Lua userdata
object instead allows lazy access to fields, causing content marshaling
just (but also each time) when a field is accessed. Filters which do not
traverse the full element contents tree become faster as a result.
|
|
This ensures that ListAttributes, as present in OrderedList elements,
have additional accessors (viz. *start*, *style*, and *delimiter*).
|
|
Fixes regression #3123 (since 2.0). Added regression test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
So far, we don't actually write any custom properties,
but we have the infrastructure to add this.
See #3034.
|
|
|
|
|
|
style
|
|
|
|
So far: just, tangle, exports, results which are used by org mode.
It might be better to use a whitelist of legal listings attributes, but
there are a large number, and these may change.
Closes #4889.
|
|
Tell users what to add to the command line to avoid the warning.
Closes #4909.
|
|
`\autocites{a1}{a2}{a3}` will not collapse the entries.
So, if we don't have prefixes and suffixes, we use instead
`\autocite{a1;a2;a3}`.
Closes #4960.
|
|
- Author, date added to metadata.
- Remaining metadata properties (besides author, date, title, lang)
are added as meta:user-defined tags.
|
|
Although this is not documented in the spec, some versions of
Word require a 'w:p' element inside every table cell. Thus, we
add one when the contents of a cell do not already include one
(e.g. when a table cell contains a table).
Closes #4953.
|
|
Closes #4382.
|
|
The default is `-raw_tex`, so no raw tex should result
unless we explicitly say `+raw_tex`. Previously some
raw commands did make it through.
Closes #4527.
|
|
This commit also adds support for `class` and `name` attributes to
directives in general.
Closes #4715.
|
|
This wasn't necessary.
|
|
Closes #4750.
Text.Pandoc.Writers.Shared now exports hasSimpleCells [API change].
|
|
|
|
Calling `#+EXCLUDE_TAGS` multiple times should preserve the status of
the previously declared tags.
|
|
Previously, the writer would unconditionally emit HTMLish output for
subscripts, superscripts, strikeouts (if the strikeout extension is
disabled) and small caps, even with raw_html disabled.
Now there are plain-text (and, where possible, fancy Unicode)
fallbacks for all of these corresponding (mostly) to the Markdown
fallbacks, and the HTMLish output is only used when raw_html is
enabled.
This commit adds exported functions `toSuperscript` and
`toSubscript` to `Text.Pandoc.Writers.Shared`. [API change]
Closes #4528.
|
|
Closes #4284.
Headers with the corresponding tags should not appear in the output.
If one or more of the specified tags contains a non-tag character
like `+`, Org-mode will not treat that as a valid tag, but will
nonetheless continue scanning for valid tags. That behavior is not
replicated in this patch; entering `cat+dog` as one of the entries in
`#+EXCLUDE_TAGS` and running the file through Pandoc will cause the
parser to fail and result in the only excluded tag being the default, `noexport`.
|
|
|
|
|
|
Implement table caption numbering with a format
"Table 1: <caption>".
Translations are enabled and numbering is consecutive for
captioned tables, uncaptioned tables are not enumerated.
Captioned figures are now also numbered consecutively
and uncaptioned figures are not enumerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These are variants for "complex scripts" like Arabic and
are now treated just like b, i (bold, italic).
Colses #4947.
|
|
We no longer surround formulas with `\(..\)` or `\[..\]` and
rely on the autorenderer. Instead, we tell katex to convert
the contents of span elements with class "math". Since math has
already been identified, this avoids wasted time parsing
for LaTeX delimiters.
Note, however, that this may yield unexpected results
if you have span elements with class "math" that
don't contain LaTeX math.
Also, use latest version of KaTeX by default (0.9.0).
Closes #4946.
|
|
Remove exported functions `metaValueToInlines`, `metaValueToString`.
Add new exported functions `lookupMetaBool`, `lookupMetaBlocks`,
`lookupMetaInlines`, `lookupMetaString`.
Use these whenever possible for uniformity in writers.
API change (major, because of removed function `metaValueToInlines`.
`metaValueToString` wasn't in any released version.)
|