Commit graph

8598 commits

Author SHA1 Message Date
John MacFarlane
2fe806e9ac Added --abbreviations=FILE option for custom abbreviations file. 2017-03-16 21:45:50 +01:00
John MacFarlane
38c3a68346 LaTeX/Beamer writer: allow hyperlinks to frames.
Previously you could link to a header above or below slide
level but not TO slide level.  This commit changes that.
Hypertargets are inserted inside frame titles; technically
the reference is to just after the title, but in normal
use (where slides are viewed full screen in a slide show),
this does not matter.

Closes #3220.
2017-03-16 10:15:14 +01:00
John MacFarlane
257d96f199 Makefile: allow make test to take TESTARGS. 2017-03-15 17:22:07 +01:00
John MacFarlane
482e5b78a0 OpenDocument writer: use more widely available bullet characters.
The old characters weren't available in some font sets.
These seem to work well on Windows and Linux versions of LibreOffice.

Closes #1400.
2017-03-15 17:19:28 +01:00
John MacFarlane
cc57e36180 Removed another unused cabal dependency. 2017-03-15 15:20:37 +01:00
John MacFarlane
befaf037ce Removed some unnecessary build-depends. 2017-03-15 15:12:14 +01:00
John MacFarlane
2827570c6a Fixed weigh-pandoc so it compiles again. 2017-03-15 15:00:17 +01:00
John MacFarlane
2235c2a8f7 Use tasty-golden for golden tests in Old. 2017-03-15 00:27:39 +01:00
John MacFarlane
93c49a2865 Command tests: just findPandoc once. 2017-03-14 23:39:28 +01:00
John MacFarlane
14edbd2967 Removed unneeded import. 2017-03-14 21:30:15 +01:00
John MacFarlane
6cb54c3def Got rid of distracting warning in test output. 2017-03-14 21:06:14 +01:00
John MacFarlane
ebbaf2e965 Small test plumbing improvement. 2017-03-14 17:27:30 +01:00
John MacFarlane
6ecc5b96a9 Use tasty for tests rather than test-framework. 2017-03-14 17:07:23 +01:00
John MacFarlane
0b4ae3af66 Removed unused symbol. 2017-03-13 22:21:50 +01:00
John MacFarlane
6bf3f89d69 Better handling of \part in LaTeX.
Closes #1905.

Removed stateChapters from ParserState.

Now we parse chapters as level 0 headers, and parts as level -1 headers.
After parsing, we check for the lowest header level, and if it's
less than 1 we bump everything up so that 1 is the lowest header level.
So `\part` will always produce a header; no command-line options
are needed.
2017-03-13 22:11:10 +01:00
John MacFarlane
d5086e7bd7 Docx writer: Support 9 levels of headers.
Closes #1642.
2017-03-13 21:48:00 +01:00
John MacFarlane
4de4816b99 RST writer: convert to PandocMonad, report on unrendered raw items. 2017-03-13 21:32:58 +01:00
John MacFarlane
2bbe6edffd ISSUE_TEMPLATE: add URL for pandoc-discuss. 2017-03-13 14:38:07 +01:00
John MacFarlane
8b6a974f59 Added github ISSUE_TEMPLATE. 2017-03-13 14:34:00 +01:00
John MacFarlane
db37b71d9a Highlighting: highlighting now returns an Either rather than Maybe.
This allows us to display error information returned by the
skylighting library.

Display a warning if the highlighting library throws an error.
2017-03-13 11:38:19 +01:00
John MacFarlane
efcb51bcb0 Put TEI writer inside PandocMonad. Added warnings for omitted raw elements.
Also added identifiers on `<div>` elements.  These were commented
out before, not sure why?
2017-03-13 11:08:17 +01:00
Albert Krewinkel
0196ca893d
Org reader: interpret more meta value as inlines
The values of the following meta variables are now interpreted using
org-markup instead of treating them as pure strings:

- *keywords*: comma-separated list of inlines
- *subtitle*: inline values
- *nocite*: inline values; using it multiple times accumulates the
    values.
2017-03-12 23:29:39 +01:00
John MacFarlane
1012e668cf Converted DokuWiki writer to use PandocMonad. 2017-03-12 23:15:22 +01:00
John MacFarlane
df7a443f67 MediaWiki writer: use PandocMonad. 2017-03-12 23:09:00 +01:00
John MacFarlane
2f8f8f0da6 Issue warning for duplicate header identifiers.
As noted in the previous commit, an autogenerated identifier
may still coincide with an explicit identifier that is given
for a header later in the document, or with an identifier on
a div, span, link, or image. This commit adds a warning
in this case, so users can supply an explicit identifier.

* Added `DuplicateIdentifier` to LogMessage.
* Modified HTML, Org, MediaWiki readers so their custom
  state type is an instance of HasLogMessages.  This is necessary
  for `registerHeader` to issue warnings.

See #1745.
2017-03-12 22:07:28 +01:00
John MacFarlane
c8b906256d Improved behavior of auto_identifiers when there are explicit ids.
Previously only autogenerated ids were added to the list
of header identifiers in state, so explicit ids weren't taken
into account when generating unique identifiers.  Duplicated
identifiers could result.

This simple fix ensures that explicitly given identifiers are
also taken into account.

Fixes #1745.

Note some limitations, however.  An autogenerated identifier
may still coincide with an explicit identifier that is given
for a header later in the document, or with an identifier on
a div, span, link, or image.  Fixing this would be much more
difficult, because we need to run `registerHeader` before
we have the complete parse tree (so we can't get a complete
list of identifiers from the document by walking the tree).

However, it might be worth issuing warnings for duplicate
header identifiers; I think we can do that.  It is not
common for headers to have the same text, and the issue
can always be worked around by adding explicit identifiers,
if the user is aware of it.
2017-03-12 21:30:04 +01:00
John MacFarlane
3765f08304 Revert "Shared: export extractIds."
This reverts commit 0ef1e51211.
2017-03-12 21:18:19 +01:00
John MacFarlane
0ef1e51211 Shared: export extractIds.
This will be used to help with #1745.
2017-03-12 12:42:03 +01:00
John MacFarlane
cf0a1b2034 MANUAL: Small clarification in YAML metadata section. 2017-03-12 10:08:34 +01:00
John MacFarlane
62becc1536 Changed test case labeled 3384.md to 3348.md.
The last commit referred to #3384, but should have
closed #3348.
2017-03-11 23:29:57 +01:00
John MacFarlane
d66b046c8a Markdown writer: fixed bugs in simple/multiline list output.
* Previously we got overlong lists with `--wrap=none`.  This is fixed.
* Previously a multiline list could become a simple list (and would
  always become one with `--wrap=none`).

Closes #3384.
2017-03-11 23:24:14 +01:00
John MacFarlane
be733385c9 Markdown reader: optimized nonindentSpaces.
Makes the benchmark go from 40 to 36 ms.
2017-03-11 18:42:39 +01:00
John MacFarlane
ac15b0443f ConTeXt writer: converted to use PandocMonad. 2017-03-10 20:54:52 +01:00
John MacFarlane
ba78b75146 Removed normalizeSpaces from Text.Pandoc.Shared.
Rewrote functions in RST reader and writer to avoid the need
for it.

Closes #1530.
2017-03-10 20:45:21 +01:00
John MacFarlane
a197dc9d3f Docx reader: more efficient trimSps.
Replacing trimLineBreaks.  This does the work of
normalizeSpaces as well, so we avoid the need for that
function here.

See #1530.
2017-03-10 20:34:25 +01:00
John MacFarlane
9862d7c359 Shared.normalizeSpaces: strip off leading/trailing line breaks...
...not just spaces.
2017-03-10 20:33:14 +01:00
Alexander Krotov
d037c5019d Add Muse writer (#3489)
* Add Muse writer

* Advertise new Muse writer

* Muse writer: add regressions tests
2017-03-10 10:16:27 +01:00
John MacFarlane
ebb2acb890 stack.yaml: Use texmath 0.9.3. 2017-03-10 10:15:39 +01:00
John MacFarlane
21ae5db20c Use pMacroDefinition in macro (for more direct parsing).
This is newly exported in texmath 0.9.3.

Note that this means that `macro` will now parse one
macro at a time, rather than parsing a whole group together.
2017-03-10 10:12:51 +01:00
John MacFarlane
c46febaaee Expand \newenvironment macros.
Closes #987.

Depends on still unreleased texmath 0.9.3.
2017-03-10 09:46:32 +01:00
John MacFarlane
a088d67f0d LaTeX reader: Treat {{xxx}} the same as {xxx}.
Closes #2115.
2017-03-09 21:03:54 +01:00
John MacFarlane
1ec6a19223 Changed display format for messages. 2017-03-09 10:30:57 +01:00
John MacFarlane
1e78aec88e HTML writer: info message if 'lang' is unspecified.
Closes #3486.
2017-03-09 10:21:11 +01:00
John MacFarlane
11e57c4d18 Logging: Added NoLangSpecified, use toConstr to avoid boilerplate. 2017-03-09 10:20:30 +01:00
John MacFarlane
239a17a986 HTML writer: fallback to basename rather than Untitled. 2017-03-09 09:41:22 +01:00
John MacFarlane
fd35661646 Remove space at beginning/end of RST code span.
Otherwise we get invalid RST.  There seems to be no
way to escape the space.

Closes #3496.
2017-03-08 19:06:32 +01:00
Albert Krewinkel
c91f168fc9 Org reader: disallow tables on list marker lines
Fixes: #3499
2017-03-08 15:45:00 +01:00
John MacFarlane
5487190d69 Travis: Remove GHC HEAD build.
This pretty much always fails due to dependencies.
2017-03-08 12:57:49 +01:00
John MacFarlane
19ad29f493 Travis: comment out OSX build.
This always takes forever to complete.
Since I develop on OSX anyway, it's not so urgent.
2017-03-08 12:57:07 +01:00
John MacFarlane
bcfb77e2ab Markdown writer: Avoid spurious blanklines at end of document...
after tables and list, for example.
2017-03-08 12:47:39 +01:00