Commit Graph
14395 Commits
Author SHA1 Message Date
John MacFarlane 2cf971cf56 docx writer: Remove rsids from settings.docx.
Word will add these when revisions are made.  But it's
pointless to start out with a set of them.
2021-05-15 10:54:05 -07:00
John MacFarlane bf73a15197 MANUAL: note that institute variable works for HTML-based slides. 2021-05-15 09:58:43 -07:00
Thomas Hodgson 97a0ee23bc HTML-based slide shows: add support for institute (#7289)
Add institute variable (string or list) to HTML-based slide formats.
2021-05-15 09:56:48 -07:00
Albert Krewinkel 0794862aac HTML writer: parse <header> as a Div
HTML5 `<header>` elements are treated like `<div>` elements.
2021-05-15 16:46:02 +02:00
Albert Krewinkel 46baf6659d MANUAL: add info about YAML escape sequences, link to spec.
Closes: #7152
2021-05-14 22:48:40 +02:00
Albert Krewinkel 013e4a3164 HTML reader: keep h1 tags as normal headers (#7274)
The tags `<title>` and `<h1 class="title">` often contain the same
information, so the latter was dropped from the document. However, as
this can lead to loss of information, the heading is now always
retained.

Use `--shift-heading-level-by=-1` to turn the `<h1>` into the document
title, or a filter to restore the previous behavior.

Closes: #2293
2021-05-14 12:31:24 -07:00
John MacFarlane 247b1cd18b Update changelog. 2021-05-14 10:20:53 -07:00
John MacFarlane 76a4e7127b Beamer writer: support exampleblock and alertblock.
A block will be rendered as an exampleblock if the heading
has class `example` and alertblock if it has class `alert`.

Closes #7278.
2021-05-14 10:09:46 -07:00
Albert Krewinkel b9b1ec586a changelog.md: fix Markdown, marking <p> as code. 2021-05-14 17:53:27 +02:00
John MacFarlane 0e5b840c2a LaTeX template: Move CSL macro defs before header-includes.
This allows them to be overriden by header-includes.
Closes #7286.
2021-05-14 08:48:59 -07:00
Albert Krewinkel 3ec5726c9b Docx writer: fix alignment for cells.
This fixes a regression introduced with the in the colspan/rowspan
changes that caused column alignments to be ignored. The column
alignment is used only if a default alignment is specified at the cell
level; otherwise the cell-level alignment takes precedence.
2021-05-14 16:49:19 +02:00
Albert Krewinkel 17d96404f5 Docx writer: allow multirow table headers 2021-05-14 16:19:20 +02:00
Albert Krewinkel 875f8f3654 HTML reader: don't fail on unmatched closing "script" tag.
Prevent the reader from crashing if the HTML input contains an unmatched
closing `</script>` tag.

Fixes: #7282
2021-05-14 12:13:40 +02:00
John MacFarlane 3f09f53459 Implement curly-brace syntax for Markdown citation keys.
The change provides a way to use citation keys that contain
special characters not usable with the standard citation
key syntax.  Example: `@{foo_bar{x}'}` for the key `foo_bar{x}`.
Closes #6026.

The change requires adding a new parameter to the `citeKey`
parser from Text.Pandoc.Parsing [API change].

Markdown reader: recognize @{..} syntax for citatinos.

Markdown writer:  use @{..} syntax for citations when needed.

Update manual with curly-brace syntax for citations.

Closes #6026.
2021-05-13 21:59:32 -07:00
John MacFarlane c46482bfc3 Update manual date and man page. 2021-05-13 14:11:15 -07:00
John MacFarlane b243bf0f44 Bump to 2.14 and update changelog. 2021-05-13 14:10:47 -07:00
John MacFarlane 697d149733 Use released citeproc 0.4. 2021-05-12 14:35:06 -07:00
John MacFarlane 84fa901fd6 Use texmath 0.12.3. 2021-05-12 12:52:04 -07:00
John MacFarlane edca1d1656 Plain writer: handle superscript unicode minus.
Closes #7276.  Note:  currently we still get unwanted
white space around the minus; this needs to be addressed
with a change in texmath.
2021-05-12 11:12:27 -07:00
John MacFarlane 0217ae2a4f Hande 'annote' field in bibtex/biblatex writer.
Closes #7266.
2021-05-12 11:05:55 -07:00
John MacFarlane 46309319ef Fix source position reporting for YAML bibliographies.
Closes #7273.
2021-05-12 06:01:13 -06:00
John MacFarlane 5eb7ad7d1e Improve integration of settings from reference.docx.
The settings we can carry over from a reference.docx are
autoHyphenation, consecutiveHyphenLimit, hyphenationZone,
doNotHyphenateCap, evenAndOddHeaders, and proofState.

Previously this was implemented in a buggy way, so that the
reference doc's values AND the new values were included.

This change allows users to create a reference.docx that
sets w:proofState for spelling or grammar to "dirty,"
so that spell/grammar checking will be triggered on the
generated docx.

Closes #1209.
2021-05-11 22:31:38 -06:00
John MacFarlane a66e50840b T.P.XML.Light - add Eq, Ord instances...
for Content, Element, Attr, CDataKind.
[API change]
2021-05-11 09:01:36 -06:00
John MacFarlane 2bd5d0cafb LaTeX writer: better handling of line breaks in simple tables.
Now we also handle the case where they're embedded in other
elements, e.g. spans. Closes #7272.
2021-05-11 07:52:05 -06:00
nuew ff7176de80 epub Writer: Fix belongs-to-collection XML id choice (#7267)
The epub writer previously used the same XML id for both the book
identifier and the epub collection. This causes an error on epubcheck.
2021-05-10 09:26:32 -06:00
John MacFarlane ba4ec8c5c0 latex template: use non-starred names for xcolor color names.
This should make svgnames and x11names work properly.
Closes #6109.
2021-05-10 09:21:27 -06:00
John MacFarlane 83c83d4589 CI: install numa library.
See failure at https://github.com/jgm/pandoc/runs/2541449722
2021-05-10 08:45:43 -06:00
John MacFarlane 2a2e08d823 RST reader: seek include files in the directory...
...of the file containing the include directive, as
RST requires.

Closes #6632.
2021-05-09 19:11:35 -06:00
John MacFarlane b2398cd747 Org reader: Resolve org includes relative to ...
...the directory containing the file containing the
INCLUDE directive.  Closes #5501.
2021-05-09 19:11:35 -06:00
John MacFarlane f69f1101e6 Update doc/using-the-pandoc-api.md for new reader types. 2021-05-09 19:11:34 -06:00
John MacFarlane 41a3ac9da9 RST reader: use insertIncludedFile from T.P.Parsing...
instead of reproducing much of its code.
2021-05-09 19:11:34 -06:00
John MacFarlane 05ea507bd7 T.P.Parsing: improve include file functions.
Remove old `insertIncludedFileF`. [API change]
Give `insertIncludedFile` a more general type, allowing it
to be used where `insertIncludedFileF` was.
2021-05-09 19:11:34 -06:00
John MacFarlane 6e45607f99 Change reader types, allowing better tracking of source positions.
Previously, when multiple file arguments were provided, pandoc
simply concatenated them and passed the contents to the readers,
which took a Text argument.

As a result, the readers had no way of knowing which file
was the source of any particular bit of text.  This meant that
we couldn't report accurate source positions on errors or
include accurate source positions as attributes in the AST.
More seriously, it meant that we couldn't resolve resource
paths relative to the files containing them
(see e.g. #5501, #6632, #6384, #3752).

Add Text.Pandoc.Sources (exported module), with a `Sources` type
and a `ToSources` class.  A `Sources` wraps a list of `(SourcePos,
Text)` pairs. [API change] A parsec `Stream` instance is provided for
`Sources`.  The module also exports versions of parsec's `satisfy` and
other Char parsers that track source positions accurately from a
`Sources` stream (or any instance of the new `UpdateSourcePos` class).

Text.Pandoc.Parsing now exports these modified Char parsers instead of
the ones parsec provides.  Modified parsers to use a `Sources` as stream
[API change].

The readers that previously took a `Text` argument have been
modified to take any instance of `ToSources`. So, they may still
be used with a `Text`, but they can also be used with a `Sources`
object.

In Text.Pandoc.Error, modified the constructor PandocParsecError
to take a `Sources` rather than a `Text` as first argument,
so parse error locations can be accurately reported.

T.P.Error: showPos, do not print "-" as source name.
2021-05-09 19:11:34 -06:00
Albert Krewinkel 295d93e96b ConTeXt writer: support blank lines in line blocks.
Fixes: #6564

Thanks to @denismaier.
2021-05-07 17:17:47 +02:00
Albert Krewinkel 8357b835d9 App: allow tabs expansion even if file-scope is used
Tabs in plain-text inputs are now handled correctly, even if the
`--file-scope` flag is used.

Closes: #6709
2021-05-05 19:09:21 +02:00
Albert Krewinkel ddbf83f62c Docx writer: support colspans and rowspans in tables
See: #6315
2021-05-01 18:52:24 +02:00
Albert Krewinkel 3da919e35d Add new internal module Text.Pandoc.Writers.GridTable 2021-05-01 18:52:24 +02:00
John MacFarlane 56a0d874c7 Add instructions for installing pandoc-types before compiling filter. 2021-04-30 08:35:52 -07:00
tecosaur 6b16f3bb0d Org writer: inline latex envs need newlines (#7259)
Closes #7252

As specified in https://orgmode.org/manual/LaTeX-fragments.html, an
inline \begin{}...\end{} LaTeX block must start on a new line.
2021-04-30 10:23:28 +02:00
Albert Krewinkel dc0e482da7 INSTALL: add note that parallel installations should be avoided. (#7147)
Closes: #6865
2021-04-29 18:54:36 -07:00
Florian Kohrt 96d384ac9e Support toc-title in revealjs (#7171)
* Support toc-title in revealjs
* Add semantic HTML "nav" tag

Closes #7170.

As with default.html5
2021-04-29 18:49:17 -07:00
badumont b9b22e3ce4 Update default.latex (#7234)
Fix bad vertical spacing after the bibliography.
2021-04-29 18:47:23 -07:00
mbrackeantidot b6a65445e1 Docx reader: add handling of vml image objects (jgm#4735) (#7257)
They represent images, the same way as other images in vml format.
2021-04-29 09:11:44 -07:00
John MacFarlane d14c5f94df Further improvements in smart quotes.
Improves heuristic for detection of an "open double quote."
Closes #2103.
2021-04-29 08:48:49 -07:00
John MacFarlane 80e2e88287 Smarter smart quotes.
Treat a leading " with no closing " as a left curly quote.
This supports the practice, in fiction, of continuing
paragraphs quoting the same speaker without an end quote.
It also helps with quotes that break over lines in line
blocks.

Closes #7216.
2021-04-28 23:32:37 -07:00
Julien Dutant 8fe7e8dd5c list of figures before list of tables in LaTeX and ConTeXt templates (#7235) 2021-04-28 19:06:13 -07:00
Albert Krewinkel 85f379e474 JATS writer: use either styled-content or named-content for spans.
If the element has a content-type attribute, or at least one class, then
that value is used as `content-type` and the span is put inside a
`<named-content>` element. Otherwise a `<styled-content>` element is
used instead.

Closes: #7211
2021-04-28 22:21:34 +02:00
Albert Krewinkel 0921b82d98 Docx writer: autoset table width if no column has an explicit width. 2021-04-27 13:27:20 +02:00
John MacFarlane d0d8bb9818 Add unicode-collation to list of libraries developed to support pandoc. 2021-04-26 09:29:47 -07:00
Charanjit Singh b159daa8e9 docs/org.md: Add note about default export behavior of org-mode in (#7238)
Since it seem to be a common source of confusion, this commit adds a note in
org-mode documentation referring users to consult org-mode's export
documentation when they find themselves in a pinch.
2021-04-26 11:54:25 +02:00