Commit graph

13282 commits

Author SHA1 Message Date
John MacFarlane
d4c2923025 Update changelog. 2019-12-11 11:02:50 -08:00
John MacFarlane
a098278505 Bump version to 2.9 because of API change in Templates, Class. 2019-12-11 10:54:15 -08:00
John MacFarlane
817d2048da Improved template API and fixed a bug. Closes #5979.
* Text.Pandoc.Templates [API change]

  + Add Monad wrappers `WithDefaultPartials` and `WithPartials`.
    Wrapping these around an instance of `PandocMonad` gives
    us different instances of `TemplateMonad`, with different
    search behavior in retrieving partials.
    To compile a template and limit partial search to pandoc's
    data files, use `runWithDefaultPartials (compileTemplate ...)`.
    To compile a template and allow partials to be found locally
    (either on the file system or via HTTP, in the event that
    the main template has an absolute URL), ue
    `runWithPartials (compileTemplate ...)`.

  + Export `getTemplate`, which seeks a template locally,
    or via HTTP if the template has an absolute URL, falling
    back to the data files if not found.

  + Export `compileDefaultTemplate` -- does `getDefaultTemplate`
    and compiles the result, raising an error on failure.

* Text.Pandoc.Class [API change]

  + Remove `TemplateMonad` instances for `PandocIO` and `PandocPure`.
    These were too limiting and caused a bug whereby a local
    partial could be used even when the default template was requested.
    We now rely on instances provided in the Templates module.

Text.Pandoc.App.OutputSettings

  + Simplify template retrieval code.
2019-12-11 10:53:24 -08:00
Denis Maier
4e7ac069b9 ConTeXt template: Adjustments to title formatting (#5949)
Added `\setupinterlinespace` to `title`, `subtitle`, `date` and `author` elements.
Otherwise longer titles that run over multiple lines will look squashed as
`\tfd` etc. won't adapt the line spacing to the font size.
2019-12-11 08:28:11 -08:00
Frederik Elwert
90804b5506 Add title-slide-attributes variable to reveal.js template. (#5981) 2019-12-11 08:26:54 -08:00
John MacFarlane
a0df2f676c Fix README.md so that relative links from manual become absolute.
Previously they'd be broken links when viewed on GitHub or Hackage.
So we add the base URL for the pandoc manual.
2019-12-10 14:46:33 -08:00
John MacFarlane
a6297d252e More informative JSON parse error.
Closes #5973.
2019-12-09 07:25:37 -08:00
John MacFarlane
0bfe478a69 Use external emojis package.
Moved the emoji-specified code into an external package
we can depend on.
2019-12-08 17:27:18 -08:00
John MacFarlane
7f4154a8bb Fix regression in makeSections.
Previously hierarchicalize (the ancestor of `makeSections`)
would put header attributes on the containing Div.  In 2.8
this behavior changed, which broke some tools depending
on pandoc.  Here we roll back this change, so that attributes
again migrate from the header to the containing Div when
`makeSections` is run.  Note that attributes are retained
on the header as well (unlike before) -- with the exception
of the `id` attribute, which of course cannot be duplicated.

Note that this is an empty commit.  The previous
commit, 8d0033111, was mistakenly recorded as an
amendment to the --toc-depth fix, so the commit message
for that is wrong; this message correctly describes
the change in 8d0033111.

Closes #5965.
2019-12-07 15:17:58 -08:00
John MacFarlane
8d00331115 Fix --toc-depth regression in 2.8.
Closes #5967.
2019-12-07 15:15:55 -08:00
John MacFarlane
0b54d6282b Fix --toc-depth regression in 2.8.
Closes #5967.
2019-12-07 14:20:41 -08:00
John MacFarlane
5295607de7 Use doctemplates 0.8. 2019-12-07 12:31:05 -08:00
John MacFarlane
e16fd88c2e Rename template 'filters' as 'pipes'
to avoid confusion with the other notion of filter used by pandoc.
We may want to rename this upstream in doctemplates as well.
2019-12-07 11:42:29 -08:00
John MacFarlane
8ad14d6f57 Removed trailing whitespace in manual. 2019-12-07 09:06:20 -08:00
John MacFarlane
6bb552c589 Document display math syntax in manual. 2019-12-07 09:05:07 -08:00
John MacFarlane
d51b64f0e1 Slight tweak to RELEASE_CHECKLIST 2019-12-05 12:40:17 -08:00
John MacFarlane
d643393a69 Update manual date and man page. 2019-12-05 12:38:42 -08:00
John MacFarlane
086ad7493d Update changelog 2019-12-05 12:38:15 -08:00
John MacFarlane
2f87b04450 Makefile - fix emoji.json path 2019-12-05 12:33:17 -08:00
John MacFarlane
892995c6de Bump to 2.8.1 2019-12-05 12:25:40 -08:00
John MacFarlane
d96f1fdc40 Avoid deprecation warning for minimumDef using CPP. 2019-12-05 10:35:16 -08:00
Yihui Xie
ee44d44f20 Keep the \author{} command even if author is not specified (#5961)
Otherwise there will be a LaTeX warning "No \author given" when the .tex file is compiled.
This does not affect spacing in the title block.
2019-12-05 10:22:31 -08:00
John MacFarlane
e7833c4dfb Clean up manual on pdf generation backend options.
See #5940.
2019-12-05 10:15:53 -08:00
John MacFarlane
992f77c17c Roll back part of of --shift-heading-level-by change.
With positive heading shifts, starting in 2.8 this option caused
metadata titles to be removed and changed to regular headings.
This behavior is incompatible with the old behavior of
`--base-header-level` and breaks old workflows, so with this
commit we are rolling back this change.

Now, there is an asymmetry in positive and negative heading
level shifts:

+ With positive shifts, the metadata title stays the same and
  does not get changed to a heading in the body.
+ With negative shifts, a heading can be converted into the
  metadata title.

I think this is a desirable combination of features, despite
the asymmetry.  One might, e.g., want to have a document
with level-1 section headigs, but render it to HTML with
level-2 headings, retaining the metadata title (which pandoc
will render as a level-1 heading with the default template).

Closes #5957.
Revises #5615.
2019-12-05 09:59:50 -08:00
John MacFarlane
5711ca3880 Update release checklist to include code signing step.
This will address #5950.
2019-12-05 09:38:13 -08:00
John MacFarlane
64f78b3d5f HTML-based templates: Add CSS to suppress bullet on unordered task lists. 2019-12-05 09:36:34 -08:00
John MacFarlane
79a10388da HTML writer: add task-list class to ul if all elements are task list items.
This will allow styling unordered task lists in a way that omits
the bullet.
2019-12-05 09:32:40 -08:00
John MacFarlane
4489283b03 Fix makeSections so it doesn't turn column divs into sections. 2019-12-05 09:17:28 -08:00
John MacFarlane
28a2a6e534 Fix regression with behavior of --variable.
Previously -Vfoo=1 -Vfoo=2 would produce a list value for foo;
with 2.8 it produced just '2'.  This commit restores the earlier
beahvior.

Closes #5962.
2019-12-04 17:49:12 -08:00
John MacFarlane
6c435a17cd Move data/emoji.json to emoji.json, add to extra-source-files.
This doesn't really belong in data-files as it's not loaded
dynamically.
2019-12-03 16:38:19 -08:00
John MacFarlane
3afd0c7f5b ci: remove quotes around --hide-successes.
These seem to cause problems in windows.
2019-11-30 21:21:42 -08:00
John MacFarlane
be826cd39e Don't use --test-option with cabal.
It's only supported in later versions, apparently.
2019-11-30 12:07:35 -08:00
John MacFarlane
9ffe6bbe53 Try --test-options with cabal.
--test-option seems not to work (though it works with cabal 3+).
2019-11-30 11:38:09 -08:00
John MacFarlane
866114565c Hide successes in CI tests.
This makes it easier to spot failures.
2019-11-30 10:39:21 -08:00
John MacFarlane
1123c9779f Improve Makefile for signing windows release candidates. 2019-11-29 22:02:04 -08:00
John MacFarlane
ee6cf6ad6b Add Makefile to windows release-candidate build.
Running 'make' in this directory will do the code signing of the msi.
2019-11-29 11:50:09 -08:00
John MacFarlane
67f5d65cd5 Add ascii_identifiers as a supported extension for markdown.
This fixes a regression in 2.8.
2019-11-29 11:27:05 -08:00
Denis Maier
83fff033fb Update default.context (#5946)
Fix `\startcslreferences`:
- The old version had a too large skip at the beginning of the reference list => fixed that.
- Change syntax to ConTeXt conventions
2019-11-29 10:52:24 -08:00
John MacFarlane
36b4c04ffd Use [|..|] syntax to simplify Emoji.TH. 2019-11-27 21:50:55 -08:00
John MacFarlane
d88015e03e Revert "Don't do parallel build with cabal."
This reverts commit bd175d13b6.
2019-11-27 21:32:17 -08:00
John MacFarlane
14ed6fa141 Remove redundant import. 2019-11-27 21:32:00 -08:00
John MacFarlane
0d0ec98dd5 Generate Emoji module with TH.
- Add Text.Pandoc.Emoji.TH.
- Replace long literal list in Text.Pandoc.Emoji with one-liner
  generating it from data/emoji.json using TH.
- Add Makefile target to download data/emoji.json.
- Remove tools/emoji.hs.
2019-11-27 21:31:53 -08:00
John MacFarlane
bd175d13b6 Don't do parallel build with cabal.
Hopefully this fixes the apparent OOM error on GitHub CI?
2019-11-27 20:39:05 -08:00
John MacFarlane
97387f8fac Increase GC allocation space for compilation in cabal.project. 2019-11-27 18:49:44 -08:00
John MacFarlane
8a42ca41cf LaTeX writer - hlint. 2019-11-27 10:04:00 -08:00
John MacFarlane
982d2f6cd3 HTML writer: hlint improvements. 2019-11-27 09:52:11 -08:00
John MacFarlane
3accc2a5cd Removed useless cpp for old versions of blaze. 2019-11-27 09:45:00 -08:00
John MacFarlane
0f800b9d37 Removed unneeded pragma. 2019-11-27 09:40:24 -08:00
John MacFarlane
e479a88722 Bump to 2.8.0.1 and update changelog and manual. 2019-11-26 21:18:31 -08:00
John MacFarlane
ec219f911e Use skylighting 0.8.3. 2019-11-26 10:41:43 -08:00