Commit graph

813 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Albert Krewinkel
8689d9c0d6
Fix tests after changes to JATS template 2022-04-26 19:32:31 +02:00
John MacFarlane
f9b2ca7465 HTML writer: do not include the deprecated doc-endnote role.
doc-endnote was deprecated in DPUB-ARIA 1.1.
Closes #8030.
2022-04-21 08:07:37 -07:00
John MacFarlane
f3cfeba3ef Don't parse inline notes with blank lines inside.
Previously we parsed them but discarded part of the content.
Closes #8028.
2022-04-20 13:34:41 -07:00
John MacFarlane
356ece29cb Commonmark/markua/gfm writers: avoid excessive indentation...
on bullet lists.  They are now nested by 2 spaces instead of 4.

See #8011.
2022-04-08 20:52:37 -07:00
John MacFarlane
813f3d5dd4 Shared.taskListItemToAscii: handle asciidoctor's characters.
Asciidoctor uses different unicode characters for task
lists; we should recognize them too and be able to convert
them to ascii task lists in formats like gfm.

Closes #8011.
2022-04-08 18:20:56 -07:00
John MacFarlane
1b97846be2 Fix regression with ascii_identifiers and Turkish undotted i.
Closes #8003.
2022-04-01 10:41:33 -07:00
John MacFarlane
5f0bfd41a8 LaTeX writer: add () after booktabs rules.
These commands take optional arguments with () and [],
which can lead to problems if the content of the table
cell begins with these characters.

Closes #8001.
2022-03-30 10:07:09 -07:00
John MacFarlane
a9498a1568 LaTeX writer: support page,trim,clip attributes on images.
These are actually supported by `\includegraphics`, though
this is not well documented. See
https://tex.stackexchange.com/questions/7938/pdflatex-includegraphics-and-multi-page-pdf-files

Partially addresses #7181.
2022-03-29 09:03:28 -07:00
John MacFarlane
6217fd0976 JATS writer: Fix handling of CSL variable 'page'.
Not 'pages' as we had before.  It should go to 'lpage' and 'rpage',
not 'page-range'.  See
https://jats.nlm.nih.gov/archiving/tag-library/1.1/element/page-range.html

Fixed some mistakes in test #7042.
2022-03-28 17:04:10 -07:00
John MacFarlane
35350fac85 JATS writer: avoid doubled ref-list element.
Previously when generating JATS with the `element_citations`
extension enabled, the references were put in a doubly-nested
ref-list element (`<ref-list><ref-list>...`).  This is now fixed.

Closes #7990.
2022-03-27 09:32:55 -07:00
Albert Krewinkel
4394fdf59c
JATS writer: encode author "others" as <etal/>
Citeproc adopted the BibTeX convention to use the author name "others"
when there are additional authors that are not named. JATS uses the
`<etal>` element for this.
2022-03-22 15:09:14 +01:00
John MacFarlane
54f6e1be9b Remove native_divs from allowed gfm extensions.
This allows `<div>` to be suppressed using `-raw_html`.
Previously `native_divs` was enabled but could
not be suppressed, because it was not in the list of
available extensions for commonmark-based formats.

Closes #7965.
2022-03-14 12:45:45 -07:00
John MacFarlane
581c94913f LaTeX reader: allow inline groups starting with \bgroup.
Closes #7953.
2022-03-09 17:53:00 -08:00
John MacFarlane
9b5ec100e5 Markdown writer: update escaping rules for \.
We now escape `\` only if `raw_tex` is enabled or
it is followed by a non-alphanumeric.
2022-03-07 10:46:07 -08:00
John MacFarlane
97c4f3f237 LaTeX reader: rudimentary support for vbox.
Closes #7939.
2022-02-27 23:24:30 -08:00
John MacFarlane
7f6021d7b2 Markdown writer: don't produce redundant header identifier...
when the `gfm_auto_identifiers` extension is set.

Closes #7941.
2022-02-26 11:37:46 -08:00
John MacFarlane
8ceea05c75 Markdown reader: remove restriction on identifiers...
so they no longer need to begin with a letter. Closes #7920.
2022-02-23 10:04:15 -08:00
Dimitris Apostolou
2f521081ad
Fix typos (#7934) 2022-02-22 09:05:39 -08:00
John MacFarlane
6fe8014a2c LaTeX reader: Handle \label and \ref for footnotes.
Closes #7930.
2022-02-19 11:55:46 -08:00
John MacFarlane
dc534caf7a Add tests for #7919.
Together with the update in commonmark-hs and previous changes,
this closes #7919.
2022-02-13 17:43:30 -08:00