Commit graph

7248 commits

Author SHA1 Message Date
Albert Krewinkel
36fede2b02
Jira writer: keep image caption as alt attribute
Fixes #6529
2020-07-17 16:02:40 +02:00
John MacFarlane
302543af08 Docbook reader: remove misleading comment...
suggesting that releaseinfo is handled. It isn't.
2020-07-14 10:10:43 -07:00
John MacFarlane
2cc0d68ca0
Merge pull request #6527 from lierdakil/fix-6514
[Docx Reader] Only use bCs/iCs on runs with rtl or cs property
2020-07-13 10:57:04 -07:00
Nikolay Yakimov
22c373370c [Docx Reader] Only use bCs/iCs on runs with rtl or cs property
Fixes #6514
2020-07-13 19:50:06 +03: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
John MacFarlane
7be86b148e
Merge pull request #6509 from lierdakil/docx-smush-inlines-refactor
[Docx Reader] Refactor/update Text.Pandoc.Readers.Docx.Combine.smushInlines
2020-07-12 16:55:35 -07:00
John MacFarlane
9ae792b0d4 Ms writer: fix code highlighting with blank lines.
Previously blank lines were simply omitted from highligted code.
2020-07-12 14:51:21 -07:00
John MacFarlane
e3217c3862 RST reader: fix spurious newlines in some attributes from directives. 2020-07-12 14:42:41 -07:00
John MacFarlane
37e68a818b RST reader: avoid extra newline in included code blocks. 2020-07-12 13:53:10 -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
f09e18753b [Docx Reader] Use null instead of isEmpty in Readers.Docx.Combine 2020-07-07 14:50:26 +03:00
Nikolay Yakimov
5a1e1db526 [Docx Reader] Remove unused LANGUAGE from Readers.Docx.Combine 2020-07-07 13:23:14 +03:00
Nikolay Yakimov
1ae4d76d42 [Docx Reader] Remove no-op stack/unstackInlines in Readers.Docx.Combine 2020-07-07 12:28:38 +03:00
Nikolay Yakimov
27465638a1 [Docx Reader] Get rid of unused NullModifier in Readers.Docx.Combine 2020-07-07 11:32:17 +03: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
John MacFarlane
9afa192c3a Revert "Ipynb reader: fix duplication of 'source' attribute."
This reverts commit 2d009366ce.
2020-07-02 09:03:26 -07:00
John MacFarlane
2d009366ce Ipynb reader: fix duplication of 'source' attribute.
See #5408.
2020-07-02 09:01:06 -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
John MacFarlane
f1a5295082
Merge pull request #6328 from lierdakil/defaults-meta-parse
Unify defaults metadata and markdown metadata parsers
2020-06-29 12:38:49 -07: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
Nikolay Yakimov
42e7f1e976 Clean up T.P.R.Metadata 2020-06-29 17:07:12 +03:00
Nikolay Yakimov
34e54d3020 Handle errors in yamlToMeta 2020-06-29 17:06:29 +03:00
Nikolay Yakimov
f26923b9e4 Unify defaults and markdown metadata parsers 2020-06-29 17:06:29 +03:00
Nikolay Yakimov
11dc9f84f5
Remove obsolete RelaxedPolyRec extension (#6487) 2020-06-28 22:35:33 -07:00
John MacFarlane
8a1690dec1 PDF: all verbose output now goes to stderr, not stdout.
Closes #6483.
2020-06-28 12:11:23 -07: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
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
54f6faa10f
Org reader: refactor export setting handling 2020-06-28 15:41:56 +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
52ac585967 Remove redundant pattern match in pptx writer. 2020-06-23 13:04:42 -07: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
ee782ccfec Markdown reader: Don't require blank line after grid table.
This fixes #6481, allowing grid tables to be enclosed
in fenced divs with no intervening blank lines.
2020-06-23 08:24:45 -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
John MacFarlane
76fc51f2ba Use --enable-local-file-access in invoking wkhtmltopdf.
wkhtmltopdf changed in recent versions to require this for
access to local files.

This fixes PDF via HTML5 with `--css`.

Closes #6474.
2020-06-22 16:33:20 -07:00
Albert Krewinkel
f5d7d41cbd
Recognize images with uppercase extensions
Fixes: #6472
2020-06-20 18:14:18 +02:00
John MacFarlane
9d0506e404 LaTeX writer: escape ^ specially for listings.
Closes #6460.
2020-06-17 10:12:55 -07:00
John MacFarlane
a8b3117e04 RST reader: pass arbitrary attributes through in code blocks.
Exceptions: name (which becomes the id), class (which becomes the
classes), and number-lines (which is treated specially to fit
with pandoc highlighting).

Closes #6465.
2020-06-17 09:57:56 -07:00
Michael Reed
bf95282436
Fix MIME type for TrueType fonts in EPUBs (#6464)
Per the EPUB 3.2 spec, "application/x-font-truetype" is no longer a
valid identifier for TrueType (.ttf) fonts [1]. This fixes warnings when
validating pandoc-generated EPUBs using `epubcheck` [2].

References [3].

[1]: https://www.w3.org/publishing/epub3/epub-spec.html#sec-core-media-types
[2]: https://github.com/w3c/epubcheck
2020-06-17 09:15:50 -07: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