aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2024-07-27Allow --number-sections to take an optional true|false argument.John MacFarlane
This was omitted when we allowed this for other boolean flags.
2024-07-27Docx writer: fix regression with nested lists.John MacFarlane
Closes #9994. The bug affects e.g. ordered lists with bullet sublists; after the sublist the top-level list reverts to bullets instead of being properly numbered. This regression was introduced in version 3.2.1 and was caused by commit f5531f1.
2024-07-27RTF reader: handle `\*\shppict` without dropping image.John MacFarlane
Closes #10025.
2024-07-15BibTeX writer: ensure that "literal" names are enclosed in braces.John MacFarlane
Closes #9987.
2024-07-08Harmonize maintainer email addresses in module headers.Albert Krewinkel
2024-07-06Typst reader: ignore 'pad' and just parse its body.John MacFarlane
See #9958.
2024-07-03Avoid 'head' in JATS reader, DocBook writer.John MacFarlane
2024-07-03Haddock reader: Avoid use of 'head'.John MacFarlane
2024-07-03TWiki reader: use isUpper/isLower...John MacFarlane
instead of the new isUpperCase/isLowerCase, for portability across base versions.
2024-07-03TWiki Reader: recognize WikiWords as internal links.John MacFarlane
Fixes #9941.
2024-07-03TWiki reader: avoid partial function.John MacFarlane
2024-07-02Fix some mistakes with Japanese language code.John MacFarlane
In several places we were mistakenly assuming that the BCP 47 code for Japanese language was `jp`. It is `ja`. Closes #9938.
2024-07-01Add option to link rather than embedding images in ODT.John MacFarlane
New cli option: `--link-images`. This causes images to be linked rather than embedded in ODT. New field in WriterOptions: `writerLinkImages` [API change]. New field in Opt: `optLinkImages` [API change]. Closes #9815.
2024-06-23LaTeX writer: new method for ensuring images don't overflow.John MacFarlane
Previously we relied on graphicx internals and made global changes to Gin to force images to be resized if they exceed textwidth. This approach is brittle and caused problems with `\includesvg` (see #9660). The new approach uses a new macro `\pandocbounded` that is now defined in the LaTeX template. (Thanks here to Falk Hanisch in https://github.com/mrpiggi/svg/issues/60.) The LaTeX writer has been changed to enclose `\includegraphics` and `\includesvg` commands in this macro when they don't explicitly specify a width or height. In addition, the writer now adds `keepaspectratio` to the `\includegraphics` or `\includesvg` options if `height` is specified without width, or vice versa. Previously, this was set in the preamble as a global option. Compatibility issues: - If custom templates are used with the new LaTeX writer, they will have to be updated to include the new `\pandocbounded` macro, or an error will be raised because of the undefined macro. - Documents that specify explicit dimensions for an image may render differently, if the dimensions are greater than the line width or page height. Previously pandoc would shrink these images to fit, but the new behavior takes the specified dimensions literally. In addition, pandoc previously always enforced `keepaspectratio`, even when width and height were both specified, so images with width and height specified that do not conform to their intrinsic aspect ratio will appear differently. Closes #9660.
2024-06-23Markdown writer: fix bug with block quotes in lists.John MacFarlane
Closes #9908.
2024-06-22OpenXML writer: be craftier in adding East Asian font hints.John MacFarlane
In some cases we need to break up a long text run including both western and East Asian text, so that the punctuation in the western text doesn't become double-wide. Closes #9817.
2024-06-22HTML writer: ensure URI escaping needed for html4.John MacFarlane
Unicode characters need not be escaped for html5, and still won't be. See #9905.
2024-06-21RST reader: Support `:cite:` role with citeproc.John MacFarlane
This patch supports a subset of the functionality of the sphinxcontrib-bibtex extension to Sphinx. See <https://sphinxcontrib-bibtex.readthedocs.io/en/latest/quickstart.html>. Closes #9904.
2024-06-21LaTeX reader: fix parsing of dimensions beginning with `.`.John MacFarlane
E.g., `\kern.1pt`. Closes #9902.
2024-06-18Textile reader: don't let spans begin right after a symbol.John MacFarlane
Closes #9878.
2024-06-17Make `gfm_auto_identifiers` work as advertised.John MacFarlane
It is supposed to replace emojis with their aliases, but previously this only worked when the emojis were in a specially marked span. Note that this change doesn't affect `commonmark` (or `gfm`) because the relevant code is in commonmark-hs. This will also need updating. See #9876.
2024-06-12Markdown writer: don't print extra caption when using `implicit_figures`.John MacFarlane
2024-06-12Docx reader: improve handling of captions.John MacFarlane
- Turn captioned images into Figure elements. Closes #9391. - Improve the logic for associating elements with captions. Closes #9358. - Ensure that captions that can't be associated with an element aren't just silently dropped. Closes #9610.
2024-06-12Docx reader: rename TblCaption to Capt.John MacFarlane
We'll use this for image captions as well. Word does not really distinguish these.
2024-06-11T.P.ImageSize: don't prefer exif width/height when they conflict...John MacFarlane
...with width/height. That was a mistaken call in #6936. Usually when these values disagree, it is because the image has been resized by a tool that leaves the original exif values the same, so the width/height metadata are more likely to be correct that exif width/height. Closes #9871.
2024-06-10LaTeX writer/template: specify language option for `selnolig`...John MacFarlane
...and only include it if `english` or `german` is used. Since 3d8f011, the babel language is not specified as a class option any more; so now we need to explicitly specify the language option when we load `selnolig`. Only `german` and `english` are valid, so we construct the variable `selnolig-langs` in the writer and include `selnolig` if it is nonempty. This should restore proper ligature suppression when lualatex is used. Closes #9863. Supersedes #9864. Thanks to @fkohrt for the initial fix.
2024-06-10SelfContained: strip CRs from XML before base64 encoding for data uri.John MacFarlane
This is motivated mainly by the desire to get tests to work on Windows.
2024-06-10SelfContained: only create svg elements for SVG images when...John MacFarlane
...the image has the class `inline-svg`. Otherwise just use a `data` URI as we do with other images. Closes #9787.
2024-06-08PandocMonad: convert IOErrors to warnings when fetching absolute paths (#9859)Albert Krewinkel
2024-06-08Fix "unused variable" warning.Albert Krewinkel
2024-06-07Textile writer: get rid of header, odd, even classes on tr.John MacFarlane
This follows #9376.
2024-06-07Fixes to #9376.John MacFarlane
2024-06-07Don't emit unnecessary classes in HTML tables (#9376)ThomasSoeiro
Pandoc used to emit a `header` class on the `tr` element that forms the table header. This is no longer needed, because `head > tr` will do the same thing. Similarly, pandoc used to emit `even` and `odd` classes on `tr`s, allowing striped styling. This is no longer needed, because one can use e.g. `tbody tr:nth-child(2n)`. We now omit these classes, which have a good chance of conflicting with classes used for other things. Closes #9325.
2024-06-04Fix warning.John MacFarlane
2024-06-04LaTeX writer: task lists must be unordered.John MacFarlane
Closes #9185.
2024-06-04Docx reader: support task lists.John MacFarlane
This also fixes a small bug in parsing delimiters in numbered lists, which led to the default delimiter being used wrongly in some cases. Closes #8211.
2024-06-04T.P.Writers.Shared: export toTaskListItem instead of isTaskList.John MacFarlane
This is more useful. Use this in OpenXML and HTML writers.
2024-06-04T.P.Readers.Docx.Lists: replace a generic traversal...John MacFarlane
using `bottomUp` with a faster one using `walk`.
2024-06-04Docx writer: better formatting for task lists.John MacFarlane
Task lists are now properly formatted, with no bullet. In addition, we have removed an expensive generic traverse to remove Space elements, and replaced it with code in `inlinesToOpenXML`. This should give better performance; it also reduces XML size in the metadata, which wasn't previously affected by the de-Spacing. TODO: parse this in the reader so that we can have task lists round-trip. Closes #5198.
2024-06-04T.P.Writers.Shared: export `isTaskList`.John MacFarlane
[API change] This function used to be in T.P.Writers.HTML.
2024-06-03typst,table - support '.typst:no-figure' and 'typst:figure:kind=kind' (#9778)Carlos Scheidegger
This extends support for fine-grained properties in Typst. If the `typst:no-figure` class is present on a Table, the table will not be placed in a figure. If the `typst:figure:kind` attribute is present, its value will be used for the figure's `kind`. These features are documented in `doc/typst-property-output.md`. Closes #9777.
2024-06-01Docx writer: omit jc attribute on table cells with AlignDefault.John MacFarlane
Closes #5662.
2024-06-01Docx reader: react to "left" value on jc attribute.John MacFarlane
Also fix tests.
2024-06-01Docx reader: handle column and cell alignments.John MacFarlane
OpenXML doesn't have a way of indicating column alignments, but we guess them by looking at the justification property on the first paragraph of a cell, if there is one. We take the column alignments from the first body row. Closes #8551.
2024-06-01Docx reader: allow insertion/deletion to contain arbitrary ParParts...John MacFarlane
...and not just Runs. This fixes a problem wherein comments inside insertions or deletions would be ignored. Closes #9833.
2024-06-01Support HorizontalRule in docx reader.John MacFarlane
We support both pandoc-style and the style described at https://support.microsoft.com/en-us/office/insert-a-horizontal-line-9bf172f6-5908-4791-9bb9-2c952197b1a9 Closes #6285.
2024-06-01T.P.Readers.Docx.Parse: add HRule constructor to BodyPart.John MacFarlane
This paves the way to supporting horizontal rules in the reader. We still need to adjust the parser to create HRule appropriately; so far, this change has no effect, but it's a step on the way to #6285.
2024-05-31Use `\linewidth` instead of `\columnwidth` or `\textwidth`...John MacFarlane
for resizing figures, table cells, etc. in LaTeX. `\linewidth`, unlike the others, is sensitive to indented environments like lists. Closes #9775.
2024-05-31Fix metadata in docx writer.John MacFarlane
The new OpenXML template had spaces for metadata that need to be filled with OpenXML fragments with the proper shape. This patch ensures that everything is the right shape. Closes #9828.
2024-05-29Docx writer: wrap figures with id in a bookmark.John MacFarlane
Closes #8862.