Commit graph

15140 commits

Author SHA1 Message Date
John MacFarlane
a8be26b43d Add pandoc-lua-marshal-0.1.3.1 to stack.yaml 2022-01-14 10:07:01 -08:00
Albert Krewinkel
96db10c8d7 Require pandoc-lua-marshal 0.1.3.1
Fixes a problem with `List.includes` and `List.find` that caused a Lua
stackoverflow and subsequent program crash.

Fixes: #7831
2022-01-14 11:05:19 +01:00
Kolen Cheung
ed2ab2e2b0
HTML template: load header-includes before math (#7833)
MathJax expect the config comes before loading the MathJax script.
This change of order allows one to config MathJax via header-includes,
which loads before the MathJax script.

This potentially is a breaking change.

However, the only kind math supported by pandoc that is configurable
seems to be katex, and according to src/Text/Pandoc/Writers/HTML.hs
the way it is configured is hard-coded (katex doesn't seem to offer
MathJax style config that is independent of loading katex.)
So it seems it is safe to change this order without breaking
others' documents.

c.f. #2750
2022-01-13 20:31:32 -08:00
John MacFarlane
0d1ba3dce3 When reading defaults file, stop at a line ....
This line signals the end of a YAML document.
This restores the behavior we got with HsYaml.
yaml complains about content past this line.
See https://github.com/jgm/pandoc/issues/4627#issuecomment-1012438765
2022-01-13 11:58:33 -08:00
John MacFarlane
09b773e1ad Use ghc4pandoc 9.0.2 image for faster linux builds. 2022-01-13 08:43:40 -08:00
John MacFarlane
e532bceb8a Add test for #7826 notes-after-punctuation. 2022-01-13 08:41:05 -08:00
John MacFarlane
a9f6ed2f97 Fix 'make trypandoc' target. 2022-01-12 22:33:56 -08:00
John MacFarlane
4fdbb30a97 Citeproc: allow notes-after-punctuation to work...
with numerical styles that use superscripts (e.g.
american-medical-association.csl), as well as with
note styles. The default setting of `notes-after-punctuation`
is true for note styles and false otherwise.

This restores a behavior of pandoc-citeproc that wasn't properly
carried over to Citeproc.

Closes #7826.
See also jgm/pandoc-citeproc#384.
2022-01-12 21:08:28 -08:00
John MacFarlane
fcbd016423 Changelog formatting. 2022-01-12 18:57:33 -08:00
John MacFarlane
dc34c734f7 Changelog formatting fix. 2022-01-12 18:52:01 -08:00
John MacFarlane
d8deb8b6c3 Fix typo in changelog. 2022-01-12 18:46:29 -08:00
John MacFarlane
1c2bf24476 Fix typo in changelog. 2022-01-12 18:44:07 -08:00
John MacFarlane
c0584bc699 Use ghc4pandoc 8.10.7 docker image for linux builds.
9.2.1 still fails without special treatment.
2022-01-12 18:01:42 -08:00
John MacFarlane
d3e99421b0 Use ghc 9.2.1 docker image for deb pkg. 2022-01-12 17:43:15 -08:00
John MacFarlane
1a6fad9fbd Update manual date and man page. 2022-01-12 15:12:53 -08:00
John MacFarlane
95adabd3cc Bump version to 2.17. 2022-01-12 15:12:36 -08:00
John MacFarlane
1df35aa938 Update README.md. 2022-01-12 15:11:51 -08:00
John MacFarlane
913ee3bd4c Update AUTHORS.md. 2022-01-12 15:07:58 -08:00
John MacFarlane
8b1f26b18f Changelog improvements. 2022-01-12 15:05:25 -08:00
Albert Krewinkel
9e7aa421fc Add minor changelog updates. 2022-01-12 22:21:06 +01:00
John MacFarlane
da355ad194 Update changelog.md (provisional). 2022-01-12 11:02:43 -08:00
John MacFarlane
c9d309d84b Use commonmark-extensions 0.2.3. 2022-01-12 09:58:45 -08:00
John MacFarlane
ed3690afcd Use ipynb 0.2. 2022-01-12 00:09:16 -08:00
John MacFarlane
a416a2f243 Use citeproc 0.6.0.1. 2022-01-11 23:52:57 -08:00
John MacFarlane
a30b29624e Use latest texmath (0.12.4). 2022-01-11 19:19:27 -08:00
Michael Hoffmann
5001fd3f4d
Docx writer: Handle bullets correctly in lists by not reusing numIds (#7822)
Make sure that we only create one bullet per list item in docx.  In
particular, when a div is a list item, its contained paragraphs will
now no longer wrongly get individual bullets.

This is accomplished by making sure that for each list, we only use
the associated numId once.  Any repeated use would add incorrect
bullets to the document.

Closes #7689
2022-01-11 15:48:41 -08:00
John MacFarlane
a25e79b5be DocBook reader: Collapse internal spaces in literal...
and other similar tags.  This seems to accord with what
the docbook toolchain does.

Closes #7821.
2022-01-10 11:47:55 -08:00
John MacFarlane
7bf1191686 HTML writer: don't break attributes values when wrapping. 2022-01-10 10:40:49 -08:00
John MacFarlane
6f739cdb4d Fix regression: allow blank lines in HTML attributes.
The commit 7a9832166e
had the effect that blank lines would be collapsed
in HTML attributes.

We also roll back a change that collapsed multiple
spaces into one.
2022-01-10 10:29:25 -08:00
John MacFarlane
dd706bc49c Minor reformatting of cabal file 2022-01-10 10:13:13 -08:00
Martin Fischer
a0f9467b90 doc/jats.md: link JATS 2022-01-10 10:45:52 +01:00
Lucas Viana
fd43e0693f
Docs: document fancy_lists in doc/org.md (#7820)
Document the changes introduced in #7812
2022-01-09 15:58:53 -08:00
John MacFarlane
33da5833de Update commits for dev dependencies, allow text 2.0. 2022-01-09 15:30:22 -08:00
John MacFarlane
d9e9f119c5 pandoc.cabal: add a test file to extra-source-files. 2022-01-09 14:27:54 -08:00
John MacFarlane
c4522124aa make check: check for unreleased dependencies 2022-01-09 14:27:24 -08:00
John MacFarlane
1dab8e57d3 Use dev version of citeproc. 2022-01-09 12:09:01 -08:00
John MacFarlane
beaf09a758 Add manual section on EPUB styling. 2022-01-09 11:41:46 -08:00
John MacFarlane
ceb463e36e EPUB template improvements.
Include abstract in default template.

Also ensure that the essential styles needed by
pandoc (`styles.html` partial) are included in the
templates.  This is important for correct formatting
of CSL bibliographies.

Note that much of the styling in `styles.html` will
be ignored for EPUB, because of the conditional on
`document-css`, but if it is desired, you can set
the `document-css` variable.
2022-01-09 11:33:47 -08:00
John MacFarlane
2e50c8d137 Improve abstract in HTML template.
* Add localized title "abstract", unless `abstract-title` variable
  is set.
* Add `abstract-title` div to abstract CSS.
* Move abstract CSS out of CSL conditional.
* Ensure that abstract is aligned left but indented on all sides.
* Use smaller font for abstract.

Improves #7588.
2022-01-09 10:56:28 -08:00
Jannik Buhr
d908e31fe6
Add abstract to default html template (#7588) 2022-01-09 10:30:10 -08:00
Lucas Viana
fb91a91615 Org reader: support alphabetical (fancy) lists
This adds support for alphabetical lists in org by enabling the
extension Ext_fancy_lists, mimicking the behaviour of Org Mode when
org-list-allow-alphabetical is enabled.

Enabling Ext_fancy_lists will also make Pandoc differentiate between the
delimiters of ordered lists (periods or closing parentheses). Org does
this differentiation by default when exporting to some formats (e.g.
plain text) but does not in others (e.g. html and latex), so I decided
to copy Pandoc's markdown reader behaviour.
2022-01-09 09:39:27 -08:00
John MacFarlane
66636c89b0 Org writer: fix list items starting with a code block...
or other non-paragraph content.

Closes #7810.
2022-01-08 23:21:15 -08:00
John MacFarlane
61968047e4 Avoid blank lines after tight sublists in org, haddock.
T.P.Writers.Shared `endsWithPlain` now returns True if
the list ends with a list which ends with a Plain.

See #7810.
2022-01-08 23:11:08 -08:00
John MacFarlane
1b7bdb1016 RST writer: avoid extra blank line after empty list item.
See #7810 (2).
2022-01-08 21:24:41 -08:00
John MacFarlane
8736fe11ee Org writer: fix extra blank line inserted after empty list item.
Addresses issue 2 from #7810.
2022-01-08 21:22:21 -08:00
John MacFarlane
252211bd27 Org writer: don't add blank line before lists.
The code to do this was apparently copied over from the RST
writer, but these blank lines aren't necessary or desirable
in org.  See #7810 comment 3.
2022-01-08 19:39:26 -08:00
John MacFarlane
a6741bd555 writeMedia: unescape percent-encoding in creating file path.
Closes #7819 (problem with spaces in image filenames when creating
PDFs).
2022-01-08 19:10:46 -08:00
John MacFarlane
2b51f54e19 toLocatorMap: store keys as lowercase.
We want to do a case-insensitive comparison when parsing
locators, so that e.g. both `Chap.` and `chap.` work.

Previously we lowercase terms when doing the lookup,
but they weren't lowercased in the map itself, which
led to locator-detection breaking for German (where the
terms have uppercase letters).

See
https://groups.google.com/d/msgid/pandoc-discuss/1dd44886-7b79-4e5f-97ec-57b91113df36n%40googlegroups.com
2022-01-08 16:57:59 -08:00
John MacFarlane
268bec1808 Further improvements to doc/lua-filters.md. 2022-01-07 23:35:32 -08:00
John MacFarlane
95b0645276 lua-filters.doc: use header attributes, not spans. 2022-01-07 23:24:39 -08:00