Commit graph

12639 commits

Author SHA1 Message Date
John MacFarlane
47358831a4 EPUB toChapters: don't treat "refs" Div specially.
This should make toChapters work better if there are
Divs around sections.
2019-09-14 11:36:21 -07:00
John MacFarlane
3f455aedfa Github CI/windows: separate dependencies step. 2019-09-14 10:47:29 -07:00
John MacFarlane
88a0327579 FB2 reader test: Another attempt to fix test failure on GitHub CI. 2019-09-14 10:37:19 -07:00
John MacFarlane
7ecae69e27 Revert "FB2 reader test: filter CRs."
This reverts commit e35147d715.
2019-09-13 22:08:42 -07:00
John MacFarlane
e35147d715 FB2 reader test: filter CRs.
This may help with the test failure on GitHub CI.

b59e6d0376/checks
2019-09-13 16:50:00 -07:00
John MacFarlane
b59e6d0376 GitHuB CI: Try adding windows build. 2019-09-13 10:54:55 -07:00
John MacFarlane
8984eb7460 Fix setting path. 2019-09-13 09:26:47 -07:00
John MacFarlane
edd7bfa434 GitHub CI - set path. 2019-09-13 09:24:14 -07:00
John MacFarlane
afbc1ca3d8 GitHub CI - try sudo 2019-09-12 23:30:05 -07:00
John MacFarlane
27968fc09d Revert "GitHub CI - try with stack."
This reverts commit 4411af8062.
2019-09-12 23:29:35 -07:00
John MacFarlane
4411af8062 GitHub CI - try with stack. 2019-09-12 23:27:56 -07:00
John MacFarlane
f2612fa1ae GitHUB CI: Try installing recent cabal. 2019-09-12 23:19:32 -07:00
John MacFarlane
ab792faa3a GitHub CI - use plain v1-cabal. 2019-09-12 23:10:20 -07:00
John MacFarlane
8a0ffba296 GitHub CI: try 'cabal new-' instead of 'v2-' 2019-09-12 23:08:05 -07:00
John MacFarlane
69b42255f2
Add haskell.yml
Add GitHub CI file
2019-09-12 23:04:58 -07:00
John MacFarlane
65f73de28a Better message for PandocShouldNeverHappenError. 2019-09-12 08:50:12 -07:00
John MacFarlane
4f909c626c Change exit codes.
It's good practice not to use codes 1-2 for user errors.
Also, we used 65 for two different errors.

- PandocAppError was 1, is now 4
- PandocOptionError was 2, is now 6
- PandocMakePDFError was 65, is now 66
2019-09-12 08:46:38 -07:00
John MacFarlane
5aef7d04f0 MANUAL: add section for exit codes. 2019-09-12 08:36:49 -07:00
John MacFarlane
88dc6fac5d Add --shift-heading-level-by option.
Deprecate --base-heading-level.

The new option does everything the old one does, but also
allows negative shifts.  It also promotes the document
metadata (if not null) to a level-1 heading with a +1 shift,
and demotes an initial level-1 heading to document metadata
with a -1 shift. This supports converting documents that
use an initial level-1 heading for the document title.

Closes #5615.
2019-09-10 23:16:13 -07:00
John MacFarlane
a64b3ab61f Pass value of --dpi to rsvg-convert...
when converting SVG to PDF in the process of creating a PDF.

Closes #5721.
2019-09-10 21:17:51 -07:00
John MacFarlane
4778d03473 LaTeX reader: Fix parsing of optional arguments that contain braced text.
Closes #5740.
2019-09-09 21:33:16 -07:00
John MacFarlane
4dad7c5e86 MANUAL: document some pptx limitations...
in slide show section:

- no incremental display (#5689)
- no pause with `. . .` (#5701)
2019-09-08 22:41:04 -07:00
John MacFarlane
8696725cd9 Add -L option as shortcut for --lua-filter. 2019-09-08 22:37:38 -07:00
Brian Leung
0558ea9836 Org reader: modify handling of example blocks. (#5717)
* Org reader: allow the `-i` switch to ignore leading spaces.

* Org reader: handle awkwardly-aligned code blocks within lists.

Code blocks in Org lists must have their #+BEGIN_ aligned in a
reasonable way, but their other components can be positioned otherwise.
2019-09-08 22:34:10 -07:00
Vanessa McHale
8f5ab97569 Add to other-extensions field for use by cabal solver (#5728) 2019-09-08 22:28:17 -07:00
John MacFarlane
9f984ff26a Replace Element and makeHierarchical with makeSections.
Text.Pandoc.Shared:

+ Remove `Element` type [API change]
+ Remove `makeHierarchicalize` [API change]
+ Add `makeSections` [API change]
+ Export `deLink` [API change]

Now that we have Divs, we can use them to represent the structure
of sections, and we don't need a special Element type.
`makeSections` reorganizes a block list, adding Divs with
class `section` around sections, and adding numbering
if needed.

This change also fixes some longstanding issues recognizing
section structure when the document contains Divs.
Closes #3057, see also #997.

All writers have been changed to use `makeSections`.
Note that in the process we have reverted the change
c1d058aeb1
made in response to #5168, which I'm not completely
sure was a good idea.

Lua modules have also been adjusted accordingly.
Existing lua filters that use `hierarchicalize` will
need to be rewritten to use `make_sections`.
2019-09-08 22:20:19 -07:00
John MacFarlane
1ccff3339d Revert changes to hierarchicalizeWithIds.
Revert "hierarchicalize: ensure that sections get ids..."
This reverts commit 212406a61d.

Revert "Improve detection of headings in Divs by hierarchicalize."
This reverts commit 6e2cfd6c97.

Revert "Shared.hierarchicalize: improve handling of div and section structure."
This reverts commit 345b33762e.
2019-09-08 21:56:42 -07:00
John MacFarlane
95a19fcff0 INSTALL instructions fix for libicu. 2019-09-08 21:56:42 -07:00
Mauro Bieg
d96a5629bc Emit warning on -f latex -o out.pdf (#5736)
add UnusualConversion to LogMessage [API change]
2019-09-08 16:03:13 -07:00
John MacFarlane
f0577fe360 Makefile: ghci target 2019-09-06 21:09:44 -07:00
John MacFarlane
212406a61d hierarchicalize: ensure that sections get ids...
even if they're in divs.  Improves #3057.
2019-09-06 09:05:52 -07:00
John MacFarlane
6e2cfd6c97 Improve detection of headings in Divs by hierarchicalize.
The structure

```
<h1>one</h1>
<div>
<h1>two</h1>
</div>
```

should create two coordinate sections, not a section with
a subsection.  Now it does.

Extends #3057.
2019-09-06 08:44:59 -07:00
John MacFarlane
345b33762e Shared.hierarchicalize: improve handling of div and section structure.
Previously Divs were opaque to hierarchicalize, so headings
inside divs didn't get into the table of contents, for
example (#3057).

Now hierarchicalize treats Divs as sections when appropriate.
For example, these structures both yield a section and a
subsection:

``` html
<div>
<h1>one</h1>
<div>
<h2>two</h2>
</div>
</div>
```
``` html
<div>
<h1>one</h1>
<div>
<h1>two</h1>
</div>
</div>
```

Note that

``` html
<h1>one</h1>
<div>
<h2>two</h2>
</div>
<h1>three</h1>
```

gets parsed as the structure

    one
      two
    three

which may not always be desirable.

Closes #3057.
2019-09-05 22:37:13 -07:00
John MacFarlane
0534258780 Roff reader: Better support for 'while'. 2019-09-05 21:13:50 -07:00
John MacFarlane
e26ef34c04 Add dependency on skylighting-core in cabal file.
Closes #5729.
2019-09-05 17:36:37 -07:00
John MacFarlane
1c35167c3a Small cleanups in Makefile. 2019-09-05 17:34:47 -07:00
John MacFarlane
4559bc257b Makefile - remove references to obsolete flag.
See #5694.
2019-09-05 15:54:46 -07:00
John MacFarlane
5d790db5cf Add CSS for hanging-indent div to epub.css.
This is for hanging indents with pandoc-citeproc, to be
supported in a later release.
2019-09-05 12:44:29 -07:00
John MacFarlane
381654a704 Add div.hanging-indent CSS to HTML templates. 2019-09-05 12:42:23 -07:00
John MacFarlane
bb362fd76c Add partial styles.html in HTML5 template.
Avoid duplication in HTML templates by using styles.html partial.
Change indentation of styles in template.
2019-09-05 12:39:50 -07:00
John MacFarlane
75f6af5c12 Roff reader: improve handling of groups. 2019-09-05 07:01:31 -07:00
John MacFarlane
0e31483d43 asciidoc writer: don't include + in code blocks for regular asciidoc.
This is asciidoctor-specific.

Amends 98ee6ca289.
2019-09-04 14:57:22 -07:00
John MacFarlane
e7b8728ad2 Roff reader: Fix problem parsing comments before macro. 2019-09-04 10:55:56 -07:00
John MacFarlane
4967fd4208 Roff reader: more improvements in parsing conditionals. 2019-09-04 10:02:49 -07:00
John MacFarlane
e4cca4cf67 Roff readers: better parsing of groups.
We now allow groups where the closing `\\}` isn't at the
beginning of a line.

Closes #5410.
2019-09-04 09:24:42 -07:00
John MacFarlane
0a3cc0be45 SelfContained: omit content-type on type attribute for <style>.
It doesn't seem to be valid for HTML5, and as a result Chrome
ignores the style element.  Closes #5725.
2019-09-03 17:26:12 -07:00
John MacFarlane
e4638170d0 Further mod to hanging indent code in latex template.
Make sure the length is always defined.
2019-09-03 12:33:25 -07:00
John MacFarlane
dc01071053 Slight improvements to hanging indent code in latex template.
See jgm/pandoc-citeproc#410.
2019-09-03 12:30:40 -07:00
John MacFarlane
513058a24e XML: change toEntities to emit numerical hex character references.
Previously decimal references were used.
But Polyglot Markup prefers hex.  See #5718.

This affects the output of pandoc with `--ascii`.
2019-09-03 11:28:20 -07:00
John MacFarlane
0fe635d3ec LaTeX writer: use cslreferences environment for csl bibliographies.
this allows bibliographies to receive special formatting.

The template now contains definition of this environment (enabled
only when CSL is used).

It also defines a `\cslhangindent` length.  This is set to
2em by default when the bibliography style specifies
a hanging indent.  To override the length, you can
use e.g.

\setlength{\cslhangindent}{7em}

in header-includes.

Closes jgm/pandoc-citeproc#410.
2019-09-02 22:14:00 -07:00