Commit graph

1972 commits

Author SHA1 Message Date
Albert Krewinkel
0d19b859ce
HTML writer: use flex property for column widths
Fixes: #8232
2022-08-18 11:20:42 +02:00
Albert Krewinkel
f294acff38
Org reader: treat "abstract" block as metadata
A block of type "abstract" is assumed to define the document's abstract.
It is transferred from the main text to the metadata.

Closes: #8204
2022-08-17 16:49:37 +02:00
Albert Krewinkel
90d8205e17
Org template: add abstract from metadata as block of type "abstract"
See #8204.
2022-08-17 16:40:54 +02:00
Albert Krewinkel
81e31ee637
LaTeX writer: add label to tables that have an identifier
Tables with an identifier are marked with a `\label`. A caption is
always included in this case, even if the caption is empty.

Closes: #8219
2022-08-17 12:39:07 +02:00
Albert Krewinkel
18484cbf47
LaTeX writer: fix widths of multicolumn cells
Fixes: #8218
2022-08-07 22:10:15 +02:00
Albert Krewinkel
fc3b9e763f
Use dev version of gridtables.
Closes: #8216
2022-08-05 13:48:30 +02:00
John MacFarlane
473c3f22ec Improve default CSS for task lists.
This ensures that there is a space between the checkbox
and the following content and that subsequent content lines up.

Closes #8151.

Supersedes and closes #8163.
2022-08-03 09:51:21 -07:00
Albert Krewinkel
0d7f80c87f
HTML reader: allow sublists that are not marked as items.
The HTML standard requires all list items to be marked with a `<li>`
tag, but some tools fail to do so for sublists. The reader now accepts
these unwrapped lists as sublists.

Closes: #8150
2022-08-03 15:00:35 +02:00
Albert Krewinkel
b306f2e1fd
Org reader: add missing / to Windows file URI; fixes prev commit 2022-08-03 09:51:13 +02:00
Albert Krewinkel
516c827d61
Org reader: recognize absolute paths on Windows
Fixes: #8201
2022-08-02 23:49:10 +02:00
Albert Krewinkel
0e8f424d9e HTML: use CSS flex boxes for columns.
This allows to render an arbitrary number of columns, while the previous
approach assumed exactly two columns.
2022-08-01 10:12:13 -07:00
Albert Krewinkel
7a4afce60c Markdown reader: allow special span classes in any position 2022-08-01 10:03:48 -07:00
Albert Krewinkel
f4a7c0b799 Markdown reader: allow more attributes in special spans
Spans with "smallcaps" as the first class are converted to *SmallCaps*
elements. While previously no other classes or attributes were allowed,
additional classes, attributes, and an identifier are not permitted and
kept in a *SmallCaps* wrapping *Span* element.

The same change is applied to underline spans, where the first class
must be either "ul" or "underline".

Closes: #4102
2022-08-01 10:03:48 -07:00
John MacFarlane
82bf0cb9d4 Fix tests for d2bd9abc4d 2022-07-31 11:03:17 -07:00
Albert Krewinkel
c015c35a8a
Support rowspans and colspans in grid tables (#8202)
* Add tests for zero-width and fullwidth chars in grid tables

* T.P.Parsing: simplify `gridTableWith'`, `gridTableWith` [API Change]
  The functions `gridTableWith` and `gridTableWith'` no longer takes a
  boolean argument that toggles whether a table head should be parsed:
  both, tables with heads and without heads, are always accepted now.

* Support colspans, rowspans, and multirow headers in grid tables.

  Grid tables in Markdown, reStructuredText, and Org can now contain cells
  spanning over multiple columns and/or multiple rows; table headers
  containing multiple rows are supported as well.

Note: the markdown writer does not yet support these more complex grid
table features.
2022-07-30 08:56:44 -07:00
Albert Krewinkel
de5620b04d
Add tests for zero-width and fullwidth chars in grid tables 2022-07-30 11:27:14 +02:00
John MacFarlane
f637ccd3bf MediaWiki reader: allow HTML comment after row start.
Closes #8110.
2022-07-28 11:28:02 -07:00
John MacFarlane
5c3423f2e2 DokuWiki reader: support latex plugin and math.
The `tex_math_dollars` extension is now supported for `dokuwiki`
(but off by default).

Content inside `<latex>...</latex>` is parsed as raw LaTeX inline,
and inside `<LATEX>..</LATEX>` as raw LaTeX block.

In addition, this commit changes the behavior of `<php>...</php>` so
that instead of producing a code block, it produces raw HTML
with `<?php ... ?>`.

Closes #8178.
2022-07-28 11:28:02 -07:00
John MacFarlane
ac7fa3da4d HTML writer: Allow "spanlike" classes to be combined.
Previously classes like "underline" and "marked" had to
be the first class in a span in order for the span to be
interpreted as a "ul" or "mark" element.  This commit allows
these special classes to be "stacked," e.g.
`[test]{.mark .underline}`; in addition, the special classes are no
longer required to come first in the list of classes.

See #8194 for context.
2022-07-25 11:55:48 -07:00
John MacFarlane
b7bc980089 Test for #5795: remove redundant 'dfn' classes 2022-07-25 11:01:11 -07:00
John MacFarlane
e90ce8e1ab Unescape characters in \lstinline inside \passthrough.
For full motivation, see #1629 ; this improves on
99e24cf183.

Closes #8179.
2022-07-18 19:52:33 +02:00
John MacFarlane
98fb8521a7 RST writer: Fix missing spaces with nested inlines.
Previously spaces around links inside italics were omitted.

Closes #8182.
2022-07-16 15:49:45 +02:00
John MacFarlane
c950a28191 ms template: redefine rather than removing .CH macro.
This responds to feedback in #8175.
2022-07-12 00:03:51 +02:00
John MacFarlane
9d256aa19b Use latest dev citeproc 2022-07-11 23:40:13 +02:00
John MacFarlane
56051c8ac3 RTF reader: support \nosupersub.
Closes #8170.
2022-07-07 22:56:29 +02:00
Elliot Bobrow
7fdc01ac0d
Use formatCode from #7525 in HTML and MediaWiki (#8162)
Move formatting from inside inline code elements to the outside in order
to retain formatting.
2022-07-06 22:10:24 +02:00
John MacFarlane
befa9d1301 Ensure that Nulls are ignored in creating slide shows.
Also ensure that Nulls are ignored in sectionification
by `makeSections`.

Closes #8155.
2022-07-04 14:34:14 +02:00
John MacFarlane
5df94da831 Remove Muse reader round-trip tests.
These are nondeterministic and have repeatedly failed
on strange edge cases.

The Muse reader's maintainer has not been active, and
it isn't worth developer time to chase down these problems.
2022-07-03 01:19:40 +02:00
black-desk
2abf56f508
Remove extra soft break for tasklist (#8142)
Browser will display the extra newline character between checkbox and
text as a space, which make tasklist items cannot be aligned.

I just remove it.
2022-06-23 09:59:11 -07:00
John MacFarlane
3876f15b45 Ensure that metadata values w/o trailing newlines are...
parsed as inlines, as the manual states.

Previously, they were parsed as inlines if they would
otherwise have been a single Plain or Para, but otherwise
left unchanged.  This led to some quirky results (e.g. #8143).
We now use the general function `blocksToInlines` from T.P.Shared.
2022-06-22 23:09:51 -07:00
Albert Krewinkel
f49bee5c31
ConTeXt writer: support complex table structures. (#8116)
The following table feature are now supported in ConTeXt:

- colspans,
- rowspans,
- multiple bodies,
- row headers, and
- multi-row table head and foot.

The wrapping `placetable` environment is also given a `reference` option
with the table identifier, enabling referencing of the table from within
the document.
2022-06-21 10:22:34 -07:00
Elliot Bobrow
f317ec41a1
LaTeX: Handle formatted text inside code inline (#8129)
Add `formatCode` function to Text.Pandoc.Shared [API change].

Use this in the LaTeX reader so that e.g.
`\texttt{\textbf{bold code}}` is parsed as `Strong [Code ("",[],[]) "bold code"]`.
2022-06-20 12:18:05 -07:00
John MacFarlane
b263f38304 LaTeX reader: improve mathEnvWith.
When converting e.g. an align environment to an aligned environment
inside a Math element, we need to include a newline before the
`\end{aligned}`, since the previous line might end in a comment.

Closes #8122.
2022-06-13 23:14:51 -06:00
Albert Krewinkel
2200b9c8ff
TikiWiki: support underlined text 2022-06-10 11:29:00 +02:00
Albert Krewinkel
e5c41f11de
ConTeXt writer: use "sectionlevel" environment for headings (#8106)
The document hierarchy is now conveyed using the
`\startsectionlevel`/`\stopsectionlevel` by default. This makes it easy
to include pandoc-generated snippets in documents at arbitrary levels.
The more semantic environments "chapter", "section", "subsection", etc.
are used if the `--top-level-division` command line parameter is set to
a non-default value.

Closes: #5539
2022-06-06 09:24:28 -07:00
Albert Krewinkel
7844300414
Muse tests: do no try to roundtrip strings containing \DEL char
Fixes: #8108
2022-06-06 16:14:07 +02:00
Albert Krewinkel
9d268e56ed
ConTeXt writer: unify link handling (#8096)
Autolinks, i.e. links with content that's the same as the linked URL,
are now marked with the `\url` command. All other links, both internal
and external, are created with the `\goto` command, leading to shorter,
slightly more idiomatic code. As before, autolinks can still be styled
via `\setupurl`, other links via `\setupinteraction`.
2022-06-04 21:49:53 -07:00
John MacFarlane
ad845c0376 makeSections: don't make a section for a div with class "fragments".
Closes #8098.
2022-06-02 09:01:18 -07:00
John MacFarlane
98a1b921e3 HTML writer: fix bug with --number-offset.
This formerly caused section divs to be produced, even
when `--section-divs` was not specified.  Closes #8097.
2022-06-02 08:46:26 -07:00
John MacFarlane
f53977e295 LaTeX writer: Improve grouping with autocites.
Closes #8088.
2022-06-01 23:24:49 -07:00
Albert Krewinkel
4c2d03e96c
Fix LaTeX tests for tables with colspans 2022-06-01 11:32:55 +02:00
John MacFarlane
9aff86143e Require skylighting 0.12.3.1 and update tests. 2022-05-31 19:49:27 -07:00
Brian Leung
ae8ed408b0
Org reader: support line selection in INCLUDE directives. (#8060) 2022-05-20 09:46:16 +02:00
John MacFarlane
b8fb79b5c0 ICML writer: support custom-style attribute on Table.
Closes #8079.
2022-05-18 09:55:22 -07:00
John MacFarlane
3df55b4a4a AsciiDoc writer: fix commas in link text.
Commas in link text trigger interpretation of attributes.
To block this, we replace them with numeric entities.

Closes #8070.
2022-05-16 16:45:05 -07:00
Frerich Raabe
b888a8c77e
Improved reading <xref> elements in DocBook files (#8065)
<xref> elements can also be used to link to <figure> elements. Alas, the
DocBook reader was not aware of this and thus generated a link text
which just said 'figure_title'.

https://tdg.docbook.org/tdg/4.5/figure.html explains that <figure>
elements can contain <title> elements, so let's try to use that if it is
available.
2022-05-11 19:07:03 -07:00
John MacFarlane
0b2adf9617 RIS reader: get right order of names.
Closes #8055.
2022-05-03 10:44:09 -07:00
Brian Leung
67daf96bdd
Org reader: allow attrs for Org tables. (#8049)
Tables with attributes are no longer wrapped in Div elements;
attributes are added directly to the table element.
2022-05-02 17:25:57 +02:00
John MacFarlane
c1105e6b06 HTML writer: avoid doubled style attribute...
when height and width are added to style because of an image,
but the image already has a style attribute.

Closes #8047.
2022-04-28 15:49:20 -07:00
John MacFarlane
50c9848c34 HTML writer: Add 'footnotes' identifier to footnotes section.
Closes #8043.
2022-04-26 13:03:02 -07:00