aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
2023-06-24Fix spacing issues.John MacFarlane
2023-06-24Make `--number-sections` work with JATS writer.John MacFarlane
2023-06-24Update TableBody RowHeadColumns caculation: change from max to min (#8634)Ruqi
This change sets RowHeadColumns to the minimum value of each row, which gives better results in cases where rows have different numbers of leading th tags.
2023-06-23More fixes to 5e381e3.John MacFarlane
These changes recognize that parseURI does not unescape the path. Another change is that the canonical form of the path used as the MediaBag key retains percent-encoding, if present; we only unescape the string when writing to a file. See #8918. Some tests are needed before the issue can be closed.
2023-06-23Fix bug in 5e381e3878b5da87ee7542f7e51c3c1a7fd84b89John MacFarlane
In the new code a comma mysteriously turned into a period. This would have prevented proper separation of the mime type and content in data uris. Thanks to @hseg for catching this.
2023-06-22Retain image query parameters in dokuwiki reader (#8887)ech0
While converting dokuwiki syntax to gfm, the query parameters of images were stripped from the output. In general this makes sense, as the parameters' semantics are specific to dokuwiki. But it makes it impossible to access the query in a filter. This change retains the query parameters of image urls in the dokuwiki reader, by adding it as an extra query attribute.
2023-06-22Textile reader: Add support for link references (#8706)Stephen Altamirano
Textile supports what it calls "link alias", which are analogous to Markdown's reference-style links.
2023-06-22Logging: add new log message type `ScriptingWarning` [API change]Albert Krewinkel
2023-06-22LaTeX reader: support alt text on images. (#8745)Albert Krewinkel
Closes: #8743
2023-06-20Fix a security vulnerability in MediaBag and T.P.Class.IO.writeMedia.John MacFarlane
This vulnerability, discovered by Entroy C, allows users to write arbitrary files to any location by feeding pandoc a specially crafted URL in an image element. The vulnerability is serious for anyone using pandoc to process untrusted input. The vulnerability does not affect pandoc when run with the `--sandbox` flag.
2023-06-20ChunkedHTML writer: Make math work in top-level page.John MacFarlane
Closes #8915.
2023-06-19Add Extracting log message for `--extract-media`.John MacFarlane
This message will also be triggered when media is being extracted to a temporary location, e.g. in PDF production.
2023-06-19Make `implicit_figures` work again in commonmark reader.John MacFarlane
Support for this (introduced in #6350) disappeared when we made an architectural change.
2023-06-19fix: add highlight for F# languageAdelar da Silva Queiróz
Fix for this SO question: https://tex.stackexchange.com/questions/563778/how-to-get-f-syntax-highlighting
2023-06-19Allow `epub-title-page` to be used in defaults files.John MacFarlane
This wasn't implemented before due to an oversight. Closes #8908.
2023-06-16LaTeX writer: Fix escaping of `&` in `\href` and `\url`.John MacFarlane
Closes #8903.
2023-06-08Add footer and multiple body parsing to JATS table reader (#8795)Noah Malmed
Closes #8765.
2023-06-07Parse references title from ref-list in JATS reader.John MacFarlane
Closes #8365.
2023-06-07JATS writer: include title in ref-list.John MacFarlane
Previously the reference title ended up in a separate section at the back of the body instead of in the ref-list in the back matter. Closes #8364.
2023-06-07Allow `abstract-title` to be specified in docx metadata.John MacFarlane
Closes #8794.
2023-06-07Fix localization of "Abstract" title in docx writer.John MacFarlane
See #8702, which was only partially implemented before.
2023-06-06Fix whitespace.John MacFarlane
2023-06-06Add typst reader.John MacFarlane
New module Text.Pandoc.Readers.Typst [API change].
2023-06-06Improve title and label parsing in the JATS reader (#8840)Noah Malmed
Closes #8718.
2023-06-05ODT reader: allow lists in table cells. Closes #8892.John MacFarlane
2023-06-05Typst writer: use `#footnote` for notes.John MacFarlane
Closes #8893.
2023-06-04ODT reader: allow frames inside spans.John MacFarlane
Closes #8886.
2023-05-29RST redear: Fix sorting on anonymous keys.John MacFarlane
This fixes a bug in RST documents that have anonymous links. Closes #8877.
2023-05-17HTML reader: fix iframe with data URI of an image.John MacFarlane
Closes #8856. In this case we don't want to try to parse the data at the URL. Instead, create an image inside a div.
2023-05-09Ms writer: coerce titles to inlines.John MacFarlane
Block-level formatting is not allowed inside .TL. Closes #8835.
2023-05-08LaTeX writer: better fix for colspecs for multicolumn table.John MacFarlane
Improves on the last commit; closes #8831.
2023-05-08LaTeX writer: fix width for multicolumn simple table.John MacFarlane
This should help with #8831. I'm not sure this is the best solution, but it's certainly better than what we had before!
2023-05-08Introduce support for Intense Quote in Docx conversionStephan Meijer
This commit introduces support for the Intense Quote in Docx Conversion. Previously this was converted to a regular paragraph, but Intense Quote should be interpreted as a Quote in conversion.
2023-05-05Jira writer: use first code block class as highlighting language.Albert Krewinkel
The writer no longer searches the list of classes for a known programming language but always uses the first class in that list as the language identifier. Closes: #8814
2023-05-04Markdown reader: disallow escaping of `~` and `"` in markdown_strictAlbert Krewinkel
This matches the behavior of the legacy `markdown.pl` as well as what is described in the manual. Fixes: #8777
2023-05-04LaTeX reader: ignore args to column type in `\multicolumn`.Albert Krewinkel
The `\multicolumn` command takes the column type as the second argument. Types like `p` take an additional argument, which is now ignored and no longer causes the table parser to fail. Fixes: #8789
2023-05-01Writers.OpenDocument: handle row header column cells as header cellsMichael Stahl
The previous commit prevented header column cells from being dropped on the floor, this one changes the paragraph style to "Table_20_Heading". Note that for the test input, the result is not correct: the AnnotatedTable type cannot represent the HTML input properly, as it only has a concept of header rows and header columns, but HTML can have an individual cell that is a header (not 100% sure but they way i read https://html.spec.whatwg.org/#header-and-data-cell-semantics the <th> cell here is both a row header cell and a column header cell while the other cells in the row and column are not header cells), and header cells may even appear "in the middle" of a table (see example in https://html.spec.whatwg.org/#the-th-element). So while this appears like it's the right thing to do for Writer.OpenDocument, it's not clear if this is going to make things better or worse overall. Fixes: #8764
2023-05-01Writers.OpenDocument: handle row header column cells as ordinary cellsMichael Stahl
While ODF 1.3 part 3 does specify a 9.1.11 <table:table-header-columns> element, in practice it's only implemented by spreadsheet applications, not word processors. So simply treat the row header columns as ordinary table columns, at least they don't get lost then. Fixes: #8764
2023-05-01Writers.OpenDocument: fix invalid text:p inside text:p from metaMichael Stahl
The only element in meta for which data/templates/default.opendocument allows block element content appears to be "abstract", which is already filtered out of meta' at this point, so simply convert all blocks to linebreak-separated inlines. Fixes: #8256
2023-04-28Commonmark writer: use shortcut reference links.John MacFarlane
Commonmark supports these.
2023-04-28Writers.ODT: don't add settings.xmlMichael Stahl
The way "ooo:configuration-settings" work is that if LibreOffice Writer loads a file in which it exists, it assumes that an old version of itself has produced it and it defaults any config-item that it knows but that doesn't exist in the file to the "backward-compatible" value, which usually means to enable some layout or text formatting bugs so that the document looks the same as in the old LO version that created it. If there is no "ooo:configuration-settings" then it will use the default values for a new document, which should give the best formatting results. Pandoc's documents are obviously not created by LO, so it doesn't make sense to produce ooo:configuration-settings. Regarding the "ooo:view-settings", IIRC these mainly set to the document view to the position where the document was last edited (by default only if the user in meta.xml matches the user data in LO's configuration), which is also irrelevant for Pandoc. So just leave out the settings.xml; only content.xml/styles.xml are required (see ODF 1.3, part 3, 2.2.1 OpenDocument Document, A.2). (The settings.xml that is produced for formulas by the documentSettings function hopefully isn't problematic because LO Math works a bit differently and stores important formatting attributes in settings.xml because MathML doesn't allow it in content.xml.)
2023-04-28Writers.ODT: don't add Configurations2 dirMichael Stahl
This empty file is some ancient OOo wart and it's quite pointless here.
2023-04-28Writers.ODT: don't add thumbnailMichael Stahl
Quite pointless to add a hardcoded image that doesn't show the document content.
2023-04-28Writers.ODT: put manifest.version on directory file-entryMichael Stahl
See ODF 1.3 part 2, 4.16.14.1 <manifest:file-entry>: The manifest:version attribute specifies the format version of a file entry. For documents that are composed from multiple files, this attribute is specified at the manifest entry that references the folder that contains these files.
2023-04-28Writers.ODT: stop validator complaints by producing ODF 1.3Michael Stahl
The ODF validator complains about an invalid attribute style:contextual-spacing in styles.xml, ultimately an implementation error in whatever old version of LibreOffice that produced the data/odt/styles.xml (should have put it into an extension namespace). Fortunately the attribute was added to ODF 1.3, which was released a couple years ago. So the easiest fix is to simply produce ODF 1.3 instead of 1.2; it's supposed to be fully backward compatible.
2023-04-20Remove redundant line in pattern match.John MacFarlane
2023-04-17Remove unnecessary 'spaces' in parseFromString.John MacFarlane
2023-04-14Fix bug in RTF table parsing.John MacFarlane
In certain cases, text before a table was being incorporated into the table itself. Closes #8767.
2023-04-07ImageSize: drop BOM at start of SVG if present.John MacFarlane
Otherwise our code can fail to determine image size.
2023-04-07Typst writer: omit bibliography if `citations` not enabled.John MacFarlane
With this change, the typst writer will omit the `#bibliography` command when `citations` is not enabled. (If you want to use pandoc's own `--citeproc`, you should combine it with `-t typst-citations` to disable native typst citations. Closes #8763.