Commit graph

12229 commits

Author SHA1 Message Date
John MacFarlane
93ee73e1dc LaTeX writer: Avoid inadvertently creating ? or ! ligatures.
These are upside down ? and !, resp.

Closes #5407.
2019-03-29 10:04:22 -07:00
John MacFarlane
5fa4ea8eb1 Update data/jats.csl to avoid commas between name-part elements.
Closes #5397.
2019-03-28 21:21:05 -07:00
John MacFarlane
1595860059 HTML writer: Don't add data- prefix to RDFa attributes.
Closes #5403.
2019-03-28 21:01:24 -07:00
John MacFarlane
40865958ce Markdown reader: fenced div takes priority over setext header.
For

    ::: {.cell}
    ---
    :::
2019-03-28 17:39:22 -07:00
John MacFarlane
261ad9fb3d Ipynb reader: use html for a raw cell with no format.
The nbformat spec says that when no format is specified,
the raw cell will be rendered in every markup format.
Pandoc doesn't have a construct that works this way,
so we just fall back to `html`.
2019-03-28 17:18:11 -07:00
John MacFarlane
83ea529cf3 Ipynb writer: fixed carry-over of nbformat from metadata.
Previously we wrongly assumed it would be in a MetaString.
It's an a MetaInlines.
2019-03-28 17:12:44 -07:00
John MacFarlane
9c7a57d648 stack.yml - remove -Wmissing-home-modules
This seems to cause problems with stack ghci.
2019-03-28 17:02:25 -07:00
John MacFarlane
2b0a0bba9c Shared - improve metaToJSON with numbers.
We now do a better job marshalling numbers from MetaString
OR MetaInlines into JSON Number.
2019-03-28 17:01:32 -07:00
John MacFarlane
4c9a68e83f Markdown writer: better rendering of numbers.
If the number is integral, we render it as an integral
not a float.

Closes #5398.
2019-03-28 16:20:39 -07:00
John MacFarlane
ba613b2e9e Markdown writer: proper rendering of empty map in YAML metadata.
Should be `{}` not empty string.

Partially addresses #5398.
2019-03-28 14:10:00 -07:00
John MacFarlane
7fa5fbed9e Use strict instead of lazy sum.
sum is lazy; replace with `foldl' (+) 0` to avoid stack
overflow in Text.Pandoc.Pretty with very long strings.

Closes #5401.
2019-03-28 13:51:15 -07:00
John MacFarlane
b87a3efb93 Revert "appveyor - just build dependencies."
This reverts commit f520c4dfbb.
2019-03-28 10:19:52 -07:00
John MacFarlane
33476b30f9 stack.yaml: remove RTS options 2019-03-28 08:58:11 -07:00
John MacFarlane
f520c4dfbb appveyor - just build dependencies.
This should build up our cache so we can build the whole thing.
2019-03-28 08:46:54 -07:00
John MacFarlane
50ee9292cc appveyor - save cache on error.
Hopefully this will allow new ghc builds to complete within 60 minutes,
after a try or two.
2019-03-27 23:27:08 -07:00
John MacFarlane
612e6555a9 ipynb writer: preserve nbformat_minor if it's given.
This helps with round-tripping.
2019-03-27 18:04:20 -07:00
John MacFarlane
6157f7ec4f Writers.Shared.metaValueToJSON: use Number Values for integers.
Pandoc's MetaValue doesn't have a distinguished number type,
so numbers are put in MetaStrings.  If the MetaString consists
entirely of digits, we convert it to a Number.

We should probably consider adding a MetaNumber constructor
to MetaValue, for better round-tripping with JSON etc.

This change aids round-tripping in ipynb metadata fields,
like `toc_depth`.
2019-03-27 17:11:14 -07:00
John MacFarlane
2138ef8239 ipynb reader: avoid introducing spurious .0 on integers in metadata. 2019-03-27 16:52:17 -07:00
John MacFarlane
47aaad705a circleci - drop test on ghc 7.10, add ghc 8.6.4. 2019-03-27 11:40:18 -07:00
John MacFarlane
3ecc8d154b Drop support for ghc < 8. 2019-03-27 11:38:24 -07:00
John MacFarlane
a43c0bf54b CONTRIBUTING: replace reference to travis with circleci. 2019-03-27 11:27:56 -07:00
John MacFarlane
a0397bae98 circleci: back to -j2. 2019-03-27 11:26:41 -07:00
John MacFarlane
f5f8f903e1 circleci: recognize both Warning: and warning:. 2019-03-27 11:24:50 -07:00
John MacFarlane
3c88a2bf60 circelci: try using -j1. 2019-03-27 10:39:25 -07:00
John MacFarlane
53fd8e02af Remove install step from make quick-cabal. 2019-03-27 10:06:55 -07:00
John MacFarlane
9e63924f28 Add ghc-options to cabal.project. 2019-03-27 09:36:52 -07:00
John MacFarlane
03293a4ac4 Quote RTS options in stack.yaml. 2019-03-27 09:36:27 -07:00
John MacFarlane
ec99e9de56 circleci config - remove GHC_OPTS.
Build into stack.yaml and cabal.project.local instead.
2019-03-27 09:24:17 -07:00
John MacFarlane
9e876fb568 Add nice default ghc options to stack.yaml. 2019-03-27 09:22:24 -07:00
John MacFarlane
44ef31b2ae Another try at circleci config. 2019-03-27 09:02:40 -07:00
John MacFarlane
8358f6b94e circleci config - don't use 'all' for cabal test. 2019-03-27 08:10:42 -07:00
John MacFarlane
2c3b8cd6d2 circleci - ensure that config doesn't change between build and test.
Print test output directly.
2019-03-27 07:31:15 -07:00
John MacFarlane
218565b229 circleci tweak - move up cabal v2-test. 2019-03-26 22:44:05 -07:00
John MacFarlane
d086a190d5 circleci - explicitly specify ghc version for cabal builds. 2019-03-26 22:25:44 -07:00
John MacFarlane
542272a52a JATS writer: Ensure that plain strings go inside <pub-id> tag.
See #5397.
2019-03-26 21:43:59 -07:00
John MacFarlane
30a5099783 circleci - set path to use installed ghc. 2019-03-26 21:35:24 -07:00
John MacFarlane
8b22326b0d Fixed typo in circleci config. 2019-03-26 21:01:51 -07:00
John MacFarlane
825ca61e60 more circleci diagnostics 2019-03-26 14:14:01 -07:00
John MacFarlane
7bd32d70a6 circleci tweaks - mostly diagnostic. 2019-03-26 13:56:49 -07:00
John MacFarlane
af7486cc6d circleci: explicitly specify ghc version to use. 2019-03-26 11:39:41 -07:00
Andrew Dunning
c21db81efd LaTeX template: Add pandoc to PDF metadata (#5388)
Credits pandoc in content creator metadata (the default is 'LaTeX with hyperref').
2019-03-25 22:36:14 -06:00
John MacFarlane
dab896720c circleci: fix typo. 2019-03-25 09:32:43 -07:00
John MacFarlane
06f2bb02ad appveyor.yml - use ghc 8.6.4.
Hopefully this will fix segault issues on Windows.
See #5037.
2019-03-25 08:58:44 -07:00
John MacFarlane
052684712b HTML reader: read data-foo attribute into foo.
The HTML writer adds the `data-` prefix for HTML5
for nonstandard attributes.  But the attributes are
represented in the AST without the `data-` prefix,
so we should strip this when reading HTML.

Closes #5392.
2019-03-25 08:43:59 -07:00
Andrew Dunning
e91af0a8a3 LaTeX template: Group graphics-related code (#5389)
* LaTeX template: Group graphics-related code

The default figure placement was added in <f3ab4bc2b9>; there does not appear to have been a reason for placing it at the end of the preamble.

* Update tests
2019-03-22 22:35:55 -06:00
John MacFarlane
1e60776226 LaTeX writer: Fix footnotes in table caption and cells.
This fixes a bug wherein footnotes appeared in the wrong
order, and with duplicate numbers, when in table captions
and cells.

We now use regular `\footnote` commands, even in the table
caption and the minipages containing cells. Apparently
longtable knows how to handle this.

Closes #5367.
2019-03-22 11:55:41 -07:00
John MacFarlane
97acf152e0 fetchItem: don't treat UNC paths as protocol-relative URLs.
These are paths beginning `//?/UNC/...`.  Closes #5127.
2019-03-22 11:22:21 -07:00
Andrew Dunning
b3473df417 LaTeX template: Move \setstretch after front matter (#5378)
Ensures that `\maketitle`, `\tableofcontents`, and so forth are not affected by changes to line spacing. Closes #5179 by partially working around <https://github.com/reutenauer/polyglossia/issues/218>.
2019-03-21 23:32:52 -06:00
richarddavis
567a43ace3 Improve pdfSize in ImageSize by ignoring all whitespace in /MediaBox command (#5383)
This fix ignores all whitespace in the PDF /MediaBox line so that a wider range of PDF sizes can be read. This improves fix to #4322.
2019-03-21 10:43:56 -06:00
John MacFarlane
66e5f0ff8d Docx writer: Use w:br without attributes for line breaks.
We previously added the attribute `type="textWrapping"`, but
this causes problems on Word Online.

Closes #5377.
2019-03-21 09:28:16 -07:00