Commit graph

15484 commits

Author SHA1 Message Date
Albert Krewinkel
9d268e56ed
ConTeXt writer: unify link handling (#8096)
Autolinks, i.e. links with content that's the same as the linked URL,
are now marked with the `\url` command. All other links, both internal
and external, are created with the `\goto` command, leading to shorter,
slightly more idiomatic code. As before, autolinks can still be styled
via `\setupurl`, other links via `\setupinteraction`.
2022-06-04 21:49:53 -07:00
Albert Krewinkel
cc2849ccd0
Docx writer: prevent crashing when handling invalid tables
Tables with different numbers of cells per row would sometimes crash
pandoc. This fix prevents this by cutting off overlong rows.

Fixes: #8102
2022-06-05 00:00:51 +02:00
Albert Krewinkel
461566aa80
stack.yaml: fix pandoc-lua-marshal version 2022-06-03 11:20:43 +02:00
Albert Krewinkel
15f91964b3
Require pandoc-lua-marshal 0.1.6
Fixes: #8101
2022-06-03 10:29:01 +02: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
John MacFarlane
e8be78f91a Fix treatment of extensions for \input in LaTeX reader.
Previously we required a `.tex` extension, but TeX
allows any extension for `\input` (as opposed to `\include`).

Closes #8092.
2022-06-01 09:07:47 -07:00
Albert Krewinkel
4c2d03e96c
Fix LaTeX tests for tables with colspans 2022-06-01 11:32:55 +02:00
Albert Krewinkel
30b3e0a9d6
LaTeX writer: fix width of multicolumn cells.
Cells spanning multiple columns must be given an explicit width,
calculated from the table properties.

Fixes: #8090
2022-06-01 11:04:31 +02:00
John MacFarlane
9aff86143e Require skylighting 0.12.3.1 and update tests. 2022-05-31 19:49:27 -07:00
John MacFarlane
bd13077ce0 JATS reader: support edition in references.
Closes #8087.
Note: we strip off any non-digits, since CSL wants "4" rather
than "4th ed."
2022-05-31 12:01:15 -07:00
Brian Leung
ae8ed408b0
Org reader: support line selection in INCLUDE directives. (#8060) 2022-05-20 09:46:16 +02:00
John MacFarlane
ed054b4c74 Add tex_math_dollars to gfm default extensions. 2022-05-19 16:36:21 -07:00
John MacFarlane
4cbf4f6489 Beamer: allow containsverbatim as alternative to fragile.
Closes #8080.
2022-05-19 09:56:57 -07:00
John MacFarlane
b8fb79b5c0 ICML writer: support custom-style attribute on Table.
Closes #8079.
2022-05-18 09:55:22 -07:00
Cezary Drożak
6ea83c185c
Remove "m." subdomain from Wikipedia link (#8076) 2022-05-17 08:19:05 -07:00
Albert Krewinkel
9c29d840ff
LaTeX template: fix links-as-notes
The redefinition of `\href` when using `links-as-notes` must happen
after the hyperref package has been loaded.

Fixes: #8077
2022-05-17 16:12:53 +02:00
John MacFarlane
6eb77586b4 Docx writer: add w:lang to rPr for Span and Div with lang attribute.
So that Word can know that "Apfel" is not a spelling error.
Closes #8026.
2022-05-16 17:56:43 -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
1906ae0548 Asciidoc writer: fix underline.
We were rendering it as `+++text+++`; this is now changed to
`[.underline]#text#`.  See comment at
<https://github.com/jgm/pandoc/issues/8070#issuecomment-1126883824>.
2022-05-15 14:30:30 -07:00
Jaehwang Jung
9c85933b38
Allow environment variable interpolation in highlight-style in defaults files (#8073) 2022-05-14 15:17:41 -07:00
Frerich Raabe
b888a8c77e
Improved reading <xref> elements in DocBook files (#8065)
<xref> elements can also be used to link to <figure> elements. Alas, the
DocBook reader was not aware of this and thus generated a link text
which just said 'figure_title'.

https://tdg.docbook.org/tdg/4.5/figure.html explains that <figure>
elements can contain <title> elements, so let's try to use that if it is
available.
2022-05-11 19:07:03 -07:00
John MacFarlane
b0195b7ef4 Allow environment variable interpolation in pdf-engine...
in defaults files.  Note that pdf-engine can take an absolute
path, so this is useful.

See #8061.
2022-05-11 09:15:26 -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
Albert Krewinkel
843eeae13d
JATS template: include particles, prefix, suffix in names 2022-05-01 13:02:53 +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
c05f95773d Update manfilter for greater portability.
The tables in our man pages were not rendering correctly
with mandoc, now used by default with macOS. mandoc doesn't
allow man formatting inside table cells.

For maximal portability, we now render the tables in plain
format and include them as code blocks in the man page.

Closes #8045.
2022-04-27 10:02:37 -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
Albert Krewinkel
3f354ce4b8
JATS template: unconditionally include permissions element
Fixes a bug that caused license information to be omitted when no copyright
information was provided.

Fixes: #8040
2022-04-26 17:48:27 +02:00
John MacFarlane
4c485fbf41 nightly: use ghcup instead of haskell/actions 2022-04-24 22:52:03 -07:00
dependabot[bot]
955cb1fbc9
Bump haskell/actions from 1 to 2 (#8039)
Bumps [haskell/actions](https://github.com/haskell/actions) from 1 to 2.
- [Release notes](https://github.com/haskell/actions/releases)
- [Commits](https://github.com/haskell/actions/compare/v1...v2)

---
updated-dependencies:
- dependency-name: haskell/actions
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-24 22:47:58 -07:00
John MacFarlane
16f0316fba Add tsv (tab separated values) as an input format.
We us ethe simple spec at
<https://www.iana.org/assignments/media-types/text/tab-separated-values>.

API change: Text.Pandoc.Readers.CSV now exports `readTSV`.

Internal change:  In Text.Pandoc.CSV, CSVOptions has changed
so that csvQuote takes a Maybe value.

Closes #7974.
2022-04-24 12:25:04 -07:00
Hos Es
b1990b0657
LaTeX template: Fix <200c> character rendering (#8036)
Renamed `\textormath` to `\TextOrMath`.
2022-04-23 11:38:47 +02:00
John MacFarlane
ef69474a69 Markdown writer: disable soft wrapping when hard_line_breaks enabled.
We were already doing this for `markdown`; this commit does
the same thing for `markua` and `commonmark` and `gfm`.

Closes #8035.
2022-04-22 17:20:21 -07:00
John MacFarlane
281e2599dc RIS reader: make parser more forgiving.
Allow blank lines after entries.

Allow entries with no space after the `-`, provided they
just have a newline, e.g. `DB -\n`.

Closes #8034.
2022-04-22 10:59:07 -07: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
ec27946869 LaTeX reader: support \includesvg.
Closes #8027.
2022-04-19 13:01:12 -07:00
John MacFarlane
6dc692bc5f Fix compiler warnings from last commit. 2022-04-18 15:19:21 -07:00
John MacFarlane
6a041a1b75 Don't replace links with empty spans in TOC.
This was a performance enhancement which probably isn't
too significant.  Closes #8020.

Note that, with this change, T.P.Shared.deLink isn't used
anywhere in the code base; perhaps we should deprecate it
(or remove it, but this would be an API change).
2022-04-18 14:22:31 -07:00
John MacFarlane
990eb85dc7 Fix 2.18 release date in changelog.
Closes #8023.
2022-04-17 13:14:57 -07:00
Albert Krewinkel
e1dc292a0c
MANUAL: remove spurious backtick. 2022-04-13 11:40:18 +02:00
John MacFarlane
dc03399cc3 Add 'nightly' flag.
This causes a `-nightly-COMPILEDATE` suffix to be added the
the output of `--version`.

This is used in the nightly CI builds.

Closes #8016.
2022-04-12 18:03:26 -07:00
John MacFarlane
f460936528 Revert "Add 'nightly' flag and build with this for nightlies."
This reverts commit f81f5a2090.
2022-04-12 10:06:02 -07:00
John MacFarlane
ebad679107 Revert "Add CPP to avoid warning with nightly flag disabled."
This reverts commit 30f4f85f91.
2022-04-12 10:05:59 -07:00
John MacFarlane
98034e8673 Revert "Nightly builds: ensure that data files are baked in."
This reverts commit a2818e97eb.
2022-04-12 10:05:24 -07:00
John MacFarlane
a2818e97eb Nightly builds: ensure that data files are baked in.
It seems that stack is replacing ALL flag settings rather
than overriding just one with `--flag`?

This should address #8016 but we await testing after
tonight's nightly is built.
2022-04-12 09:19:01 -07:00