Commit graph

11365 commits

Author SHA1 Message Date
Yan Pas
07b4d7b297 posix man files parsed successfully 2018-10-09 23:59:12 +03:00
Yan Pas
753a4d376d Successful parsing of all Linux mans, except zic.8 2018-10-07 22:10:29 +03:00
Yan Pas
c7aa7a83dd test suite and more secapes 2018-10-07 19:55:10 +03:00
Yan Pas
27467189ab Merge branch 'master' into groff_reader 2018-10-07 18:10:01 +03:00
Yan Pas
4f3dd3b1af position calculations 2018-10-07 17:53:14 +03: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
John MacFarlane
9e58730a74 Makefile - make stack quick build the default 2018-10-02 09:23:53 -07:00
John MacFarlane
cc76c5e6b4 Makefile: improved quick-cabal target. 2018-10-02 00:10:05 -07:00
John MacFarlane
05146ac97c T.P.Lua.StackInstances - moved pragmas to top of file. 2018-10-02 00:09:48 -07:00
John MacFarlane
2bec94e49f cabal.project - remove source-dependency stanzas.
They shouldn't be needed given new releases of these packages.
2018-10-01 23:58:25 -07:00
John MacFarlane
df28f8cf9e Makefile: added quick-cabal target as default. 2018-10-01 23:58:13 -07:00
John MacFarlane
b5a18e748d Version to 2.3.2. 2018-10-01 22:48:54 -07:00
John MacFarlane
e25c7ce035 Shared: new export splitSentences [API change].
This was duplicated in the Man and Ms writers, and really
belongs in Shared.
2018-10-01 22:48:20 -07:00
John MacFarlane
963ba931a6 Moved isArgTok to Readers.LaTeX.Parsing. 2018-10-01 22:09:45 -07:00
John MacFarlane
799cd5db7a Moved babelLangToBCP, polyglossiaLangToBCP to new module...
Text.Pandoc.Readers.LaTeX.Lang (unexported).
2018-10-01 21:27:20 -07:00