summaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
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.
2023-04-07DocBook reader: support more emphasis roles.Albert Krewinkel
The role "bf" is taken to indicate "bold face", i.e., "strongly emphasized" text, while "underline" leads to underlined text.
2023-04-05Typst writer: use `<..>` for labels, create internal links.John MacFarlane
Internal links to labels are now supported.
2023-04-05Add rowspan, colspan and alignment to cells in jats table reader (#8726)Noah Malmed
Partially addresses #8408
2023-04-05Fix pdf output via typst for the typst 0.1.0 release.John MacFarlane
One must now use `typst compile` rather than `typst`. Closes #8754.
2023-04-05Remove links from inside links in mediawiki writer (#8739)wgevaert
Co-authored-by: Wout Gevaert <wout@wikibase.nl>
2023-04-05Org reader: treat `#+NAME` as synonym for `#+LABEL`.Albert Krewinkel
Closes: #8578
2023-04-01Org reader: require abstract environment to use lowercaseAlbert Krewinkel
2023-03-29HTML writer: use first paragraph in task item as checkbox label.Albert Krewinkel
Closes: #8729
2023-03-29Revert "HTML writer: wrap task items in labels."Albert Krewinkel
This reverts commit b208eb2a560b8571af577667d5df8706f4ba8892.
2023-03-29HTML writer: wrap task items in labels.Albert Krewinkel
The `<label>` element ensures that the item description is associated with the checkbox, which is important for accessibility. See: #8729
2023-03-27Typst writer: fix alignment issue in lists.John MacFarlane
It's an aesthetic issue only; the first line had an extra space indent after the list marker.
2023-03-27Typst: Use customized term instead of custom macro for def lists.John MacFarlane
2023-03-27Typst writer: support column aligns in tables.John MacFarlane
2023-03-27Typst: fix output for syntax-highlighted inline code.Albert Krewinkel
2023-03-26More Typst writer improvements.John MacFarlane
+ Update manual with variables for Typst. + Split `lang` metadata into separate `lang` and `region` for Typst. + Fix label positioning in Divs. + Fix text customizations (lang, region, font, size) so they actually work. + Update tests and man page.
2023-03-26Typst writer improvements.John MacFarlane
+ Fix non-decimal enumerated lists. + Fix endnotes ending with code blocks. + Improve default template to use a typst template. + Factor out definitions and typst template into partials. + Properly escape backslash and quote inside double quotes. + Update tests.
2023-03-26Support typst as a pdf-engine.John MacFarlane
2023-03-25Add typst writer.John MacFarlane
See #8713.
2023-03-23T.P.App.CommandLineOptions: don't lowercase arg to `--from`/`--read`Albert Krewinkel
This prevented users to use custom writers with uppercase characters in their filenames. Format-normalization, including lower-casing of format identifiers, happens during format parsing.
2023-03-22Org reader: Allow zero width space as an escape characterChristian Christiansen
Allow the character U+200B to be used as an escape character as described in the Org-mode documentation https://orgmode.org/manual/Escape-Character.html Closes issue #8716.
2023-03-22DocBook reader: handle "book" for xref referencesAndres Freund
This also adds a test xref to book and part. See also 4ea0508e6 / #8712.
2023-03-21DocBook reader: handle `<part>`.John MacFarlane
Closes #8712.
2023-03-20T.P.Format: add new function `formatFromFilePaths` [API Change] (#8710)Albert Krewinkel
* T.P.Format: export `formatFromFilePaths` [API change] * Lua: add function `pandoc.format.from_path` * Update lua-filters.md * The old T.P.App.FormatHeuristics module has been removed. This is an alternative to #8693.
2023-03-20HTML reader: fix behavior with `-native_spans-raw_html`.John MacFarlane
Previously with this configuration, `<span>`s were not treated as inline elements at all. Closes #8711.
2023-03-20HTML writer: Remove redundant `nubOrd`.John MacFarlane
Now that we're doing `nubOrd` on classes at the end (when changing pandoc attributes to HTML attributes), we don't need to do it here.
2023-03-20Remove superfluous import.John MacFarlane
2023-03-20HTML writer: avoid duplicate classes.John MacFarlane
Closes #8705.
2023-03-17Docx writer: include abstract title.John MacFarlane
Closes #8702. Uses localized term for abstract.
2023-03-15HTML writer: use img element instead of embed for .svg.gz...John MacFarlane
and .png.gz etc. Closes #8699.
2023-03-14HTML writer footnotes changes:John MacFarlane
When `--reference-location=section` or `=block`, use an `aside` element for the notes rather than a `section`. When `--reference-location=section`, include the `aside` element inside the section element, rather than outside. (In slide shows, this option causes footnotes on a slide to be displayed at the bottom of the slide.) Closes #8695.
2023-03-14Remove confusing comment.John MacFarlane
2023-03-14Markdown writer: use implicit figures if there's a caption but no alt.Albert Krewinkel
Closes: #8689
2023-03-13Jira reader: add panel title as nested divAlbert Krewinkel
The title of a jira panel is added in a nested div as the first element of the div panel. Fixes: #8681
2023-03-10LaTeX writer: Add Chinese to Babel languages.John MacFarlane
2023-03-08Ms writer: fix handling of Figure.John MacFarlane
The Ms writer was never updated to handle the new Figure element now produced by the markdown reader. See #8660.