aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-01-10Chunks: remove unused imports.chunkedhtmlJohn MacFarlane
2023-01-10T.P.Chunks: remove Ord instances for SecInfo, Chunk, ChunkedDoc.John MacFarlane
2023-01-10Add ChunkedHTML writer.John MacFarlane
- Add module Text.Pandoc.Writers.ChunkedHTML, exporting writeChunkedHtml [API change]. - Revised API for Text.Pandoc.Chunks. `chunkNext`, `chunkPrev`, `chunkUp` are now just `Maybe Chunk`. - Fix assignment of navigation elements of Chunks. - Strip off anchor portion of next and prev links. - Derive Show, Eq, Ord, Generic for ChunkDoc. - Add `chunkSectionNumber`, `chunkUnlisted`. - Automatically unwrap the zip to a directory if an extensionless output file specified. - Incorporate images with relative paths below working dir.
2023-01-10Update copyright years, it's 2023!Albert Krewinkel
2023-01-05isURI: don't require non-ASCII characters to be escaped.John MacFarlane
Closes #8508.
2023-01-04Use `\toprule\noalign{}` instead of `\toprule()` in LaTeX tables.John MacFarlane
And similar for `\midrule` and `\bottomrule`. This facilitates redefining `\toprule`, `\midrule`, and `\bottomrule` without needing to gobble the ()s. Closes #8223.
2022-12-28Man writer: use UTF-8 by default for non-ascii characters.John MacFarlane
Only use groff escapes if `--ascii` has been specified on the command line (`writerPreferAscii`). Closes #8507.
2022-12-22Support "software" type in biblatex <-> CSL conversions.John MacFarlane
Closes #8504.
2022-12-22Make sure "version" field comes through in biblatex.John MacFarlane
See #8504.
2022-12-20T.P.Scripting: Refactor the scripting engine.John MacFarlane
The new type CustomComponents is exported from T.P.Scripting, and the ScriptEngine fields are changed. Instead of separate fields for custom readers and writers, we now have a single function that loads any number of "components" from a script: these may be custom readers, custom writers, templates for writers, or extension configs. (Note: it's possible to have a custom reader and a custom writer for a format together in the same file.) Pandoc now checks the folder `custom` in the user's data directory for a matching script if it can't find one in the local directory. Previously, the `readers` and `writers` data directories were search for custom readers and writers, respectively. Scripts in those directories must be moved to the `custom` folder. Custom readers used to implement a fallback behavior that allowed to consume just a string value as input to the `Reader` function. This has been removed, the first argument is now always a list of sources. Use `tostring` on that argument to get a string. Closes #8417. Signed-off-by: Albert Krewinkel <[email protected]>
2022-12-20T.P.Format: Monoid, Semigroup instance for ExtensionsConfig.John MacFarlane
2022-12-20Shared: use LineBreak as default block sep in blocksToInlinesAlbert Krewinkel
This change also affects the `pandoc.utils.blocks_to_inlines` Lua function. Closes: #8499
2022-12-20Markdown writer: avoid HTML fallbacks in the generated TOC.Albert Krewinkel
The generated table of contents usually has IDs for each TOC link, allowing to link back to specific parts of the TOC. However, this leads to unidiomatic markup in formats like gfm, which do not support attributes on links and hence fall back to HTML. The IDs on TOC items are now removed in that case, leading to more aesthetic TOCs. Closes: #8131
2022-12-18Add Wrapper type documentation to Text.Pandoc.Templates (#8490)William Rusnack
Added more information on the wrappers from the commit https://github.com/renjianxiongqi/pandoc/commit/f36b5b8a5db8479bcf98827c267840304403bdf0 Co-authored-by: William Rusnack <[email protected]>
2022-12-18ConTeXt writer: support syntax highlighting for code.Albert Krewinkel
2022-12-17ConTeXt writer: always use `\type` for inline codeAlbert Krewinkel
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-16Format: add function `diffExtensions`.Albert Krewinkel
2022-12-16Format: use simpler structure for ExtensionsDiff.Albert Krewinkel
2022-12-16Extensions: add new function `disableExtensions`.Albert Krewinkel
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-16ConTeXt writer: fix previous commit for some unlisted sectionsAlbert Krewinkel
Unlist sections even if `--top-level-division` is not defined.
2022-12-16ConTeXt writer: add support for unlisted, unnumbered headingsAlbert Krewinkel
Closes: #8486
2022-12-15Textile reader: handle empty paragraphs.John MacFarlane
Also, if attributes are added explicitly to a paragraph, put it in a Div with the attributes. Closes #8487.
2022-12-14T.P.App.OutputSettings: remove unused record field `outputWriterName`Albert Krewinkel
2022-12-14T.P.App: cleanup code, extract internal functionsAlbert Krewinkel
2022-12-14T.P.App: unify check for standalone outputAlbert Krewinkel
2022-12-11Docx reader: fix handling of oMathPara in w:p with other content.John MacFarlane
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-08Shared: change defaultBlocksSeparator to PARAGRAPH SEPARATORAlbert Krewinkel
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-05Lua: support `-D` CLI option for custom writers [API change]Albert Krewinkel
A new error `PandocNoTemplateError` (code 87) is thrown if a template is required but cannot be found.
2022-12-04Fix metadata parsing corner case.John MacFarlane
Closes #8465.
2022-12-04HTML writer: remove obsolete stuff about mathml-script.John MacFarlane
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-04HTML writer: include math links if there are raw...John MacFarlane
commands or environments that can be interpreted as math e.g. by MathJax. See #8469.
2022-12-04EPUB writer: make title page optional.John MacFarlane
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-02Avoid using 'error' for unassigned table cells.John MacFarlane
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-01Multiple input files with --file-scope:John MacFarlane
fix case where the links are URL-encoded, e.g. with `%20`. Closes #8467.
2022-11-29HTML writer: Add prooftree to list of math environments.John MacFarlane
This will cause raw LaTeX prooftree environments to be rendered appropriately when `--mathjax` is used. Closes #8462.
2022-11-29DocBook writer: Fix position of textobject.John MacFarlane
It is a child of `inlinemediaobject`, not `imageobject`. Add regression tests for #8437. Closes #8437.
2022-11-29AsciiDoc writer: in link text, only replace commas...John MacFarlane
...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-29DocBook writer: don't indent contents of title element.John MacFarlane
2022-11-29DocBook writer: render image alt text using textobject element.John MacFarlane
See #8437.
2022-11-29DocBook reader: support href on link...John MacFarlane
even in a fragment. (We now just look for an `href` attribute without worrying about the namespace.) See #8437.
2022-11-29DocBook reader: parse title from imageobject/objectinfo.John MacFarlane
See #8437.
2022-11-28Textile Reader:vkraven
- 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-25LaTeX reader: Add `unnumbered` class for `\part*`.John MacFarlane
Closes #8447.
2022-11-21Docx writer: support relative image widths.Albert Krewinkel
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-19Docx reader: Support parsing of highlighted text.John MacFarlane
2022-11-19RST reader: support `mark` role for round-trip.John MacFarlane
2022-11-19LaTeX reader: support more soul commands, including `\hl`.John MacFarlane
2022-11-19Add support for `mark` extension for highlighted text.John MacFarlane
+ 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-19LaTeX writer: Use soul instead of ulem for strikeout, underline.John MacFarlane
This handles things like hyphenation, line breaks, and nonbreaking spaces better. Closes #8411.
2022-11-11Markdown writer: escape `!` before `[`.John MacFarlane
See #8254.