Commit graph

7574 commits

Author SHA1 Message Date
ickc
8b9cce9792 "Merge" MANUAL.txt into README.md (#3167)
* "Merge" MANUAL.txt into README.md

Pull request #3157 without the automatic building from MANUAL.txt to
README.md

* remove contributors in README.md
2016-10-22 22:33:45 +02:00
John MacFarlane
4851986187 Merge pull request #3158 from ickc/COPY-LICENSE
Use the markdown version of COPYING from GNU
2016-10-19 14:08:56 +02:00
John MacFarlane
1da40d63b1 Merge pull request #3108 from tarleb/part
Add command line option allowing to set type of top-level divisions
2016-10-19 14:07:44 +02:00
Albert Krewinkel
595a171407
Add option for top-level division type
The `--chapters` option is replaced with `--top-level-division` which allows
users to specify the type as which top-level headers should be output. Possible
values are `section` (the default), `chapter`, or `part`.

The formats LaTeX, ConTeXt, and Docbook allow `part` as top-level division, TEI
only allows to set the `type` attribute on `div` containers.  The writers are
altered to respect this option in a sensible way.
2016-10-19 13:12:57 +02:00
Kolen Cheung
4b51ed3823 Download markdown version of the license from GNU and rename to COPYING.md
From https://www.gnu.org/licenses/old-licenses/gpl-2.0.md
2016-10-19 04:11:36 -07:00
John MacFarlane
29cbd5cbcf Merge pull request #3168 from hubertp-lshift/feature/odt-image-with-caption
[odt] proper formatting of an image with a caption
2016-10-19 12:20:38 +02:00
Hubert Plociniczak
dd799df0ae Image with a caption needs special formatting
Latex Writer only handles captions if the image's title
is prefixed with 'fig:'.
2016-10-19 11:40:44 +02:00
John MacFarlane
4a2a7a21e5 Merge pull request #3166 from hubertp-lshift/bug/3134
Issue 3143: Don't duplicate text for anchors
2016-10-18 22:03:45 +02:00
John MacFarlane
0cd11b3e54 Merge pull request #3165 from hubertp-lshift/feature/odt-image
[odt] images parser
2016-10-18 22:00:58 +02:00
John MacFarlane
8264ae2abe Better fix for the problem with ghc 7.8. 2016-10-18 16:25:13 +02:00
John MacFarlane
3747abf029 Try to fix build error on ghc 7.8.
@tarleb this is an interesting one, see the build log in
https://travis-ci.org/jgm/pandoc/jobs/168612017

It only failed on ghc 7.8; I think this must have to do with
the change making Monad a superclass of Applicative, hence
this change.
2016-10-18 16:03:34 +02:00
John MacFarlane
13ff73bc70 Setup.hs - removed some unneeded imports. 2016-10-18 15:11:05 +02:00
John MacFarlane
630e79fbf0 Added pandoc-citeproc back to extra-deps in stack.yaml.
Otherwise we can't set flags.
2016-10-18 15:07:43 +02:00
John MacFarlane
ea31c9e88b Use lts-7.4 resolver. 2016-10-18 14:46:17 +02:00
John MacFarlane
7a2d9a2646 stack.yaml - use latest pandoc-types. 2016-10-18 14:43:47 +02:00
Hubert Plociniczak
c74c5fdd97 Issue 3143: Don't duplicate text for anchors
When creating an anchor element we were adding its representation
as well as the original content, leading to text duplication.
2016-10-18 10:50:37 +02:00
John MacFarlane
a85e8fe532 Allow latest HUnit. 2016-10-18 10:25:23 +02:00
John MacFarlane
f11d7c2478 Travis tweaks.
Disable optimizations.
Make sure we don't change flag on aeson.
2016-10-18 10:09:01 +02:00
Albert Krewinkel
1266b210ac
Org writer: drop space before footnote markers
The writer no longer adds an extra space before footnote markers.

Fixes: #3162
2016-10-17 22:11:03 +02:00
Hubert Plociniczak
4417e33ea9 Use bind function instead of pattern matching 2016-10-17 16:58:53 +02:00
Hubert Plociniczak
7234321e8f Minor refactoring 2016-10-17 16:50:03 +02:00
Hubert Plociniczak
a02f276ff1 Infer caption from the text following the img
Frame can contain other frames with the text boxes.
This is something that has not been considered before
and meant that the whole construction of images was
broken in those cases. Also the captions were fixed/ignored.
2016-10-17 16:35:13 +02:00
Jesse Rosenthal
f407b66405 RST reader: Add test for space-before-note. 2016-10-17 09:55:18 -04:00
Jesse Rosenthal
e666c92bc9 RST reader: skip whitespace before note.
RST requires a space before a footnote marker. We discard those spaces
so that footnotes will be adjacent to the text that comes before
it. This is in line with what rst2latex does. rst2html does not discard
the space, but its html output is different than pandoc's, so this seems
the most semantically correct approach.

Closes #3163
2016-10-17 09:54:59 -04:00
John MacFarlane
f8603e6df5 Bump pandoc-types versions to 1.17.0.3 in stack.yaml. 2016-10-17 15:05:38 +02:00
John MacFarlane
54d54fc57f Use pandoc-types 1.17.0.2 in stack.yaml. 2016-10-17 13:59:58 +02:00
John MacFarlane
15902b31ab Try travis build with latest dev pandoc-types. 2016-10-17 13:48:20 +02:00
John MacFarlane
e298dc2065 BUmp pandoc-types version in stack.yamls. 2016-10-17 09:57:55 +02:00
John MacFarlane
8625ff21a9 Update stack.yamls to use pandoc-types 1.17 release. 2016-10-16 22:18:03 +02:00
John MacFarlane
bd1dcd6fe8 Travis: fixed --flag argument in stack. 2016-10-16 21:54:00 +02:00
John MacFarlane
4a25342ae0 Travis: Use fast flag for aeson.
This dramatically speeds up the build, according to the
aeson changelog.
2016-10-15 14:43:39 +02:00
Albert Krewinkel
462c140eb6
Org reader: allow figure with empty caption
A `#+CAPTION` attribute before an image is enough to turn an image into a
figure. This wasn't the case because the `parseFromString` function, which
processes the caption value, would fail on empty values. Adding a newline
character to the caption value fixes this.

Fixes: #3161
2016-10-14 23:16:51 +02:00
Jesse Rosenthal
49b0b67b11 Remove Tests.Arbitrary
Use exported Arbitrary instances from pandoc-types instead.
2016-10-14 09:22:29 -04:00
John MacFarlane
9bd1da122a Merge pull request #3146 from hubertp-lshift/feature/odt-list-start-value
[ODT Parser] Include list's starting value
2016-10-14 15:15:50 +02:00
Hubert Plociniczak
9282fadc6b Added tests and a corner case for starting number
Review revealed that we didn't handle the case
when the starting point is an empty string. While
this is not a valid .odt file, we simply added
a special case to deal with it.

Also added tests for the new feature.
2016-10-14 13:56:24 +02:00
John MacFarlane
85cf7b165a Travis: test with lts-7 not lts-6. 2016-10-14 09:14:17 +02:00
John MacFarlane
8049a43800 Use latest pandoc-types in windows/stack.yaml. 2016-10-13 21:03:26 +02:00
John MacFarlane
b5c0eeb3ca Use newest pandoc-types from repo. 2016-10-13 21:01:28 +02:00
Jesse Rosenthal
cd1427876e Markdown writer: Abstract out note/ref function.
We do basically the same thing every time we insert notes, so let's cut
down on code duplication.
2016-10-13 11:04:35 -04:00
John MacFarlane
886e131949 Use latest pandoc-citeproc in stack.yamls. 2016-10-13 16:35:23 +02:00
John MacFarlane
6156cdda13 Update stack.yaml files. 2016-10-13 13:02:18 +02:00
John MacFarlane
6d13567ac5 Allow http-client 0.4.30, which is the version in stackage lts.
Previously we required 0.5.
Remove CPP conditionals for earlier versions.
2016-10-13 13:01:49 +02:00
John MacFarlane
4a1ef0b51d Revert "Remove http-client CPP conditionals."
This reverts commit 3f82471355.

We might want to revert the requirement of http-client 0.5,
as this is not yet in Stackage and that is starting to
cause problems.  I can't recall why it is there.
2016-10-13 12:35:58 +02:00
John MacFarlane
79d8056acf Document biblio-title variable in MANUAL.txt.
Cloess #258.
2016-10-13 11:57:56 +02:00
John MacFarlane
354c4ab04f Updated stack.yaml and windows/stack.yaml to use latest pandoc-types. 2016-10-13 11:51:44 +02:00
John MacFarlane
4eff607678 Merge pull request #3072 from tarleb/lineblock
Read and write LineBlock elements
2016-10-13 11:38:19 +02:00
Albert Krewinkel
63966f6375
Bump required pandoc-types version to 1.17 2016-10-13 08:46:45 +02:00
Albert Krewinkel
3e60ed9c03
Allow empty lines when parsing line blocks
Line blocks are allowed to contain empty lines and should be parsed as a
single block in that case.  Previously an empty (line block) line would
have terminated parsing of the line block element.
2016-10-13 08:46:44 +02:00
Albert Krewinkel
c9460e7013
Parse line-oriented markup as LineBlock
Markup-features focusing on lines as distinctive part of the markup are read
into `LineBlock` elements. This currently means line blocks in reStructuredText
and Markdown (the latter only if the `line_block` extension is enabled), the
`linegroup`/`line` combination from the Docbook 5.1 working draft, and Org-mode
`VERSE` blocks.
2016-10-13 08:46:44 +02:00
Albert Krewinkel
22cb9e3327
Add support for the LineBlock element to writers
The following markup features are used to output the lines of the `LineBlock`
element:

  - AsciiDoc: a `[verse]` block,
  - ConTeXt: text surrounded by `\startlines` and `\endlines`,
  - HTML: `div` with an per-element style setting to interpret the content as
    pre-wrapped,
  - Markdown: line blocks if the `line_blocks` extension is enabled, a simple
    paragraph with hard linebreaks otherwise,
  - Org: VERSE block,
  - RST: a line block, and
  - all other formats: a paragraph, containing hard linebreaks between lines.

Custom lua writers should be updated to use the `LineBlock` element.
2016-10-13 08:46:44 +02:00