Commit Graph
2127 Commits
Author SHA1 Message Date
John MacFarlane 52d352a5ae Update #8764 command test for latest change to HTML table parser (#8634). 2023-06-24 11:21:51 -07:00
Ruqi f257c97170 Update TableBody RowHeadColumns caculation: change from max to min (#8634)
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-24 09:18:03 -07:00
John MacFarlane 5246f02f0b Improve tests for fillMediaBag/extractMedia.
Ensure that the current directory is not changed up if a test fails,
and fix messages for the assertion failures.
2023-06-23 10:54:59 -07:00
John MacFarlane fe62da61df Add tests for fillMediaBag/extractMedia. 2023-06-23 10:36:33 -07:00
ech0 7b8b8f802d Retain image query parameters in dokuwiki reader (#8887)
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-22 11:00:47 -07:00
Stephen Altamirano 83b69ead81 Textile reader: Add support for link references (#8706)
Textile supports what it calls "link alias", which are analogous to
Markdown's reference-style links.
2023-06-22 10:53:15 -07:00
Albert Krewinkel cce347eaf5 LaTeX reader: support alt text on images. (#8745)
Closes: #8743
2023-06-22 10:46:56 -07:00
John MacFarlane 725ec09a10 Make implicit_figures work again in commonmark reader.
Support for this (introduced in #6350) disappeared when we made an
architectural change.
2023-06-19 11:18:30 -07:00
John MacFarlane 1c3742149a Update tests for #8903 2023-06-17 09:28:35 -04:00
Noah Malmed 76952d0b06 Add footer and multiple body parsing to JATS table reader (#8795)
Closes #8765.
2023-06-08 09:58:28 -07:00
John MacFarlane 7b4eb40737 Parse references title from ref-list in JATS reader.
Closes #8365.
2023-06-07 13:36:58 -07:00
John MacFarlane 4f440583a8 JATS writer: include title in ref-list.
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-07 13:18:20 -07:00
John MacFarlane 46a4e24d6b Add typst reader.
New module Text.Pandoc.Readers.Typst [API change].
2023-06-06 16:08:14 -07:00
Noah Malmed 7f24c65b86 Improve title and label parsing in the JATS reader (#8840)
Closes #8718.
2023-06-06 11:03:52 -07:00
John MacFarlane 2c8de4c129 Typst writer: use #footnote for notes.
Closes #8893.
2023-06-05 16:07:36 -07:00
Stephan Meijer 9e8e016076 Rename test/docx/block_quotes_parse_indent.native for consistency 2023-05-09 11:41:42 -07:00
John MacFarlane 05ad84a0c6 LaTeX writer: better fix for colspecs for multicolumn table.
Improves on the last commit; closes #8831.
2023-05-08 13:09:04 -07:00
Stephan Meijer c97db9af26 Introduce support for Intense Quote in Docx conversion
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-08 08:44:29 -07:00
John MacFarlane 65346fa6b1 Use latest texmath 2023-05-06 11:03:51 -07:00
Albert Krewinkel f9bbbf6f40 Markdown reader: disallow escaping of ~ and " in markdown_strict
This matches the behavior of the legacy `markdown.pl` as well as what is
described in the manual.

Fixes: #8777
2023-05-04 11:52:04 +02:00
Albert Krewinkel 05a23af76d LaTeX reader: ignore args to column type in \multicolumn.
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-04 11:36:10 +02:00
Michael Stahl 737446f33d Writers.OpenDocument: handle row header column cells as header cells
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-01 20:55:37 -07:00
Michael Stahl 2881c12740 Writers.OpenDocument: handle row header column cells as ordinary cells
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-01 20:55:37 -07:00
Michael Stahl 013351f602 Writers.OpenDocument: fix invalid text:p inside text:p from meta
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-05-01 20:39:47 -07:00
Michael Stahl f3e1d33ea0 Writers.ODT: stop validator complaints by producing ODF 1.3
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-28 12:17:22 -07:00
John MacFarlane 826b8912ad Typst writer: use <..> for labels, create internal links.
Internal links to labels are now supported.
2023-04-05 12:57:25 -07:00
Noah Malmed 0353e11e27 Add rowspan, colspan and alignment to cells in jats table reader (#8726)
Partially addresses #8408
2023-04-05 12:37:22 -07:00
wgevaertandWout Gevaert fd0f7332ed Remove links from inside links in mediawiki writer (#8739)
Co-authored-by: Wout Gevaert <wout@wikibase.nl>
2023-04-05 08:03:46 -07:00
Albert Krewinkel b8c7678fcf Org reader: treat #+NAME as synonym for #+LABEL.
Closes: #8578
2023-04-05 14:50:52 +02:00
Albert Krewinkel ef16a88cde Org reader: require abstract environment to use lowercase 2023-04-01 17:46:08 +02:00
Albert Krewinkel 832d66e8a3 styles.html: fix task-list styling in reveal.js
Fixes: #8731
2023-03-29 11:15:47 -07:00
Albert Krewinkel 96c2ad7d49 HTML writer: use first paragraph in task item as checkbox label.
Closes: #8729
2023-03-29 19:13:39 +02:00
John MacFarlane ae8ba75c0a Typst writer: fix alignment issue in lists.
It's an aesthetic issue only; the first line had an
extra space indent after the list marker.
2023-03-27 18:52:57 -07:00
John MacFarlane fd85560b84 Typst: Use customized term instead of custom macro for def lists. 2023-03-27 10:47:15 -07:00
John MacFarlane cf6a742710 Typst writer: support column aligns in tables. 2023-03-27 10:47:15 -07:00
John MacFarlane 4780b4760d More Typst writer improvements.
+ 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-26 21:32:31 -07:00
John MacFarlane cd6b3bde62 Typst writer improvements.
+ 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-26 19:02:05 -07:00
John MacFarlane 9919d62df2 Moved a misplaced command test. 2023-03-26 11:09:58 -07:00
John MacFarlane 9edf965712 Add typst writer.
See #8713.
2023-03-25 22:05:52 -07:00
Christian Christiansen fe720dd0c6 Org reader: Allow zero width space as an escape character
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-22 18:29:53 +01:00
Andres Freund 821cf3df4d DocBook reader: handle "book" for xref references
This also adds a test xref to book and part. See also 4ea0508e6 / #8712.
2023-03-22 08:32:48 -07:00
John MacFarlane b5d54f7f38 HTML reader: fix behavior with -native_spans-raw_html.
Previously with this configuration, `<span>`s were not treated
as inline elements at all.

Closes #8711.
2023-03-20 19:42:43 -07:00
John MacFarlane 9a9946e1c4 Update latex writer tests for change to default template. 2023-03-20 11:41:22 -07:00
John MacFarlane 7f1a8f9cee Update docx golden tests for style changes. 2023-03-17 22:27:52 -07:00
John MacFarlane 80e750aa5e Docx writer: include abstract title.
Closes #8702.

Uses localized term for abstract.
2023-03-17 20:06:17 -07:00
John MacFarlane 1bfab1d11e HTML writer footnotes changes:
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-14 21:49:05 -07:00
Albert Krewinkel effca7f7cf Markdown writer: use implicit figures if there's a caption but no alt.
Closes: #8689
2023-03-14 07:22:11 +01:00
Albert Krewinkel 51750d6d9a Jira reader: add panel title as nested div
The title of a jira panel is added in a nested div as the first element
of the div panel.

Fixes: #8681
2023-03-13 17:31:12 +01:00
John MacFarlane 118dd92232 JATS reader: avoid generating duplicate figure captions.
Closes #8669.
2023-03-05 12:44:44 -08:00
John MacFarlane 2dd645e26e DocBook reader: parse figure as a Figure element in the AST.
Closes #8668.
2023-03-05 12:23:32 -08:00