Commit graph

7304 commits

Author SHA1 Message Date
John MacFarlane
86f6d7921d Added pandoc-citeproc back to extra-deps. 2016-09-23 13:00:18 +02:00
John MacFarlane
c1d26a20cc Use lts-7.0 in stack.yaml files. 2016-09-23 12:50:56 +02:00
John MacFarlane
c55233fc2d Update changelog. 2016-09-23 12:20:42 +02:00
John MacFarlane
fd3520b97a Bump to 1.17.3 2016-09-23 12:20:34 +02:00
Jesse Rosenthal
581fc0130b LaTeX writer: change braced backtick to \textasciigrave{}
Backticks in verbatim environments are converted to
open-single-quotes. This change makes them appear as backticks. This
corresponds to how we treat `'' in verbatim environments (with
\textquotesingle{}).
2016-09-20 09:44:35 -04:00
John MacFarlane
02e4b7da89 Merge pull request #3071 from tarleb/structured-author-doc
Put note on structured vars in separate paragraph
2016-09-20 11:31:49 +02:00
Jesse Rosenthal
9c1467e848 Add test for backtick in verbatim. 2016-09-19 16:34:28 -04:00
Jesse Rosenthal
5b5f55a710 LaTeX writer: enclose backtick in {} in verbatim
We don't want ligatures like ` ?` ` (which produces `¿`) inside
`\texttt{}` environments, so we enclose the backtick in braces.

This fixes #3121
2016-09-19 16:23:28 -04:00
John MacFarlane
fd4831dd03 DocBook writer: include an anchor element when a div or span has an id.
This closes #3102.  Note that DocBook does not have a class attribute,
but at least this provides an anchor for internal links.
2016-09-06 10:09:52 +02:00
Jesse Rosenthal
09d96bb884 Remove unnecessary CPP in custom Prelude.
We don't have to worry about base < 4.7.
2016-09-03 15:23:32 -04:00
Jesse Rosenthal
3f82471355 Remove http-client CPP conditionals.
Our lower bound on http-client is 0.5, and both of these min_version
tests are less than 0.5, so they will always pass.
2016-09-03 08:41:00 -04:00
Jesse Rosenthal
7d9f2d3657 Remove blaze-html CPP conditional.
This tests for a min value >= 0.5. But we have a lower bound of 0.5 in
pandoc.cabal, so the test will always pass.

(If we bump the lower bound to 0.5.1, we can remove a conditional in the
HTML writer as well.)
2016-09-03 08:40:13 -04:00
Jesse Rosenthal
df1ca2b1a5 Add EOL note to time compat module.
Because time 1.4 is a boot library for GHC 7.8, we will support the
compatibility module as long as we support 7.8. But we should be clear
about when we will no longer need it.
2016-09-03 08:10:53 -04:00
Jesse Rosenthal
3f8d3d844f Remove TagSoup compat
We already lower-bound tagsoup at 0.13.7, which means we were always
running the compatibility layer (it was conditional on min value
0.13). Better to just use `lookupEntity` from the library directly, and
convert a string to a char if need be.
2016-09-02 12:28:53 -04:00
Albert Krewinkel
c9a631e4eb Remove GHC 7.6 from list of tested versions
GHC versions below 7.8 are no longer supported nor tested.
2016-09-02 16:58:59 +02:00
Jesse Rosenthal
e8f4f4903b Add note about GHC version support to INSTALL.
Only supporting ghc > 7.8, and encouraging haskell platform.
2016-09-02 10:12:37 -04:00
Jesse Rosenthal
10567f2e5a Bump supported ghc version in CONTRIBUTING.md. 2016-09-02 09:18:10 -04:00
Jesse Rosenthal
eee780b943 Bump base lower bound to 4.7
We are dropping support for ghc < 7.8.
2016-09-02 09:18:10 -04:00
Jesse Rosenthal
8701899b52 Remove 7.6 build from .travis.yaml
We are dropping support for ghc < 7.8
2016-09-02 09:18:10 -04:00
Jesse Rosenthal
99d5d1c5c7 Bump base lower bound to 4.6 (ghc 7.6) 2016-09-02 09:18:09 -04:00
Jesse Rosenthal
c613dbde01 Remove unnecessary CPP condition in UTF8
Base 4.4 is ghc 7.2, so we don't have to worry about getting a lower version.
2016-09-02 09:18:09 -04:00
Jesse Rosenthal
7ea16ad058 Actually remove T/P/Compat/Except. 2016-09-02 09:18:09 -04:00
Jesse Rosenthal
121e3dfb64 Change constraint on mtl. 2016-09-02 09:18:09 -04:00
Jesse Rosenthal
f72e3b58e8 Remove directory compat
directory 1.1 depends on base 4.5 (ghc 7.4) which we are no longer
supporting. So we don't have to use a compatibility layer for it.
2016-09-02 09:18:09 -04:00
Jesse Rosenthal
7f676b534a Remove Text.Pandoc.Compat.Except 2016-09-02 09:18:09 -04:00
Jesse Rosenthal
26c3705da4 Fix grouping of imports.
Some source files keep imports in tidy groups. Changing
`Text.Pandoc.Compat.Monoid` to `Data.Monoid` could upset that. This
restores tidiness.
2016-09-02 09:18:09 -04:00
Jesse Rosenthal
1cdebe1170 Remove an inline monad compatibility macro. 2016-09-02 09:18:08 -04:00
Jesse Rosenthal
45c7108b4f Remove Compat.Monoid
This was only necessary for GHC versions with base below 4.5
(i.e., ghc < 7.4).
2016-09-02 09:18:08 -04:00
John MacFarlane
b0013bfb13 PDF: Don't crash with nonexistent image.
Instead, emit the alt text, emphasized.  This accords with what
the ODT writer currently does.

The user will still get a warning about a nonexistent image,
but will no longer get a LaTeX crash.

Closes #3100.
2016-09-02 11:44:50 +02:00
John MacFarlane
07c67cf868 Merge pull request #3091 from wilx/master-narrow-no-break-space
Translate NARROW NO-BREAK SPACE into LaTeX.
2016-09-02 11:42:18 +02:00
Albert Krewinkel
21cd76c201
Org reader: respect unnumbered header property
Sections the `unnumbered` property should, as the name implies, be
excluded from the automatic numbering of section provided by some output
formats.  The Pandoc convention for this is to add an "unnumbered" class
to the header.  The reader treats properties as key-value pairs per
default, so a special case is added to translate the above property to a
class instead.

Closes #3095.
2016-08-30 18:10:24 +02:00
Jesse Rosenthal
abc4bca46b Docx reader: make all compilers happy with traversable.
The last attempt to make 7.8 happy made 7.10 unhappy. So we need some
conditional logic to appease all versions.
2016-08-29 23:16:40 -04:00
Jesse Rosenthal
773adc7804 Docx reader: Import traverse for ghc 7.8
The GHC 7.8 build was erroring without it.
2016-08-29 21:34:26 -04:00
Jesse Rosenthal
7ae9621a87 Docx reader: clean up function with traverse 2016-08-29 18:56:24 -04:00
Albert Krewinkel
a3a3e3fdbf
Merge branch 'org-meta-handling' 2016-08-29 14:42:23 +02:00
Jesse Rosenthal
fcbb37c8f3 Docx reader: test for nested anchor spans in header
This ensures that anchor spans in header with content (or with other
anchor spans inside) will resolve to links to a header id properly.
2016-08-29 08:35:59 -04:00
Albert Krewinkel
88313c0b93
Org reader: respect creator export option
The `creator` option controls whether the creator meta-field should be
included in the final markup.  Setting `#+OPTIONS: creator:nil` will
drop the creator field from the final meta-data output.

Org-mode recognizes the special value `comment` for this field, causing
the creator to be included in a comment.  This is difficult to translate
to Pandoc internals and is hence interpreted the same as other truish
values (i.e. the meta field is kept if it's present).
2016-08-29 14:35:16 +02:00
Albert Krewinkel
0568aa5cad
Org reader: respect email export option
The `email` option controls whether the email meta-field should be
included in the final markup. Setting `#+OPTIONS: email:nil` will drop
the email field from the final meta-data output.
2016-08-29 14:34:39 +02:00
Albert Krewinkel
117d3f4d92
Org reader: respect author export option
The `author` option controls whether the author should be included in
the final markup.  Setting `#+OPTIONS: author:nil` will drop the author
from the final meta-data output.
2016-08-29 14:33:18 +02:00
Albert Krewinkel
ad625782b1
Put Org reader export option tests into test group
Using a separate test group instead of prefixing the test subject should
be clearer than the current approach.
2016-08-29 14:10:57 +02:00
Albert Krewinkel
28d17ea70f
Org reader: read HTML_head as header-includes
HTML-specific head content can be defined in `#+HTML_head` lines.  They
are parsed as format-specific inlines to ensure that they will only show
up in HTML output.
2016-08-29 14:10:57 +02:00
Albert Krewinkel
d164ead379
Org reader: set classoption meta from LaTeX_class_options 2016-08-29 14:10:57 +02:00
Albert Krewinkel
825ce8ca73
Org reader: set documentclass meta from LaTeX_class 2016-08-29 14:10:57 +02:00
Albert Krewinkel
a257488343
Org reader: read LaTeX_header as header-includes
LaTeX-specific header commands can be defined in `#+LaTeX_header` lines.
They are parsed as format-specific inlines to ensure that they will only
show up in LaTeX output.
2016-08-29 14:10:57 +02:00
Albert Krewinkel
75df104215
Org reader: give precedence to later meta lines
The last meta-line of any given type is the significant line.
Previously the value of the first line was kept, even if more lines of
the same type were encounterd.
2016-08-29 14:10:57 +02:00
Albert Krewinkel
2ca2585b35
Org reader: allow multiple, comma-separated authors
Multiple authors can be specified in the `#+AUTHOR` meta line if they
are given as a comma-separated list.
2016-08-29 14:10:57 +02:00
Albert Krewinkel
153970bef5
Org reader: read markup only for special meta keys
Most meta-keys should be read as normal string values, only a few are
interpreted as marked-up text.
2016-08-29 14:10:56 +02:00
Albert Krewinkel
bed5f700ce
Org reader: extract meta parsing code to module
Parsing of meta-data is well separable from other block parsing tasks.
Moving into new module to get small files and clearly arranged code.
2016-08-29 14:10:51 +02:00
Jesse Rosenthal
95734b2951 Docx reader: update copyright. 2016-08-28 22:53:19 -04:00
Jesse Rosenthal
9f6fd6139f Docx reader: use all anchor spans for header ids.
Previously we only used the first anchor span to affect header ids. This
allows us to use all the anchor spans in a header, whether they're
nested or not.

Along with 62882f97, this closes #3088.
2016-08-28 18:12:02 -04:00