Commit graph

13195 commits

Author SHA1 Message Date
John MacFarlane
d0918627ca Improved --toc generation. 2019-12-17 11:59:52 -08:00
John MacFarlane
80728c8b31 PDF: Ensure UTF8 when printing source in --verbose mode.
This may fix #5997.
2019-12-17 11:59:52 -08:00
John MacFarlane
01b89d87f4 Templates: strip directory before trying to find partial in data files.
Closes #5987.
2019-12-17 11:59:52 -08:00
John MacFarlane
20cf4e47b0 Improved makeSections so we don't get doubled attributes.
Closes #5986.
2019-12-17 11:59:52 -08:00
John MacFarlane
11bab77120 HTML reader: Add "nav" to list of block-level tags. 2019-12-17 11:59:52 -08:00
John MacFarlane
b0c5ecbb1a Added test for #5986. 2019-12-17 11:59:52 -08:00
John MacFarlane
204c7bb943 Add section-divs command test (failing). 2019-12-17 11:59:52 -08:00
Mauro Bieg
abb0e35b94 lua-filters.md remove spurious dot in title (#5996) 2019-12-17 10:01:42 -08:00
Albert Krewinkel
75dc013036
Org reader: add table labels to caption if both are present
The table `#+NAME:` or `#+LABEL:` is added to the table's caption in the
form of an empty span with the label set as the span's ID.

Closes: #5984
2019-12-13 16:22:04 +01:00
John MacFarlane
2af13ef05a Change misleading module comment. 2019-12-12 11:16:40 -08:00
John MacFarlane
1ed8518011 Regenerate man page. 2019-12-11 21:03:29 -08:00
John MacFarlane
d3a8423183 Use pandoc-citeproc 0.16.4.1 (cabal). 2019-12-11 19:19:20 -08:00
John MacFarlane
4ced99b5db Bump pandoc-citeproc version to 0.16.4.1. 2019-12-11 13:53:45 -08:00
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