Commit Graph
16168 Commits
Author SHA1 Message Date
Albert Krewinkel e83120fd2d ConTeXt writer: support syntax highlighting for code. 2022-12-18 15:47:48 +01:00
Albert Krewinkel 8f5af5a06c ConTeXt writer: always use \type for inline code
Inline codes that contained curly braces where previously rendered with
`\mono`; this led to unexpected results when the presentation of `\type`
was customized, as those changes would not have been applied to code
rendered with `\mono`.
2022-12-17 23:53:12 +01:00
Albert Krewinkel a36f12119f Lua: allow table structure as format spec.
This allows to pass structured values as format specifiers to
`pandoc.write` and `pandoc.read`.
2022-12-16 10:43:01 -08:00
Albert Krewinkel db0232fc54 Format: add function diffExtensions. 2022-12-16 10:43:01 -08:00
Albert Krewinkel 038df3b24c Format: use simpler structure for ExtensionsDiff. 2022-12-16 10:43:01 -08:00
Albert Krewinkel 471317f4fe Extensions: add new function disableExtensions.
The function removes all elements in a second set from a base set.
Extensions in the second set that are not in the base set are ignored.
2022-12-16 10:43:01 -08:00
Albert Krewinkel 0d6c2e3e22 ConTeXt writer: fix previous commit for some unlisted sections
Unlist sections even if `--top-level-division` is not defined.
2022-12-16 14:09:09 +01:00
Albert Krewinkel da2d7ce6f5 ConTeXt writer: add support for unlisted, unnumbered headings
Closes: #8486
2022-12-16 13:48:57 +01:00
John MacFarlane 1698af8885 Textile reader: handle empty paragraphs.
Also, if attributes are added explicitly to a paragraph,
put it in a Div with the attributes.

Closes #8487.
2022-12-15 12:38:36 -08:00
Albert Krewinkel 200ad70d9d T.P.App.OutputSettings: remove unused record field outputWriterName 2022-12-14 20:56:33 +01:00
Albert Krewinkel 8ce28fc4d7 T.P.App: cleanup code, extract internal functions 2022-12-14 20:34:39 +01:00
Albert Krewinkel e08958a66d T.P.App: unify check for standalone output 2022-12-14 16:31:52 +01:00
Albert Krewinkel 3be34077f5 MANUAL: fix typo, spacing
Unified spacing in "Variables for ms" section with surrounding sections;
dropped spurious `s` from `install-font.sh` filename.
2022-12-13 12:44:47 +01:00
Albert Krewinkel 928dde57b9 Lua: add pandoc.cli module
Allow processing of CLI options in Lua.
2022-12-12 09:35:21 -08:00
John MacFarlane 09af316f36 Update default CSL with latest chicago-author-date.csl.
This removes some weird punctuation overrides for Portuguese.
Closes jgm/citeproc#123.
2022-12-12 07:54:00 -08:00
John MacFarlane 3439c1ae94 Docx reader: fix handling of oMathPara in w:p with other content.
Closes #8483.

The problem is that oMathPara can either occur at the block-level
(child of w:body) or at the inline level (child of w:p, potentially
with other content). We need to handle both cases.
Previously the code just assumed that if we had a w:p with an oMathPara,
the math would be the sole content.

This patch removes OMathPara as a constructor of BodyPart
and adds it as a constructor of ParPart.
2022-12-11 20:20:28 -08:00
John MacFarlane 5819e36dfa Use skylighting 0.13.1.2 2022-12-08 12:20:18 -08:00
TomBen 18874be79d Fix a tiny typo in lua-filters.md 2022-12-07 21:28:36 -08:00
Albert Krewinkel e0e6087145 Shared: change defaultBlocksSeparator to PARAGRAPH SEPARATOR
This Unicode char (U+2029) is intended as a semantic separator between
paragraphs; it is cleaner and less intrusive than the pilcrow sign that
we used before. This also changes the default `sep` value used in the
`pandoc.utils.blocks_to_inlines` Lua function.
2022-12-08 00:24:07 +01:00
Albert Krewinkel a03b77fbd3 Lua: support -D CLI option for custom writers [API change]
A new error `PandocNoTemplateError` (code 87) is thrown if a template is
required but cannot be found.
2022-12-05 08:52:37 -08:00
John MacFarlane a4ac1ebb95 Fix metadata parsing corner case.
Closes #8465.
2022-12-04 11:14:43 -08:00
John MacFarlane 634696fb87 HTML writer: remove obsolete stuff about mathml-script.
This was a shim we used to include for mathml support.
We don't do anything with this any more, so this is dead code.
2022-12-04 10:20:22 -08:00
John MacFarlane 732ef20546 HTML writer: include math links if there are raw...
commands or environments that can be interpreted as math e.g. by
MathJax.  See #8469.
2022-12-04 10:14:59 -08:00
John MacFarlane aaa3beacc0 EPUB writer: make title page optional.
New command line option: `--epub-title-page=true|false`.

New `writerEpubTitlePage` field on `WriterOptions` [API change].

New `optEpubTitlePage` field on `Opts` [API change].

Closes #6097.
2022-12-04 09:59:05 -08:00
Albert Krewinkel b34ec00607 doc/lua-filters.md: add documentation for pandoc.format 2022-12-03 16:22:19 +01:00
John MacFarlane c5beb1db45 Avoid using 'error' for unassigned table cells.
Instead, throw a regular pandoc error.  This is not necessarily
a programming error, as it can be triggered by inserting a
cell with ColSpan 0 in the AST.  Unfortunately the types
don't prevent that.

Closes #8468.
2022-12-02 14:47:29 -08:00
John MacFarlane 8b01e200f0 Multiple input files with --file-scope:
fix case where the links are URL-encoded, e.g. with `%20`.

Closes #8467.
2022-12-01 19:20:06 -08:00
John MacFarlane ed4bdd059c HTML writer: Add prooftree to list of math environments.
This will cause raw LaTeX prooftree environments to be rendered
appropriately when `--mathjax` is used.

Closes #8462.
2022-11-29 17:07:03 -08:00
John MacFarlane 513bdef40b DocBook writer: Fix position of textobject.
It is a child of `inlinemediaobject`, not `imageobject`.

Add regression tests for #8437.

Closes #8437.
2022-11-29 10:16:41 -08:00
John MacFarlane fe799eea91 AsciiDoc writer: in link text, only replace commas...
...with entities when they're in Str elements.  If a link
contains an image, it may have attributes, and the commas
there should not be converted.

See #8437, #8070.
2022-11-29 09:56:41 -08:00
John MacFarlane 6191be11ff DocBook writer: don't indent contents of title element. 2022-11-29 09:43:11 -08:00
John MacFarlane 6a23ac0d1d DocBook writer: render image alt text using textobject element.
See #8437.
2022-11-29 09:37:31 -08:00
John MacFarlane 8f9e16265b DocBook reader: support href on link...
even in a fragment.  (We now just look for an `href` attribute without
worrying about the namespace.)

See #8437.
2022-11-29 09:23:10 -08:00
John MacFarlane 07ebafcb01 DocBook reader: parse title from imageobject/objectinfo.
See #8437.
2022-11-29 09:13:48 -08:00
vkraven b6622c07b6 Textile Reader:
- Adding a Parser to look for ordered list start attribute numbers if any
 - Add command test for ordered list start attributes (#2465)
 - Cleanup and formatting
2022-11-28 19:30:20 -07:00
Terence Eden 2008a18f0e Fix epub-embed-font documentation
Fixes #8455
2022-11-28 12:01:17 -07:00
John MacFarlane a4bd4d655a Clarify docs for --metadata-file.
Closes #8459.
2022-11-28 10:58:36 -08:00
John MacFarlane f53ab3ca8c LaTeX reader: Add unnumbered class for \part*.
Closes  #8447.
2022-11-25 08:59:33 -07:00
Albert Krewinkel fb5da4a8c6 Fix command test #7743 for Windows 2022-11-23 10:01:46 +01:00
John MacFarlane 7347f3f3f8 stack.yaml: update doctemplates version. 2022-11-21 16:03:43 -08:00
John MacFarlane f038897187 Use doctemplates 0.11.
This avoids a transitive dependency on HsYAML, which we no longer
use in pandoc.
2022-11-21 10:44:59 -08:00
Albert Krewinkel 2dec0ff52d Docx writer: support relative image widths.
Image widths given in percent are interpreted to be relative to the text
width. This is similar to the way percent widths are handled in other
writers, e.g. HTML and LaTeX. Previously, percent widths were taken
relative to the image's native size.
2022-11-21 16:32:41 +01:00
John MacFarlane 4b4771f062 Docx reader: Support parsing of highlighted text. 2022-11-19 13:28:10 -08:00
John MacFarlane bb0fd13bcb RST reader: support mark role for round-trip. 2022-11-19 12:44:25 -08:00
John MacFarlane 127ded4fae LaTeX reader: support more soul commands, including \hl. 2022-11-19 12:44:07 -08:00
John MacFarlane 75435381ac Add support for mark extension for highlighted text.
+ Extensions: Add `Ext_mark` extension.
  This is not part of the pandoc extensions by default.
+ Markdown reader: parse `==..==` if `mark` extension enabled.
+ Markdown writer: support `mark` extension.
+ Docx writer: render Span with class `mark` as highlighted.
  Currently yellow is hardcoded.
+ LaTeX writer: support highlighted text for Span with class `mark`.
+ RST writer: use special `mark` role for Span with class `mark`.
+ Update MANUAL.txt.

Closes #7743.
2022-11-19 12:30:12 -08:00
John MacFarlane 144bf90ab9 LaTeX writer: Use soul instead of ulem for strikeout, underline.
This handles things like hyphenation, line breaks, and nonbreaking
spaces better.

Closes #8411.
2022-11-19 12:28:41 -08:00
Vladimir Alexiev 202eacb686 Update epub.md
minor typo s/above/about/
2022-11-16 10:42:05 -08:00
Alexander Batischev 1bea5e8a54 Allow mtl 2.3.1 2022-11-15 11:35:53 -08:00
John MacFarlane afe096d9e3 Markdown writer: escape ! before [.
See #8254.
2022-11-11 10:58:07 -08:00