Commit graph

1377 commits

Author SHA1 Message Date
John MacFarlane
529eb696dc LaTeX reader: Support squared, cubed, tothe in siunitx.
Closes #6657.
2020-09-02 11:06:26 -07:00
Albert Krewinkel
3c07b1d9b6
Fix tests for skylighting 0.10 2020-08-31 21:22:03 +02:00
John MacFarlane
93e3d463fd Docx writer: separate adjacent tables.
Word combines adjacent tables, so to prevent this we insert
an empty paragraph between two adjacent tables.

Closes #4315.
2020-08-24 09:31:39 -07:00
Laurent P. René de Cotret
482a2e5079
[Latex Reader] Fixing issues with \multirow and \multicolumn table cells (#6608)
* Added test to replicate (#6596)

* Table cell reader not consuming spaces correctly (#6596)

* Prevented wrong nesting of \multicolumn and \multirow table cells (#6603)

* Parse empty table cells (#6603)

* Support full prototype for multirow macro (#6603)

Closes #6603
2020-08-15 11:40:10 -07:00
Emerson Harkin
6cfb31bbe2
Change SIRange to SIrange (#6617) 2020-08-14 11:30:17 -07:00
Laurent P. René de Cotret
499fc11fca
[Latex Reader] Table cell parser not consuming spaces correctly (#6597)
* Added test to replicate (#6596)

* Table cell reader not consuming spaces correctly (#6596)
2020-08-07 22:45:47 -07:00
Albert Krewinkel
6b08a37bbd
Org writer: don't force blank line after headers
Closes: #6554
2020-07-31 16:04:18 +02:00
Emerson Harkin
1b8f161198
Minimal support for SIRange in LaTeX reader (#6418)
Add support for `\SIRange{firstnumber}{secondnumber}{unit}` provided by siunitx.

An en-dash is used instead of localized "to".
2020-07-23 16:47:32 -07:00
Laurent P. René de Cotret
8c3b5dd3ae
Col-span and row-span in LaTeX reader (#6470)
Add multirow and multicolumn support in LaTex reader.
Partially addresses #6311.
2020-07-23 11:23:21 -07:00
John MacFarlane
a0e3172a0b Further improvements to ams theorem support, and a test.
See #1608.
2020-07-23 11:11:28 -07:00
John MacFarlane
1e84178431 Docx writer: support --number-sections.
Closes #1413.
2020-07-22 11:53:31 -07:00
John MacFarlane
942e3ee1f9 RST reader: fix csv tables with multiline cells.
Closes #6549.
2020-07-21 10:20:15 -07:00
John MacFarlane
d6b7b1dc77 Remove use of cmark-gfm for commonmark/gfm rendering.
Instead rely on the markdown writer with appropriate extensions.

Export writeCommonMark variant from Markdown writer.
This changes a few small things in rendering markdown,
e.g. w/r/t requiring backslashes before spaces inside
super/subscripts.
2020-07-19 22:51:59 -07:00
John MacFarlane
8ede05161f
Merge pull request #6495 from tarleb/html5-figure-accessiblity
HTML writer: improve alt-text/caption handling for HTML5
2020-07-19 11:24:54 -07:00
Albert Krewinkel
36fede2b02
Jira writer: keep image caption as alt attribute
Fixes #6529
2020-07-17 16:02:40 +02:00
John MacFarlane
06d834caaa Use selnolig to selectively suppress ligatures with lualatex.
Closes #6534
2020-07-15 13:28:44 -07:00
John MacFarlane
c3b170be1c
Merge pull request #6513 from brisad/master
Escape starting periods in ms writer code blocks
2020-07-12 17:02:06 -07:00
Michael Hoffmann
09ea10e2b1 Escape starting periods in ms writer code blocks
If a line of ms code block output starts with a period (.), it should
be prepended by '\&' so that it is not interpreted as a roff command.

Fixes #6505
2020-07-08 23:52:28 +02:00
Nikolay Yakimov
48cef91d18 [Docx Reader] Refactor/update smushInlines 2020-07-07 09:04:38 +03:00
John MacFarlane
804e8eeed2 Revert "Ipnyb: allow lossless round-tripping of markdown cell content."
This reverts commit efbc205031.
2020-07-02 09:03:56 -07:00
Albert Krewinkel
b894de6426
HTML writer: improve alt-text/caption handling for HTML5
Screen readers read an image's `alt` attribute and the figure caption,
both of which come from the same source in pandoc. The figure caption is
hidden from screen readers with the `aria-hidden` attribute. This
improves accessibility.

For HTML4, where `aria-hidden` is not allowed, pandoc still uses an
empty `alt` attribute to avoid duplicate contents.

Closes: #6491
2020-07-01 14:54:52 +02:00
Albert Krewinkel
ccf9889c2c
Org reader: respect tables-excluding export setting
Tables can be removed from the final document with the `#+OPTION:
|:nil` export setting.
2020-07-01 09:28:24 +02:00
Albert Krewinkel
d6711bd7d9
Org reader: respect export setting disabling footnotes
Footnotes can be removed from the final document with the `#+OPTION:
f:nil` export setting.
2020-06-30 22:30:15 +02:00
John MacFarlane
efbc205031 Ipnyb: allow lossless round-tripping of markdown cell content.
The reader now parses the contents of the markdown cell to a Pandoc
structure, but *also* stores the raw markdown in a `source`
attribute on the cell Div.  When we convert back to markdown,
this attribute is stripped off and the original source is used.
When we convert to other formats, the attribute is usually
ignored (though it will come through in HTML as a `data-source`
attribute, not unhelpfully).

I'll note some potential drawbacks of this approach:

- It makes it impossible to use pandoc to clean up or
  change the contents of markdown cells, e.g.
  going from `+smart` to `-smart`.

- There may be formats where the addition of the `source`
  attribute is problematic.  I can't think of any, though.

Closes #5408.
2020-06-30 12:32:44 -07:00
Albert Krewinkel
7c207c3051
Org reader: respect export setting which disables entities
MathML-like entities, e.g., `\alpha`, can be disabled with the
`#+OPTION: e:nil` export setting.
2020-06-30 11:39:32 +02:00
Albert Krewinkel
5ef315cc6d
Org reader: keep unknown keyword lines as raw org
The lines of unknown keywords, like `#+SOMEWORD: value` are no longer
read as metadata, but kept as raw `org` blocks. This ensures that more
information is retained when round-tripping org-mode files;
additionally, this change makes it possible to support non-standard org
extensions via filters.
2020-06-29 21:19:34 +02:00
Albert Krewinkel
90ac70c79c
Org reader: unify keyword handling
Handling of export settings and other keywords (like `#+LINK`) has been
combined and unified.
2020-06-29 20:53:25 +02:00
Albert Krewinkel
1480606174
Org reader: support LATEX_HEADER_EXTRA and HTML_HEAD_EXTRA settings
These export settings are treated like their non-extra counterparts,
i.e., the values are added to the `header-includes` metadata list.
2020-06-29 17:04:29 +02:00
Albert Krewinkel
d17b257c89
Org reader: allow multiple #+SUBTITLE export settings
The values of all lines are read as inlines and collected in the
`subtitle` metadata field.
2020-06-29 17:03:33 +02:00
Albert Krewinkel
19175af811
JATS reader: parse abstract element into metadata field of same name (#6482)
Closes: #6480
2020-06-28 10:35:50 -07:00
Albert Krewinkel
d2d5eb8a99
Org reader: read #+INSTITUTE values as text with markup
The value is stored in the `institute` metadata field and used in the
default beamer presentation template.
2020-06-28 19:25:57 +02:00
Albert Krewinkel
b7a8620b43
Org tests: group export settings test for Org reader 2020-06-28 19:25:57 +02:00
Albert Krewinkel
e3a6d651e1
Org reader: update behavior of author, keywords export settings
The behavior of the `#+AUTHOR` and `#+KEYWORD` export settings has
changed: Org now allows multiple such lines and adds a space between the
contents of each line. Pandoc now always parses these settings as meta
inlines; setting values are no longer treated as comma-separated lists.
Note that a Lua filter can be used to restore the previous behavior.
2020-06-28 18:01:30 +02:00
Albert Krewinkel
8dce28d949
Org reader: read description lines as inlines
`#+DESCRIPTION` lines are treated as text with markup. If multiple such
lines are given, then all lines are read and separated by soft
linebreaks.

Closes: #6485
2020-06-27 09:11:00 +02:00
Albert Krewinkel
9e6e9a7221
Org reader: honor tex export option
The `tex` export option can be set with `#+OPTION: tex:nil` and allows
three settings:

 - `t` causes LaTeX fragments to be parsed as TeX or added as raw TeX,
 - `nil` removes all LaTeX fragments from the document, and
 - `verbatim` treats LaTeX as text.

The default is `t`.

Closes: #4070
2020-06-25 20:31:33 +02:00
John MacFarlane
9b7282bb0f LaTeX reader: Retain the Div around tables with attributes.
We'll need this to store table attributes until all writers
are adjusted to react to attributes on the Table element.
2020-06-23 11:12:40 -07:00
John MacFarlane
90b2c5a5e4 Add test for #6481. 2020-06-23 08:27:19 -07:00
John MacFarlane
7f8105159c Handle native Underline in Powerpoint writer.
(Instead of old Span with underline class.
Spans with `underline` will no longer be rendered
as underlined text.)
2020-06-22 17:56:28 -07:00
John MacFarlane
b1561d8e47 Use native Underline instead of Span in Jira 2020-06-22 17:55:57 -07:00
Albert Krewinkel
064303e2c9
Jira writer: always escape braces
Braces are now always escaped, even within words or when surrounded by
whitespace. Jira and Confluence treat braces specially.

Package jira-wiki-markup must be version 1.3.2 or later.

Fixes: #6478
2020-06-22 16:30:11 +02:00
Albert Krewinkel
f5d7d41cbd
Recognize images with uppercase extensions
Fixes: #6472
2020-06-20 18:14:18 +02:00
Mathieu Boespflug
bbf04df900
Docbook reader: implement <procedure> (#6442)
A `<procedure>` contains a sequence of `<step>`'s, or `<substeps>`
that themselves contain `<step>`'s.
2020-06-14 10:45:52 -07:00
Mathieu Boespflug
12a35dd0d0
Docbook: map <simplesect> to unnumbered section (#6436)
A <simplesect> is a section like any other, except that it never
contains an subsection, and is typically rendered unnumbered.
2020-06-14 10:40:00 -07:00
John MacFarlane
f6dfacf9d6 Add "summary" to list of block-level HTML tags.
Closes #6385.  (The summary element needs to be the first
child of details and should not be enclosed by p tags.)

NOTE:  you need to include a blank line before the closing
`</details>`, if you want the last part of the content to
be parsed as a paragraph.
2020-05-20 07:45:14 -07:00
Lila
c04800305e
Propagate (DY)LD_LIBRARY_PATH in tests (#6376) 2020-05-18 22:46:14 -07:00
Lila
f4185fcef0
Use CSS in favor of <br> for display math (#6372)
Some CSS to ensure that display math is
displayed centered and on a new line is now included
in the default HTML-based templates; this may be
overridden if the user wants a different behavior.
2020-05-18 22:45:44 -07:00
John MacFarlane
5a20cc07dd Docx writer: enable column and row bands for tables.
This change will not have any effect with the default style.
However, it enables users to use a style (via a reference.docx)
that turns on row and/or column bands.

Closes #6371.
2020-05-16 15:50:59 -07:00
John MacFarlane
be9e93d4ae LaTeX writer: create hypertarget for links with identifier.
Closes #6360.
2020-05-12 14:37:07 -07:00
John MacFarlane
46179d5b3e Use latest skylighting.
This adds `aria-hidden="true"` to the empty a elements, which
helps people who use screen readers.
2020-05-12 14:37:07 -07:00
Albert Krewinkel
9c76c52e9b
Lua: fix regression in package searcher
This caused `require 'module'` to fail for third party packages.

Fixes: #6361
2020-05-12 17:10:30 +02:00