Commit graph

10636 commits

Author SHA1 Message Date
John MacFarlane
532cfcc59f Update stack.yaml to work with stackage nightly.
We now compile on nightly.
2018-03-20 08:53:47 -07:00
Alexander Krotov
81afcdfaf8 Muse writer: escape "]" in image title 2018-03-20 15:01:53 +03:00
Alexander Krotov
bc0025d944 Muse writer: remove key-value pairs from attributes before normalization 2018-03-20 14:51:39 +03:00
Alexander Krotov
268c73c873 Muse writer: escape ";" to avoid accidental comments 2018-03-20 12:16:34 +03:00
Alexander Krotov
d63bba3066 Muse writer: escape "]" brackets in URLs as "%5D" 2018-03-20 12:16:34 +03:00
John MacFarlane
43677682d8 Use pandoc-citeproc 0.14.3. 2018-03-19 23:45:55 -07:00
HeirOfNorton
f5b89b5adb Fix example in lua-filters docs. Fixes #4459 (#4476) 2018-03-19 21:43:43 -07:00
John MacFarlane
904f82176d MANUAL: specify that you use html for raw output in epub. 2018-03-19 16:00:49 -07:00
John MacFarlane
a8359c69de Removed old lib directory.
This was used for something long ago, but plays no role now.
2018-03-19 11:57:59 -07:00
John MacFarlane
2c2cd31806 Small improvement of doc change in #4472.
Mention other formats as well where a different
name is needed.
2018-03-19 09:22:41 -07:00
Tristan Stenner
24faccdf5d Add examples for raw docx blocks (#4472)
The documentation states that the target format name should match the output format, which isn't the case for `docx`/`openxml`.

This PR adds a remark and a frequently requested example (inserting a pagebreak in docx output) to the documentation.
2018-03-19 09:20:16 -07:00
John MacFarlane
d6f9715230 Bumped some versions in stack.yaml. 2018-03-18 15:25:55 -07:00
John MacFarlane
735a3ed096 Fixed duplicate entry in stack.lts9.yaml. 2018-03-18 15:19:01 -07:00
John MacFarlane
3d21c184d4 Ms writer: don't escape hyphens.
Previously we escaped hyphens as `\-`, but that's a minus sign.
Closes #4467.

Updated changelog.
2018-03-18 14:52:03 -07:00
John MacFarlane
0ef56657ed Comment out Muse reader round-trip test.
It fails too often.  Perhaps a separate test program should
be used to hunt for round-trip bugs.
2018-03-18 12:43:36 -07:00
John MacFarlane
6fdf0c4d9d Removed unnecessary import. 2018-03-18 12:40:05 -07:00
John MacFarlane
b9bb2be3be Update changelog. 2018-03-18 11:58:34 -07:00
John MacFarlane
9dac007228 Make 'weigh-pandoc' into a benchmark program.
Remove 'weigh-pandoc' flag.  This is now built (and run)
automatically when you build (and run) benchmarks.
2018-03-18 11:52:40 -07:00
John MacFarlane
48f0e73c55 Added Prelude imports to sources in benchmark and trypandoc. 2018-03-18 11:52:40 -07:00
Björn Buckwalter
daef5530b4 Missing backticks (#4462) 2018-03-18 11:35:32 -07:00
Mauro Bieg
ec47079d3e EPUB writer: remove notes from TOC in nav.xhtml (#4463)
fixes #4453
2018-03-18 11:34:34 -07:00
John MacFarlane
937bec95a9 Removed old-locale flag and Text.Pandoc.Compat.Time.
This is no longer necessary since we no longer support ghc 7.8.
2018-03-18 11:24:29 -07:00
John MacFarlane
7e389cb3db Use NoImplicitPrelude and explicitly import Prelude.
This seems to be necessary if we are to use our custom Prelude
with ghci.

Closes #4464.
2018-03-18 10:46:28 -07:00
John MacFarlane
daf731a001 pandoc.cabal: fix up other-extensions and language fields.
language is now consistently Haskell2010, and other-extensions
is consistently NoImplicitPrelude. Everything else to be specified
in the module header as needed.
2018-03-18 10:45:32 -07:00
John MacFarlane
82ff503210 Fix what was missing in last commit. 2018-03-18 09:47:38 -07:00
John MacFarlane
dd53545154 New approach to custom Prelude.
We use no custom Prelude with the latest ghc version (8.4.1),
so we don't have problems with ghci.

See https://ghc.haskell.org/trac/ghc/ticket/10920
https://www.reddit.com/r/haskell/comments/3ryf2p/how_can_you_use_a_custom_prelude_with_ghci/

This may help with #4464.
2018-03-18 09:20:21 -07:00
John MacFarlane
09a32de173 Man page update. 2018-03-18 09:20:14 -07:00
John MacFarlane
1683185e98 Use pandoc-citeproc 0.14.2. 2018-03-17 22:50:58 -07:00
John MacFarlane
dfa1dc164a hlint fixes. 2018-03-17 22:00:55 -07:00
John MacFarlane
73f9ba4a00 stack.yaml - don't force latest haddock-library. 2018-03-17 21:50:16 -07:00
John MacFarlane
1ec8b5b92d Manual formatting tweaks. 2018-03-17 21:27:57 -07:00
John MacFarlane
43e6cdedfc Update changelog. 2018-03-17 21:11:42 -07:00
Henri Menke
46f4238a2a ConTeXt template: pdfa variable to generate PDF/A (#4294)
The resulting PDF can be verified using the Apache PDFBox preflight app.

```
$ java -jar preflight-app-2.0.8.jar test.pdf 
The file test.pdf is a valid PDF/A-1b file
```

Instructions on how to install the ICC profiles on ConTeXt standalone can be found in the wiki: <http://wiki.contextgarden.net/PDFX#ICC_profiles>.
If the ICC profiles are not available the log will contain messages like these

```
backend         > profiles > profile specification 'sRGB.icc' loaded from '/usr/local/texlive/2017/texmf-dist/tex/context/colors/icc/context/colorprofiles.xml'
backend         > profiles > error, couldn't locate profile 'srgb.icc'
backend         > profiles > no default profile 'srgb.icc' for colorspace 'rgb'
backend         > profiles > profile specification 'sRGB IEC61966-2.1' loaded from '/usr/local/texlive/2017/texmf-dist/tex/context/colors/icc/context/colorprofiles.xml'
backend         > profiles > error, couldn't locate profile 'srgb.icc'
backend         > profiles > invalid output intent 'sRGB IEC61966-2.1'
```

and the resulting PDF will not be valid PDF/A:

```
$ java -jar preflight-app-2.0.8.jar test.pdf 
The file test.pdf is not a valid PDF/A-1b file, error(s) :
2.4.3 : Invalid Color space, The operator "g" can't be used without Color Profile on page 1
2.4.3 : Invalid Color space, The operator "G" can't be used without Color Profile on page 1
2.4.3 : Invalid Color space, /DeviceGray default for operator "TJ" can't be used without Color Profile on page 1
2.4.3 : Invalid Color space, /DeviceGray default for operator "TJ" can't be used without Color Profile on page 1
2.4.3 : Invalid Color space, The operator "g" can't be used without Color Profile on page 1
2.4.3 : Invalid Color space, The operator "G" can't be used without Color Profile on page 1
2.4.3 : Invalid Color space, /DeviceGray default for operator "TJ" can't be used without Color Profile on page 1
```

However, the PDF will still be generated and the "errors" shown in the log do not break anything.
2018-03-17 21:05:55 -07:00
Marc Schreiber
155a2ac039 Add support to parse unit string of \SI command (closes #4296). 2018-03-17 20:59:20 -07:00
John MacFarlane
14cc82bcc7 Update changelog. 2018-03-17 20:49:15 -07:00
John MacFarlane
fef484c4d0 Fixed typo introduced in merge. 2018-03-17 20:41:11 -07:00
John MacFarlane
01f7f8da62 Update man page. 2018-03-17 20:40:16 -07:00
Francesco Occhipinti
ba965d1736 RST writer: filter out empty inline containers (#4434).
There is nothing in RST that corresponds to e.g. `Emph []`, so we just filter out elements like this.
2018-03-17 20:39:26 -07:00
Francesco Occhipinti
e5845f33ad Don't wrap lines in grid tables when --wrap=none (#4320)
* Annotate gridTable code with comments and abstract small functions
* Don't wrap lines in tables when `--wrap=none`.  Instead, expand cells, even if
   it results in cells that don't respect relative widths or surpass page column width.
* This change affects RST, Markdown, and Haddock writers.
2018-03-17 20:31:43 -07:00
Václav Haisman
2ddf2257dc Provide bidi package's option using \PassOptionsToPackage (#4357).
* Provide `bidi` package's option using `\PassOptionsToPackage`.  This avoid clash when   `polyglossia` loads it first and then it is loaded again for XeLaTeX when `latex-dir-rtl` defined.

* Adjust test suite for LaTeX template change.
2018-03-17 20:20:57 -07:00
Francesco Occhipinti
90a705c8af RST writer: separate inline transformation logic from writing logic (#4438)
This is to help enable solutions  solutions to #4434 and #4368.
2018-03-17 20:17:55 -07:00
Francesco Occhipinti
65cc909fde RST writer: strip whitespace within inlines, closes #4327 (#4329)
+ Whitespace is ignored at the beginning and end of emphasis, as per
  <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup>.
+ Export `stripLeadingTrailingSpace` from `Text.Pandoc.Writers.Shared`.
2018-03-17 19:21:27 -07:00
John MacFarlane
59903ec82c Bump to 2.1.3, update changelog. 2018-03-17 19:00:20 -07:00
John MacFarlane
049dacf85f Removed redundant import of <> 2018-03-17 17:17:47 -07:00
John MacFarlane
afb72f1857 Add semigroups dependency to executables...
since custom prelude depends on it.
2018-03-17 17:10:02 -07:00
John MacFarlane
605545e024 Work around Monoid/Semigroup-related compiler errors GHC 7.10. 2018-03-17 14:25:05 -07:00
John MacFarlane
2eba15c181 More CSS around DocTable in Haddock reader. 2018-03-17 08:18:15 -07:00
Mauro Bieg
8a5b3368b2
INSTALL.md don't advise to always build tests 2018-03-17 15:47:22 +01:00
John MacFarlane
fad8d0d67f Allow earlier versions of haddock-library, use CPP. 2018-03-16 23:18:42 -07:00
John MacFarlane
be12ae3bca Better table handling for Haddock.
In the reader, we use the new Table type in Haddock.
Note that tables with col/rowspans will not translate
well into Pandoc.

In the writer, we now render tables always as grid tables,
since Haddock supports these.
2018-03-16 22:38:34 -07:00