Commit Graph
858 Commits
Author SHA1 Message Date
Albert Krewinkel da2d7ce6f5 ConTeXt writer: add support for unlisted, unnumbered headings
Closes: #8486
2022-12-16 13:48:57 +01:00
John MacFarlane 1698af8885 Textile reader: handle empty paragraphs.
Also, if attributes are added explicitly to a paragraph,
put it in a Div with the attributes.

Closes #8487.
2022-12-15 12:38:36 -08:00
Albert Krewinkel e0e6087145 Shared: change defaultBlocksSeparator to PARAGRAPH SEPARATOR
This Unicode char (U+2029) is intended as a semantic separator between
paragraphs; it is cleaner and less intrusive than the pilcrow sign that
we used before. This also changes the default `sep` value used in the
`pandoc.utils.blocks_to_inlines` Lua function.
2022-12-08 00:24:07 +01:00
John MacFarlane 513bdef40b DocBook writer: Fix position of textobject.
It is a child of `inlinemediaobject`, not `imageobject`.

Add regression tests for #8437.

Closes #8437.
2022-11-29 10:16:41 -08:00
John MacFarlane fe799eea91 AsciiDoc writer: in link text, only replace commas...
...with entities when they're in Str elements.  If a link
contains an image, it may have attributes, and the commas
there should not be converted.

See #8437, #8070.
2022-11-29 09:56:41 -08:00
vkraven b6622c07b6 Textile Reader:
- Adding a Parser to look for ordered list start attribute numbers if any
 - Add command test for ordered list start attributes (#2465)
 - Cleanup and formatting
2022-11-28 19:30:20 -07:00
Albert Krewinkel fb5da4a8c6 Fix command test #7743 for Windows 2022-11-23 10:01:46 +01:00
John MacFarlane 4b4771f062 Docx reader: Support parsing of highlighted text. 2022-11-19 13:28:10 -08:00
John MacFarlane 144bf90ab9 LaTeX writer: Use soul instead of ulem for strikeout, underline.
This handles things like hyphenation, line breaks, and nonbreaking
spaces better.

Closes #8411.
2022-11-19 12:28:41 -08:00
Wout Gevaert 0b003de6f1 Change the Mediawiki writer to use the 'new' table structure
Now MediaWiki tables can use colspan and rowspan :D
2022-11-11 10:12:07 -08:00
John MacFarlane 91436ebbf4 T.P.Writers.Shared toTableOfContents: handle nested Divs better.
Closes #8402.
2022-10-27 12:46:59 -07:00
John MacFarlane 400d4e1387 LaTeX reader: parse short table caption.
See jgm/pandoc-types#103.

This is not too useful yet, because writers don't do anything with
the short caption.
2022-10-21 11:44:12 -07:00
John MacFarlane e3fd2d5a03 Revert "HTML reader: avoid duplicating any existing identifier..."
This reverts commit e5fbddd3b6.
2022-10-18 12:51:34 -07:00
John MacFarlane ff22116426 Revert "Markdown reader: avoid duplicate ids with auto_identifiers."
This reverts commit eff82cfe4d.
2022-10-18 12:51:12 -07:00
John MacFarlane eff82cfe4d Markdown reader: avoid duplicate ids with auto_identifiers.
We previously avoided generating a duplicate with another automatically
generated identifier; now we also avoid duplicates with explicit
identifiers that occur before the header for which an identifier
is being generated.  (Collisions are still possible for identifiers
that occur after the header.)

T.P.Shared: `makeSections` is also modified so it doesn't give
bad results when the enclosing Div has a different identifier
from the header, as may now happen.
2022-10-18 12:42:12 -07:00
John MacFarlane e5fbddd3b6 HTML reader: avoid duplicating any existing identifier...
with `auto_identifiers`.

Closes #8383.
2022-10-18 09:51:33 -07:00
John MacFarlane abb7aab75f RST writer: improve inline escaping rules.
Also a small performance optimization.

Closes #8380.
2022-10-16 14:59:28 -07:00
Albert Krewinkel 7b7a7d6742 LaTeX writer: add separator line between table's body and its foot.
The writer uses features from the longtable package to define the table
foot. Furthermore, the table's bottom rule is now part of the foot,
where it previously was given as part of the body.
2022-10-06 22:07:25 +02:00
John MacFarlane b05c380f6f HTML writer: replace deprecated aria roles for bibliography entries.
`doc-biblioentry` -> `listitem`
`doc-bibliography` -> `list`

Closes #8354.
2022-10-05 11:58:50 -07:00
John MacFarlane dd07d8002f JATS writer: use <break/> for LineBreak...
in the limited contexts that accept it.

Closes #8344.
2022-10-01 17:46:13 -07:00
Albert Krewinkel 5be9052f5f [API Change] Extract Lua code into new package pandoc-lua-engine
The flag 'lua53` must now be used with that package if pandoc is to be
compiled against Lua 5.3.
2022-09-30 08:33:40 -07:00
John MacFarlane 48d0bfc675 Add --list-tables option.
[API change] Add writerListTables to WriterOptions.

RST writer: Remove sensitivity to "list-table" class in table attributes.
Instead, just check `writerListTables` in writer options.

See #4564.
2022-09-29 10:20:58 -07:00
danse c974ed0cae rST writer: list tables rendering, closes #4564
When a table is marked with a "list-table" attribute class, it will
now be rendered using the list table syntax documented here
http://docutils.sourceforge.net/docs/ref/rst/directives.html#list-table
2022-09-29 09:56:00 -07:00
John MacFarlane bcf06e7f5e HTML writer: prevent <a> inside <a>.
If a link text contains a link, we replace it with a span.
See #7585.
2022-09-28 08:34:50 -07:00
Albert Krewinkel b38292c234 LaTeX writer: do not repeat caption on headless tables
The caption of headless tables was repeated on each page that contained
part of the table. It is now made part of the "first head", i.e. the
table head that is printed only once.
2022-09-21 12:03:41 +02:00
John MacFarlane f3e9669e84 Commonmark writer: ensure that we don't have blank lines in raw HTML.
Closes #8307.
2022-09-19 12:03:03 -07:00
John MacFarlane cfbf0f096b Org reader: Allow org-ref v2 citations with & prefix.
Closes #8302.
2022-09-19 10:30:44 -07:00
John MacFarlane c0ff59c272 BibTeX parser: fix handling of % in url field.
`%` does not function as a comment character inside `url`
(where URL-encoding is common).

Commit 6fb2973a58 mistakenly
took this reassignment of `%` to be a general feature of
braced (but not quoted) BibTeX fields.

This commit restores the correct behavior of `%` in braced fields
other than `url`, and corrects the behavior of `%` in `url`
when the value is quoted.

Closes #7678 (again).
2022-09-18 19:17:48 -07:00
John MacFarlane 311a340687 Add prefixes to identifiers with --file-scope. (#8282)
This change only affects the case where `--file-scope` is used
and more than one file is specified on the command line.

In this case, identifiers will be prefixed with a string
derived from the file path, to disambiguate them. For example,
an identifier `foo` in `contents/file1.txt` will become
`contents__file1.txt__foo`.  Links will be adjusted accordingly:
if `file2.txt` links to `file1.txt#foo`, then the link will
be changed to point to `#file1.txt__foo`.  Similarly, a link
to `file1.txt` will point to `#file1.txt`.  A Div with an
identifier derived from the file path will be added around
each file's content, so that links to files will still work.

Closes #6384.

[API change]: Text.Pandoc.Shared exports `textToIdentifier`.
2022-09-18 18:11:40 -07:00
John MacFarlane 35a3fb7e83 Citeproc: Require a digit for an implicit "page" locator...
inside explicit locator syntax `{...}`.

Previously a locator specified as `{}` would be rendered
as `p.` with nothing after it.

Closes #8288.
2022-09-09 10:30:01 -07:00
John MacFarlane 86a3467ece HTML writer: only treat . . . as a slide pause in slides...
...and not in regular HTML output.
Closes #8281.
2022-09-05 09:51:59 -07:00
Albert Krewinkel 635b6e3953 Use dev version of gridtables
This allows to specify a table foot by enclosing it with part separator
lines, i.e., row separator lines consisting only of `+` and `=`
characters. E.g.:

    +------+-------+
    | Item | Price |
    +======+=======+
    | Eggs | 5£    |
    +------+-------+
    | Spam | 3£    |
    +======+=======+
    | Sum  | 8£    |
    +======+=======+

The last row, containing "Sum" and "8£", is the table foot.

Closes: #8257
2022-09-01 09:06:42 +02:00
Ruqi 8b5fb50198 Mediawiki reader: Parse table cell with attribs, to support rowspan, colspan (#8231) 2022-08-30 09:51:09 +02:00
John MacFarlane 1d92024bcb HTML, Markdown writers: filter out empty class attributes.
These should not be generated by any pandoc readers, but they
might be produced programatically. Technically that's a misuse
of the AST, but since the expectation that the classes are
nonempty strigs is not encoded in the types, it can happen. This patch
limits the damage if it does, preventing invalid markdown attributes
like `{.}` from being written.

Cloess #8251.
2022-08-27 17:30:17 -07:00
Siphalor 8670f6dc5b Markdown reader: fenced code block shortcuts with attributes (#8174)
This allows the combination of the fenced code block shortcut form with
attributes:

````
```haskell {.class #id}
```
````

The code syntax class will be combined with the attribute classes.

This syntax allows for more intuitive writing and for better compatibility
with other Markdown parsers such as GitHub or Codeberg.

Closes #8174.
2022-08-25 10:18:11 -07:00
John MacFarlane 488ad80a20 LaTeX reader: handle ## macro arguments properly.
These turn into regular `#` arguments when expanded.

Closes #8243.
2022-08-24 09:36:13 -07:00
Albert Krewinkel 16d134218b HTML writer: revert to using width property for column widths
The default `flex` and `overflow-x` properties of a column are set to
`auto`. In combination, these changes allow to get good results when
using columns with or without explicit widths.
2022-08-22 15:32:39 +02:00
Albert Krewinkel 08f1f4551c Org writer: add support for jupyter nodebook cells.
Closes: #6367
2022-08-22 12:53:58 +02:00
luz paz aff726b460 Fix typos
Found via `codespell -q 3 -S changelog.md -L bu,fo,ist,mke,multline,noes,ot,pard,pres,tabl,te,tothe`
2022-08-21 20:23:00 -07:00
Albert Krewinkel 5d66166088 Org reader: treat *emacs-jupyter* src blocks as code cells.
This improves support for notebook-like org files that are intended to be used
with emacs-jupyter package.

Closes: #8236
2022-08-21 21:53:33 +02:00
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 fc3b9e763f Use dev version of gridtables.
Closes: #8216
2022-08-05 13:48:30 +02: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 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