Commit graph

13520 commits

Author SHA1 Message Date
Christian Despres
10c6c411f9
Add Writers.Tables helper functions and types, add tests for those (#6655)
Add Writers.Tables helper functions and types, add tests for those

The Writers.Tables module contains an AnnTable type that is a pandoc
Table with added inferred information that should be enough for
writers (in particular the HTML writer) to operate on without having
to lay out the table themselves.

The toAnnTable and fromAnnTable functions in that module convert
between AnnTable and Table. In addition to producing an AnnTable with
coherent and well-formed annotations, the toAnnTable function also
normalizes its input Table like the table builder does.

Various tests ensure that toAnnTable normalizes tables exactly like
the table builder, and that its annotations are coherent.
2020-09-05 14:36:51 -07:00
John MacFarlane
3935c9c5c4 Insignificant whitespace change.
Try to expire cache for macOS CI.
2020-09-03 09:53:50 -07:00
John MacFarlane
0985e38977 CI/macOS: Fix stack invocations. 2020-09-03 09:46:59 -07:00
John MacFarlane
60910d5278 CI/macOs: Use setup-haskell to setup stack. 2020-09-03 09:42:28 -07:00
John MacFarlane
a157e1a6e0 Support numrange, numlist for siunitx.
See #6658.
2020-09-02 17:00:13 -07:00
John MacFarlane
83f0acab47 Support some missing siunitx commands. 2020-09-02 16:49:10 -07:00
John MacFarlane
321658fe4d LaTeX reader: Support siunitx \ang.
See #6658.
2020-09-02 16:16:06 -07:00
John MacFarlane
16c44cd2a9 Skip opts for \si. 2020-09-02 16:01:32 -07:00
John MacFarlane
e3e66ba47f LaTeX reader: support \si and improve other siunitx commands. 2020-09-02 15:44:36 -07:00
John MacFarlane
0a98648c1a LaTeX reader: support \num from siunitx. 2020-09-02 13:05:34 -07:00
John MacFarlane
529eb696dc LaTeX reader: Support squared, cubed, tothe in siunitx.
Closes #6657.
2020-09-02 11:06:26 -07:00
John MacFarlane
81fe8ebf36 LaTeX reader: Factored out siunitx stuff into separate module. 2020-09-02 10:10:55 -07:00
Albert Krewinkel
371a7ff34b
Remove Circle CI badge, references
CI checks run on GitHub Actions now.
2020-09-01 12:00:38 +02:00
Albert Krewinkel
1b865aaddf
stack.yaml: use skylighting 0.10 2020-08-31 22:44:00 +02:00
Albert Krewinkel
3c07b1d9b6
Fix tests for skylighting 0.10 2020-08-31 21:22:03 +02:00
John MacFarlane
613828e497 Use skylighting 0.10. 2020-08-30 22:54:36 -07:00
a-vrma
6cae8208e7
epub.css: Fix cover page selectors and add note explaining their use. (#6649) 2020-08-30 15:12:12 -07:00
John MacFarlane
8369eb67d7 release-candidate: don't build windows i386.
So far we haven't been able to figure out how to get
stack to use a 32-bit ghc.
2020-08-28 14:42:00 -07:00
John MacFarlane
c815d2f228 Travis: use all_branches: true for deploy. 2020-08-28 08:39:58 -07:00
John MacFarlane
0640c75dc7 Travis: remove deploy/on. 2020-08-27 22:33:32 -07:00
John MacFarlane
e5adec5a01 Makefile: Remove obsolete windows package build targets. 2020-08-27 18:10:21 -07:00
John MacFarlane
8d8f98fb7b Remove macos build from GitHub actions rc. 2020-08-27 18:10:21 -07:00
John MacFarlane
5e1de9cced Makefile: Fix macospkg target to fetch target from S3 artifacts. 2020-08-27 18:10:15 -07:00
John MacFarlane
42d02aa347 Add .travis.yml for macos release candidate build.
We need to build the release candidate on Travis rather
than GitHub actions, because GH has macos 10.15, and
binaries compiled on that OS will not work with 10.13.
See #6622.

This build is only triggered on rc/ branches.
2020-08-27 18:09:49 -07:00
the-solipsist
214f2f08e4 Make the setting-the-date example conditional
This makes the example a bit more realistic/valuable by checking if the metadata value "date" is already present, before changing the value.
2020-08-26 13:36:06 +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
John MacFarlane
49e810b4ed HTML writer: Fix addition of doc-biblioentry role. 2020-08-21 12:22:33 -07:00
John MacFarlane
c22b12100d Actions CI: Try cache@v2. 2020-08-15 11:49:56 -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
Albert Krewinkel
3766e03c7d
.gitignore: ignore stack.yaml.lock 2020-08-15 13:54:12 +02:00
Albert Krewinkel
333c553548
Relax version constraints for hslua, hslua-module-text
Allow `hslua-1.2.*` and `hslua-module-text-0.3.*`.
2020-08-15 13:52:37 +02:00
John MacFarlane
5734167531 Whitespace change to stack.yaml to reset macos CI cache. 2020-08-14 14:45:25 -07:00
Emerson Harkin
6cfb31bbe2
Change SIRange to SIrange (#6617) 2020-08-14 11:30:17 -07:00
John MacFarlane
e65c6b0b5d Use the smart extension when generating pandoc's man page.
See #6613.
2020-08-12 23:11:28 -07:00
John MacFarlane
c990027832 Linux rc build: use ghc-musl container.
This simplifies our build process a bit (over using
a customized alpine container).

Use new `--enable-executable-static` flag in build.

make_artifacts.sh: Fix deprecated find -perm syntax.
2020-08-11 21:33:21 -07:00
John MacFarlane
5d4932d7ef DocBook reader: Update list of block level tags.
This fixes #6610.
2020-08-11 09:45:12 -07:00
John MacFarlane
a9da64cc3a Remove fenced_code_blocks and backtick_code_blocks from...
commonmark/gfm extensions.  These shouldn't really be counted
as extensions, because they can't be disabled in commonmark.

Adjust markdown writer to check for commonmark variant in addition
to extensions.
2020-08-09 11:12:59 -07:00
John MacFarlane
a7c9a69004 MANUAL: remove lists of support extensions for markdown variants.
Instead, offer the advice to use `--list-extensions=FORMAT`.

Closes #6604.
2020-08-09 11:12:59 -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
John MacFarlane
bed62fcf17 Fix trypandoc in response to d8ad766d17 2020-08-07 09:39:23 -07:00
Albert Krewinkel
45ed1b6b1c
doc/lua-filters.md: add missing Link.title field 2020-08-07 11:27:34 +02:00
John MacFarlane
d8ad766d17 Options: Add /tex-mml-chtml.js to defaultMathJaxURL.
Previously we added this in processing command line options,
but not in processing defaults files, which was inconsistent.

Cloess #6593.
2020-08-06 14:42:26 -07:00
John MacFarlane
57417feaf4 Use commonmark >= 0.1.0.2. Closes #6589. 2020-08-05 12:58:29 -07:00
Felix Yan
48487f287f
Remove duplicated exceptions (#6591) 2020-08-05 12:12:01 -07:00
John MacFarlane
971b861ef2 Use new pandoc-citeproc, rfc5051. 2020-08-02 09:40:24 -07:00
Dmitry Volodin
eeb4c1e5b6
Fix typo in CONTRIBUTING.md (#6584)
Againt -> against
And use GitHub instead of github everywhere
2020-08-01 10:19:32 -07:00
John MacFarlane
57e29610ac Use skylighting 0.9. 2020-07-31 08:56:59 -07:00
Albert Krewinkel
6b08a37bbd
Org writer: don't force blank line after headers
Closes: #6554
2020-07-31 16:04:18 +02:00
John MacFarlane
2077739a35 Add extensions to gfm and commonmark:
`fenced_code_blocks`, `backtick_code_blocks`, `fenced_code_attributes`.

These can't really be disabled in the reader, but they need to
be enabled in the writer or we just get indented code.
2020-07-29 18:13:15 -07:00
Albert Krewinkel
aff582d9b5
Writers/Shared: add missing function docs
Ensure that all functions in the module have a haddock comment.
2020-07-29 18:33:08 +02:00