Commit graph

8912 commits

Author SHA1 Message Date
John MacFarlane
917612747d Test updates for latex template changes. 2017-05-18 22:46:58 +02:00
lwolfsonkin
b45e47735c modified template.latex to fix XeLaTex being used with tables (#3661)
- reordered `lang` variable handling to immediately before `bidi`
2017-05-18 22:42:18 +02:00
John MacFarlane
689a8dcd5f Update Figure With Caption -> Captioned Figure in MANUAL.txt. 2017-05-18 22:34:54 +02:00
Ian
b9185b0216 Docx writer: Change FigureWithCaption to CaptionedFigure (#3658)
Edit styles.xml as part of the fix for #3656
2017-05-18 22:34:13 +02:00
John MacFarlane
0f6458c0c1 Don't double extract images from docx.
This fixes a regression that was introduced when `--extract-media`
was generalized to work with any input format.  We were getting
two versions of each image extracted from a docx, one with a hash,
one with the original filename, though only the hash one was used.
This patch restores the original behavior (using the original
filename).

Pointed out in comments on #3674. Thanks to @laperouse.
2017-05-18 13:38:19 +02:00
John MacFarlane
818d5c2f35 Markdown: allow attributes in reference links to start on next line.
This addresses a subsidiary issue in #3674.
2017-05-18 13:20:32 +02:00
Stefan Dresselhaus
6b8240fc2f Add --eol flag and writer option to control line endings.
* Add `--eol=crlf|lf` CLI option.
* Add `optEol` to `WriterOptions` [API change]
* In `Text.Pandoc.UTF8`, add new functions parameterized on `Newline`:
  `writeFileWith`, `putStrWith`, `putStrLnWith`, `hPutStrWith`,
  `hPutStrLnWith`. [API change]
* Document option in MANUAL.txt.

Closes #3663.
Closes #2097.
2017-05-18 11:55:45 +02:00
Albert Krewinkel
399a36280d
Lua module: allow omitting Attr in element constructors
The Attr argument is made optional for all pandoc element constructors
which take such a parameter. The attr param is always the last argument
of the constructor functions, so the option to omit them makes it easier
to construct new pandoc elements by hand.
2017-05-18 00:04:48 +02:00
John MacFarlane
7b3aaee15a Markdown writer: Fixed duplicated reference links
with `--reference-links` and `--reference-location=section`.
Also ensure that there are no empty link references `[]`.

Closes #3674.
2017-05-17 16:23:33 +02:00
John MacFarlane
61e965b117 Merge pull request #3676 from labdsf/space-char
Txt2Tags parser: newline is not indentation
2017-05-17 12:47:27 +02:00
John MacFarlane
377733e08f Merge pull request #3677 from labdsf/anylinenewline
Move anyLineNewline to Parsing.hs
2017-05-17 12:47:03 +02:00
Alexander Krotov
55ce47d050 Move anyLineNewline to Parsing.hs 2017-05-17 11:02:38 +03:00
Alexander Krotov
e74bd06cc8 Txt2Tags parser: newline is not indentation
space parses '\n', while spaceChar parses only ' ' and '\t'
2017-05-17 02:12:24 +03:00
Albert Krewinkel
602cd6a327
Org reader: replace sequence . map with mapM 2017-05-16 22:49:52 +02:00
Albert Krewinkel
a27e2e8a4e
Org reader: put tree parsing code into dedicated module 2017-05-16 22:42:34 +02:00
John MacFarlane
fbce4228a5 Merge pull request #3671 from WUUUGI/horizont-spacing
Added support for horizontal spacing in LaTeX
2017-05-16 09:18:57 +02:00
John MacFarlane
affc800c47 appveyor.yml: remove manual calls to editbin.
To really solve this memory limit, we need to build with
a 64-bit version of ghc.
2017-05-16 09:17:32 +02:00
John MacFarlane
e01e2d0b9b MANUAL: remove refs to highlighting-kate.
Closes #3672.
2017-05-15 20:37:50 +02:00
John MacFarlane
37189667cc Textile reader: fix bug for certain links in table cells.
Closes #3667.
2017-05-15 20:36:11 +02:00
John MacFarlane
1e2dc33165 appveyor.yml: proper editbin path both times... 2017-05-15 19:50:37 +02:00
John MacFarlane
a97f69066e Fixed appveyor.yml syntax error. 2017-05-15 19:35:46 +02:00
John MacFarlane
6f8940882a appveyor.yml: proper path for editbin.
I hope.
2017-05-15 19:27:15 +02:00
John MacFarlane
8e6ea699e9 appveyor.yml: Don't install hsb2hs.
We now use file-embed instead.
2017-05-15 19:26:37 +02:00
John MacFarlane
6ddf78b8a0 appveyor.yml: make executables LARGEADDRESSAWARE
using editbin, which comes with VisualStudio.

This should help with #3669 (needs testing).
Previously our executables could only access 2GB memory on Windows,
even in 64 bit systems with lots of memory.
2017-05-15 17:42:10 +02:00
John MacFarlane
0a9368ee35 Debian control: updated description. 2017-05-15 17:06:41 +02:00
John MacFarlane
3d6bedff35 Debian control: added latex packages as 'suggested'. 2017-05-15 17:06:28 +02:00
Henri Werth
2de5208311 Added support for horizontal spacing in LaTeX: parse \, to \8198 (six-per-em space) 2017-05-15 16:37:08 +02:00
John MacFarlane
000293a4e3 Merge pull request #3668 from tarleb/copyright-update
Update copyright notices
2017-05-15 16:30:33 +02:00
Albert Krewinkel
af4bf91c59
Org reader: add basic file inclusion mechanism
Support for the `#+INCLUDE:` file inclusion mechanism was added.
Recognized include types are *example*, *export*, *src*, and normal org
file inclusion.  Advanced features like line numbers and level selection
are not implemented yet.

Closes: #3510
2017-05-14 12:45:31 +02:00
Albert Krewinkel
9d295f4527
Parsing: add insertIncludedFilesF which returns F blocks
The `insertIncludeFiles` function was generalized and renamed to
`insertIncludedFiles'`; the specialized versions are based on that.
2017-05-14 12:40:16 +02:00
Albert Krewinkel
5ff6108b4c
Parsing: introduce HasIncludeFiles type class
The `insertIncludeFile` function is generalized to work with all parser
states which are instances of that class.
2017-05-14 10:00:58 +02:00
Albert Krewinkel
7a17c3eb9f
Parsing: replace partial with total function
Calling `tail` on an empty list raises an exception, while calling the
otherwise equivalent `drop 1` will return the empty list again.
2017-05-14 09:28:08 +02:00
Albert Krewinkel
09ef99477d
COPYRIGHT: list new files not written by John 2017-05-13 23:50:39 +02:00
Albert Krewinkel
965f1ddd4a
Update dates in copyright notices
This follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-05-13 23:30:13 +02:00
Albert Krewinkel
1cbb3bad2b
Add haddock module description to FB2 writer
Copyright, maintainer etc. were missing in haddock docs for this module.
2017-05-13 23:18:50 +02:00
Albert Krewinkel
62d34c79b9
Change maintainer line in Org writer module 2017-05-13 23:18:10 +02:00
Alexander Krotov
2a291e437a Replace repeat' and take' with `replicate' once more 2017-05-12 16:31:57 +02:00
Alexander Krotov
c14c8a1a68 Replace repeat' and take' with `replicate' 2017-05-12 07:36:03 +02:00
Albert Krewinkel
4b9fb7a128 Combine grid table parsers
The grid table parsers for markdown and rst was combined into one single
parser, slightly changing parsing behavior of both parsers:

- The markdown parser now compactifies block content cell-wise: pure
  text blocks in cells are now treated as paragraphs only if the cell
  contains multiple paragraphs, and as plain blocks otherwise. Before,
  this was true only for single-column tables.

- The rst parser now accepts newlines and multiple blocks in header
  cells.

Closes: #3638
2017-05-11 00:17:56 +02:00
Václav Haisman
7bdf38ef2e LaTeX: Load parskip before hyperref. (#3654)
* LaTeX: Load `parskip` before `hyperref`.

According to `hyperref` package's `README.pdf`, page 22, `hyperref` package
should be loaded after `parskip` package.

* Adjust tests for previous change.
2017-05-09 22:09:10 +02:00
Václav Haisman
5048be5112 Fix links inside captions in LaTeX output with links-as-notes.
Declare our redefined `\href` robust.

Fixes #3651. (#3652)
2017-05-08 12:07:01 +02:00
David A Roberts
cff6d2dd73 Markdown writer: missing \n (#3647) 2017-05-07 23:11:57 +02:00
Alexander Krotov
69110cde81 Muse writer: Indent tables with one space (#3649)
It is required to trigger Muse table rendering.
2017-05-07 21:41:38 +02:00
John MacFarlane
6b086acae8 Rename fillMedia -> fillMediaBag. 2017-05-07 21:03:18 +02:00
John MacFarlane
a902109c6d PDF: use fillMedia and extractMedia to extract media to tmp dir.
This reduces code duplication.
We should be able to do something similar in ODT, Docx, EPUB writers.
2017-05-07 20:57:16 +02:00
John MacFarlane
af7215a048 Moved fillMedia, extractMedia from App to Class.
Also generalized type of fillMedia to any instance of PandocMonad.
2017-05-07 20:42:32 +02:00
John MacFarlane
99be906101 Added PandocHttpException, trap exceptions in fetching from URLs.
Closes #3646.
2017-05-07 13:11:04 +02:00
John MacFarlane
d414b2543a Remove https flag.
Supporting two completely different libraries for fetching
from URLs makes it difficult to trap errors, because of
different error types expected from the libraries.

There's no clear reason not to build with these https-capable
libraires.
2017-05-07 12:49:25 +02:00
John MacFarlane
f8e125f42d fillMediaBag: don't cause fatal error if resource not found.
Report warning instead and change image to its alt text.
2017-05-07 12:16:14 +02:00
John MacFarlane
af8860d26a Updated documentation for --extract-media. 2017-05-07 11:56:19 +02:00