Commit graph

4852 commits

Author SHA1 Message Date
John MacFarlane
8e8d7802ee Logging: issue INFO, not WARNING, if LaTeX .sty file can't be read.
Normally this is not a situation requiring a fix from the user,
so a warning is inappropriate.
2017-11-04 17:07:55 -07:00
John MacFarlane
fe42c175eb Revert "Better indentation under headers in org mode output."
This reverts commit 1a81751cef.
2017-11-04 11:32:47 -07:00
John MacFarlane
1a81751cef Better indentation under headers in org mode output.
See #4036.

Close examination by org experts needed, to ensure that
nothing breaks.
2017-11-04 11:25:38 -07:00
John MacFarlane
8e53489cbc Fix strikethrough in gfm writer.
Previously we got a crash, because we were trying to print
a native cmark STRIKETHROUGH node, and the commonmark writer
in cmark-github doesn't support this.  Work around this by
using a raw node to add the strikethrough delimiters.

Closes #4038.
2017-11-04 10:35:52 -07:00
John MacFarlane
642d603666 Improved support for columns in HTML.
* Move as much as possible to the CSS in the template.
* Ensure that all the HTML-based templates (including epub)
  contain the CSS for columns.
* Columns default to 50% width unless they are given a width
  attribute.

Closes #4028.
2017-11-02 20:57:05 -07:00
John MacFarlane
5dfe131ee0 Support lineAnchors (or line-anchors) in code blocks, for HTML. 2017-11-02 16:38:06 -07:00
John MacFarlane
856587ff63 Use latest skylighting; ensure no duplicate ids on code lines.
The line identifiers are built using the code block's identifier
as a prefix. If the code block has null identifier, we use
"cb1", "cb2", etc.

Closes #4031.
2017-11-02 16:03:40 -07:00
John MacFarlane
6d00e6e8c3 Fixed revealjs slide column width issues.
* Remove "width" attribute which is not allowed on div.
* Remove space between `<div class="column">` elements,
  since this prevents columns whose widths sum to 100%
  (the space takes up space).

Closes #4028.
2017-11-02 10:23:04 -07:00
Alexander Krotov
a553baf3a4 hlint 2017-11-02 15:28:53 +03:00
John MacFarlane
52e372b71d SelfContained: use base64 for css links with media attribute.
This fixes `--self-contained` with s5.  Closes #4026.
2017-11-01 17:42:33 -07:00
John MacFarlane
ed3d466384 Really fix #3989.
The previous fix only worked in certain cases.
Other cases with `>` in an HTML attribute broke.
2017-11-01 09:27:51 -07:00
Alexander Krotov
00b64f337d hlint 2017-11-01 14:40:10 +03:00
Alexander Krotov
3cee9c8976 FB2 writer: Add "unrecognised" genre to <title-info>
XML schema requires at least one genre.
2017-11-01 13:31:16 +03:00
Alexander Krotov
8a5541dca8 FB2 writer: remove <annotation> from <body>
<annotation> is not allowed inside <body> according to FictionBook2 XML schema. Besides that, the same information is already placed inside <description>.

Related bug: #2424
2017-11-01 13:08:52 +03:00
John MacFarlane
9b513b8a7a
Merge pull request #4009 from mb21/html-class-names
HTML Writer: consistently use dashed class-names
2017-11-01 00:39:08 -04:00
John MacFarlane
eef8118af0
Merge pull request #4008 from labdsf/fb2-bullets
FB2 writer: make bullet lists consistent with ordered lists
2017-11-01 00:38:02 -04:00
John MacFarlane
32f6938605 Properly pass through author metadata in JATS writer.
Closes #4020.
2017-10-31 21:27:08 -07:00
John MacFarlane
fb6e5812bc Fixed regression in parsing of HTML comments in markdown...
and other non-HTML formats (`Text.Pandoc.Readers.HTML.htmlTag`).
The parser stopped at the first `>` character, even if it wasn't
the end of the comment.

Closes #4019.
2017-10-31 21:14:38 -07:00
John MacFarlane
fd7e3cb18f
Merge pull request #4018 from swilde/creole-fixes
Creole Reader: fix lists with triling white space
2017-11-01 00:04:36 -04:00
Sascha Wilde
534e625ace Creole reader: fixed some minor typos and formatting. 2017-10-31 22:33:58 +01:00
John MacFarlane
0e57b8b85d Add Millimeter constructor to Dimension in ImageSize.
Minor API change.

Now sizes given in 'mm' are no longer converted to 'cm'.

Closes #4012.
2017-10-31 11:58:43 -07:00
John MacFarlane
5f9f458df3 LaTeX reader: handle % comment right after command.
For example

    \emph%
    {hi}
2017-10-31 11:31:35 -07:00
John MacFarlane
2a81ff3245 LaTeX/Beamer writer: support "blocks" inside columns and other Divs.
Example:

```

<div class="columns">
<div class="column" width="40%">
- Item
</div>
<div class="column" width="60%">
- Item
</div>
</div>
```

Closes #4016.
2017-10-31 11:07:39 -07:00
John MacFarlane
556c6c2c6d Markdown reader: make sure fenced div closers work in lists.
Previously the following failed:

    ::: {.class}
    1. one
    2. two
    :::

and you needed a blank line before the closing `:::`.
2017-10-31 10:57:20 -07:00
John MacFarlane
81610144f9 Make fenced_divs affect the Markdown writer.
If `fenced_divs` is enabled, fenced divs will be used.
2017-10-31 10:57:20 -07:00
Sascha Wilde
fa67d6e86f Creole reader: fixed lists with trailing white space. 2017-10-31 18:55:27 +01:00
Alexander Krotov
a496979c6d FB2 writer: write blocks outside of <p> in definitions 2017-10-31 20:19:00 +03:00
mb21
8d7ce0fdf0 HTML Writer: consistently use dashed class-names
see #3556
2017-10-31 10:40:16 +01:00
Alexander Krotov
94d02a6efa FB2 writer: make bullet lists consistent with ordered lists
Previously bullet lists interacted in odd way with ordered lists.
For example, bullet lists nested in ordered list had incorrect
indentation. Besides that, indentation with spaces is not rendered
by FBReader and fbless. To avoid this problem, bullet lists are
indented by appending bullets to marker just the same way it is
done for ordered lists.
2017-10-31 11:35:47 +03:00
John MacFarlane
c0e51c5710 EPUB writer: fixed filepaths for nonstandard epub-subdirectory values. 2017-10-30 17:43:08 -07:00
John MacFarlane
599d4aa032 EPUB writer fixes:
- Ensure that epub2 is recognized as a non-text format,
  so that a template is used.

- Don't include "prefix" attribute for ibooks for epub2.
  It doesn't validate.

- Fix stylesheet paths; previously we had an incorrect
  stylesheet path for the cover page and nav page.
2017-10-30 17:25:15 -07:00
John MacFarlane
90597fe292 LaTeX reader: insert space when needed in macro expansion.
Sometimes we need to insert a space after a control sequence
to prevent it merging with a following letter.

Closes #4007.
2017-10-30 11:51:49 -07:00
John MacFarlane
272b833ad5 Allow unbraced arguments for macros.
See #4007.
2017-10-30 11:35:40 -07:00
John MacFarlane
601a28fd36 Allow body of macro definition to be unbraced.
e.g.

    \newcommand\arrow\to

See #4007.
2017-10-30 10:59:52 -07:00
John MacFarlane
1e1a7a9b83 Fixed warnings. 2017-10-29 15:19:49 -07:00
John MacFarlane
6a1476e7e2 Export all of Text.Pandoc.Class from Text.Pandoc. 2017-10-29 15:00:49 -07:00
John MacFarlane
95ccbdaac2 Removed useless notes state in DokuWiki writer. 2017-10-29 14:55:22 -07:00
John MacFarlane
52ee19a825 Source code reformatting. 2017-10-29 14:29:32 -07:00
John MacFarlane
f270dd9b18 hlint suggestions. 2017-10-29 14:18:06 -07:00
John MacFarlane
271e1fe2f1 More hlint. 2017-10-29 13:19:15 -07:00
John MacFarlane
9ef4ad2e20 Small reformat. 2017-10-29 13:01:04 -07:00
John MacFarlane
b18dbfe792 Use uncurry. 2017-10-29 12:58:41 -07:00
John MacFarlane
8e5e8746d8 More hlint fixes. 2017-10-29 12:45:37 -07:00
Alexander
3263d0d7c4 Write FB2 lists without nesting blocks inside <p> (#4004)
According to FB2 XML schema <empty-line /> cannot be placed inside
<p>. Linux FBReader can't display such paragraphs, e.g. any "loose"
lists produced by pandoc prior to this commit.  Besides that,
FB2 writer placed <p> inside <p> when writing nested lists,
this commit fixes the bug.

Also this commit removes leading non-breaking space from ordered
lists for consistency with bullet lists.

Definition lists are not affected at all.
2017-10-29 14:46:44 -04:00
John MacFarlane
47e2719cc3 Fix warning for older GHC versions. 2017-10-28 09:56:20 -07:00
John MacFarlane
b39f782c8d Try to fix imports for older ghc. 2017-10-28 00:09:23 -07:00
John MacFarlane
cb42bb820c Change order of imports to satisfy older ghc. 2017-10-28 00:01:44 -07:00
John MacFarlane
cbcb9b36c0 hlint suggestions. 2017-10-27 23:13:55 -07:00
John MacFarlane
8481298357 Don't rely on syb when we don't need to. 2017-10-27 21:44:22 -07:00
John MacFarlane
b201a8aa58 hlint changes. 2017-10-27 21:32:53 -07:00