Commit Graph
11356 Commits
Author SHA1 Message Date
Alexander Krotov 9ee00fc0f8 Get rid of unnecessary bind "res" 2018-10-09 11:58:59 +03:00
John MacFarlane 58eb78c437 Fixed tests for new skylighting. 2018-10-08 23:16:50 -07:00
John MacFarlane 2e9a8d207b Require skylighting 0.7.4.
Closes #4920.
2018-10-08 22:48:13 -07:00
John MacFarlane 6d87af8882 LaTeX writer with --listings: don't pass through org-babel attributes.
So far: just, tangle, exports, results which are used by org mode.
It might be better to use a whitelist of legal listings attributes, but
there are a large number, and these may change.

Closes #4889.
2018-10-08 21:45:39 -07:00
John MacFarlane f8879ee0a1 Add helpful suggestion to missing title warning.
Tell users what to add to the command line to avoid the warning.
Closes #4909.
2018-10-08 21:33:25 -07:00
John MacFarlane a92e43575f LaTeX writer: with --biblatex, use \autocite when possible.
`\autocites{a1}{a2}{a3}` will not collapse the entries.
So, if we don't have prefixes and suffixes, we use instead
`\autocite{a1;a2;a3}`.

Closes #4960.
2018-10-08 20:47:09 -07:00
John MacFarlane b60c64d06e ODT writer: improve metadata.
- Author, date added to metadata.
- Remaining metadata properties (besides author, date, title, lang)
  are added as meta:user-defined tags.
2018-10-08 14:33:27 -07:00
John MacFarlane b02c25b2ca Docx writer: handle tables in table cells.
Although this is not documented in the spec, some versions of
Word require a 'w:p' element inside every table cell. Thus, we
add one when the contents of a cell do not already include one
(e.g. when a table cell contains a table).

Closes #4953.
2018-10-07 18:57:25 -07:00
John MacFarlane 145710c4c3 RST reader: don't allow single-dash separator in headerless table.
Closes #4382.
2018-10-07 12:37:08 -07:00
John MacFarlane b806bff5b4 LaTeX reader: fix bugs omitting raw tex.
The default is `-raw_tex`, so no raw tex should result
unless we explicitly say `+raw_tex`.  Previously some
raw commands did make it through.

Closes #4527.
2018-10-07 12:21:43 -07:00
John MacFarlane 9b481c8787 INSTALL: note about TinyTeX. 2018-10-07 12:21:28 -07:00
John MacFarlane 08fef6b210 RST reader: pass through fields in unknown directives as div attributes.
This commit also adds support for `class` and `name` attributes to
directives in general.

Closes #4715.
2018-10-07 11:44:11 -07:00
John MacFarlane f66a6704f9 Makefile - make .msi download targets more robust.
Now they should be insensitive to changes in the order
of the builds on appveyor.
2018-10-07 11:16:32 -07:00
John MacFarlane fd9d08f9d6 Revert export of hasSimpleCells from T.P.Writers.Shared.
This wasn't necessary.
2018-10-07 10:20:14 -07:00
John MacFarlane bd8a66394b RST writer: use simple tables when possible.
Closes #4750.

Text.Pandoc.Writers.Shared now exports hasSimpleCells [API change].
2018-10-06 22:33:24 -07:00
Albert Krewinkel 36a6a40ef7 Documentation: add draft for Lua objects reference 2018-10-06 21:48:25 +02:00
Albert Krewinkel 05efa5a0e6 Lua filter doc: fix description of Code.text 2018-10-06 21:48:24 +02:00
Alexander Krotov 73afce113b Moved Haddock comment in Muse reader 2018-10-06 15:21:24 +03:00
Brian Leung e257b54124 Org reader: fix behavior for successive calls of #+EXCLUDE_TAGS. (#4951)
Calling `#+EXCLUDE_TAGS` multiple times should preserve the status of
the previously declared tags.
2018-10-05 22:21:20 -07:00
quasicomputational 6207bdeb68 CommonMark writer: add plain text fallbacks. (#4531)
Previously, the writer would unconditionally emit HTMLish output for
subscripts, superscripts, strikeouts (if the strikeout extension is
disabled) and small caps, even with raw_html disabled.

Now there are plain-text (and, where possible, fancy Unicode)
fallbacks for all of these corresponding (mostly) to the Markdown
fallbacks, and the HTMLish output is only used when raw_html is
enabled.

This commit adds exported functions `toSuperscript` and
`toSubscript` to `Text.Pandoc.Writers.Shared`.  [API change]

Closes #4528.
2018-10-05 21:33:14 -07:00
Brian Leung a26b3a2d6a Org reader: Add partial support for #+EXCLUDE_TAGS option. (#4950)
Closes #4284.

Headers with the corresponding tags should not appear in the output.

If one or more of the specified tags contains a non-tag character
like `+`, Org-mode will not treat that as a valid tag, but will
nonetheless continue scanning for valid tags. That behavior is not
replicated in this patch; entering `cat+dog` as one of the entries in
`#+EXCLUDE_TAGS` and running the file through Pandoc will cause the
parser to fail and result in the only excluded tag being the default, `noexport`.
2018-10-05 14:28:17 -07:00
John MacFarlane e4ca51c2a7 Fixed haddock error in Muse reader. 2018-10-05 12:32:48 -07:00
Alexander Krotov 9b715d0cf2 Muse reader: remove redundant bracket 2018-10-05 20:02:45 +03:00
Nils Carlson 6304720d8d OpenDocument writer: Implement table caption numbering (#4949)
Implement table caption numbering with a format
"Table 1: <caption>".

Translations are enabled and numbering is consecutive for
captioned tables, uncaptioned tables are not enumerated.

Captioned figures are now also numbered consecutively
and uncaptioned figures are not enumerated.
2018-10-05 09:58:23 -07:00
Alexander Krotov 90a4d693ef Muse reader: move museInLink state into ReaderT 2018-10-05 19:41:25 +03:00
Alexander Krotov 37cc977b12 Muse reader: use getIndent more for code cleanup 2018-10-05 19:14:13 +03:00
Alexander Krotov 131dcff71d Muse reader: use getIndent in parseHtmlContent 2018-10-05 18:47:45 +03:00
Alexander Krotov 659cce8442 Muse reader: make bulletListUntil similar to definitionListUntil 2018-10-05 18:31:48 +03:00
Alexander Krotov 7cfce586f6 Muse reader: reduce duplication by introducing getIndent 2018-10-05 18:27:05 +03:00
Alexander Krotov abd770c691 Muse reader internals: simplify parseMuse 2018-10-05 16:33:33 +03:00
Alexander Krotov 0ce7183c81 Muse reader: get rid of TagSoup import 2018-10-05 15:57:03 +03:00
Alexander Krotov ef4bc58cc1 Muse reader: simplify verse parsers 2018-10-05 13:43:52 +03:00
Alexander Krotov 5f7799ac8f Muse reader: allow table caption to contain "+" 2018-10-05 11:58:41 +03:00
Mathias Walter 537d917988 LaTeX template: add variable hyperrefoptions(#4925)
Introduce a new variable `hyperrefoptions` to pass to the hyperref package.
This allows us (for example) to specify `hyperrefoptions: linktoc=all` in a YAML block.
2018-10-04 12:22:22 -07:00
John MacFarlane 5b7d04984b Docx reader: trigger bold/italic with bCs, iCs.
These are variants for "complex scripts" like Arabic and
are now treated just like b, i (bold, italic).

Colses #4947.
2018-10-04 10:49:05 -07:00
John MacFarlane 65cf5cfe7b cabal.project - use latest pandoc-citeproc from git. 2018-10-04 10:34:10 -07:00
John MacFarlane f766348fd8 KaTeX: don't use autorenderer.
We no longer surround formulas with `\(..\)` or `\[..\]` and
rely on the autorenderer. Instead, we tell katex to convert
the contents of span elements with class "math". Since math has
already been identified, this avoids wasted time parsing
for LaTeX delimiters.

Note, however, that this may yield unexpected results
if you have span elements with class "math" that
don't contain LaTeX math.

Also, use latest version of KaTeX by default (0.9.0).

Closes #4946.
2018-10-04 10:33:46 -07:00
John MacFarlane 2caf198b46 Version to 2.4.
We need a major API version bump because of the removed
function from T.P.Writers.Shared.
2018-10-04 09:46:16 -07:00
Mauro Bieg 600034d7ff Add lookupMeta* functions to Text.Pandoc.Writers.Shared (#4907)
Remove exported functions `metaValueToInlines`, `metaValueToString`.

Add new exported functions `lookupMetaBool`, `lookupMetaBlocks`,
`lookupMetaInlines`, `lookupMetaString`.

Use these whenever possible for uniformity in writers.

API change (major, because of removed function `metaValueToInlines`.
`metaValueToString` wasn't in any released version.)
2018-10-04 09:45:59 -07:00
Alexander Krotov 1a6e6a3a03 Vimwiki reader: code cleanup 2018-10-04 12:16:31 +03:00
John MacFarlane 58ae017075 OpenDocument writer: make 'Figure' term sensitive to lang in metadata.
We use the new translations API.
2018-10-03 17:36:52 -07:00
John MacFarlane d7263a7e5f Text.Pandoc.Writers.Shared: added metaValueToString.
[API change]
2018-10-03 17:36:32 -07:00
Nils Carlson ecd4d5b8d8 OpenDocument writer: Implement figure numbering in captions (#4944)
Figure captions are now numbered 1, 2, 3, ... The format in
the caption is "Figure 1: <caption>" and so on.

This is necessary in order for libreoffice to generate an
Illustration Index (Table of Figures) for included figures.
2018-10-03 14:21:46 -07:00
Alexander Krotov 05d52eb9bb TWiki reader: hlint 2018-10-03 19:42:38 +03:00
John MacFarlane fbc733d3a8 Travis: comment out 8.6.1 for now.
We'll need to use new-build.
2018-10-03 09:33:55 -07:00
John MacFarlane 9df4c7f57b Added tools/changelog-helper.sh. 2018-10-02 22:41:41 -07:00
John MacFarlane 75706135e3 Add ghc 8.6.1 to travis. 2018-10-02 21:15:55 -07:00
John MacFarlane d975917509 Removed Text.Pandoc.Groff.
Moved groffEscape function to Text.Pandoc.Writers.Shared.
[API change, since T.P.W.S is exported.]
2018-10-02 18:16:43 -07:00
John MacFarlane 7bf80575b5 cabal.project - added pandoc.citeproc again. 2018-10-02 10:48:24 -07:00
John MacFarlane f82d574d14 OpenDocument writer: improve bullet/numbering alignment.
This patch eliminates the large gap we used to have between
bullet and text, and also ensures that numbers in numbered
lists will be right-aligned.

Closes #4385.
2018-10-02 10:11:32 -07:00