Commit graph

9996 commits

Author SHA1 Message Date
Jesse Rosenthal
8fd51e12ef Remove redundant imports from Docx writer.
These were a result of moving functions to the OOXML module.
2017-12-11 07:00:17 -05:00
Jesse Rosenthal
b212a51062 Integrate Powerpoint writer into pandoc. 2017-12-11 07:00:17 -05:00
Jesse Rosenthal
da4703236d Add Powerpoint writer.
This imports the essential Powerpoint writer.

It works following the standard Pandoc conventions for making other
sorts of slides. At the moment, there are still these TODOs:

1. Syntax highlighting is not yet implemented. (This is difficult
   because there are no character classes in Powerpoint.)

2. Footnotes and Definition lists are not yet implemented. (Notes will
   usually take the form of a final slide.

3. Image placement and auto-resizing has a few glitches.

4. Reference powerpoint files don't work dependably from the command
   line. This will be implemented, but at the moment users are advised
   to change themes from within Powerpoint.
2017-12-11 07:00:17 -05:00
Jesse Rosenthal
8cd0ebe303 Add necessary powerpoint functions to Class. 2017-12-11 07:00:17 -05:00
Jesse Rosenthal
6cc673dbab Create shared OOXML writer file.
This is for functions used by both Powerpoint and Docx writers.
2017-12-11 07:00:17 -05:00
Jesse Rosenthal
9734a598ea Add default pptx data for Powerpoint writer. 2017-12-11 07:00:17 -05:00
John MacFarlane
5e039d913f Changes for skylighting-0.5.
This fixes a bug in 2.0.4, whereby pandoc could not
read the theme files generated with `--print-highlight-style`.

It also fixes some CSS issues involving line numbers.
Highlighted code blocks are now enclosed in a div with class
sourceCode.

Highlighting CSS no longer sets a generic color for pre
and code; we only set these for class `sourceCode`.

This will close #4133 and #4128.
2017-12-10 21:13:05 -08:00
Albert Krewinkel
1cd785fe33
Lua filters: fix package loading for Lua 5.1
The list of package searchers is named `package.loaders` in Lua 5.1 and
LuaJIT, and `package.searchers` in Lua 5.2 and later.
2017-12-10 21:43:57 +01:00
John MacFarlane
544494d0e2 Man writer: omit internal links.
That is, just print the link text without the url.

Closes #4136.
2017-12-09 14:09:00 -08:00
John MacFarlane
bd1713a21b Travis: fix path to ensure that installed ghc is first in path. 2017-12-08 16:34:28 -08:00
John MacFarlane
67b6abc806 LaTeX reader: fix \ before newline.
This should be a nonbreaking space, as long as it's not
followed by a blank line. This has been fixed at the tokenizer
level.

Closes #4134.
2017-12-08 16:34:15 -08:00
Albert Krewinkel
677ff2aaea
README: fix groff ms link 2017-12-08 10:33:27 +01:00
John MacFarlane
04f08c39ef Add '-threaded' to ghc-options for executable. 2017-12-07 15:25:37 -08:00
John MacFarlane
f6007e7146 Markdown reader: accept processing instructions as raw HTML.
Closes #4125.
2017-12-06 16:05:50 -08:00
Albert Krewinkel
4066a385ac
Lua filters: use script to initialize the interpreter
The file `init.lua` is used to initialize the Lua interpreter which is
used in Lua filters. This gives users the option to require libraries
which they want to use in all of their filters, and to extend default
modules.
2017-12-06 22:50:56 +01:00
Albert Krewinkel
d5b1c7b767
Lua filters: refactor lua module handling
The integration with Lua's package/module system is improved: A
pandoc-specific package searcher is prepended to the searchers in
`package.searchers`. The modules `pandoc` and `pandoc.mediabag` can now
be loaded via `require`.
2017-12-02 23:07:29 +01:00
Albert Krewinkel
a7953a60b9
Bump lower bound of hslua
The release hslua 0.9.3 contains a new function which makes using
Haskell functions as package loaders much easier.
2017-12-04 13:34:10 +01:00
Alexander Krotov
e536c4d9c9 hlint Muse reader and tests 2017-12-06 19:38:25 +03:00
Alexander Krotov
6fd3cdac46 Muse reader: add test for #disable-tables directive in Emacs mode 2017-12-06 19:35:01 +03:00
Alexander Krotov
3ae359721d Muse reader: don't allow emphasis to be preceded by letter 2017-12-06 19:04:35 +03:00
Alexander Krotov
12789fd42a Muse reader: support multiline directives in Amusewiki mode 2017-12-05 12:59:28 +03:00
John MacFarlane
00f634ba80 reveal.js template: add title-slide identifier to title slide.
This allows it to be styled more easily.

Closes #4120.
2017-12-04 16:26:04 -08:00
John MacFarlane
6a2562efb5 Rewrite empty_paragraphs test so it will run on Windows. 2017-12-04 15:41:09 -08:00
John MacFarlane
fac3953abf Markdown reader: Don't parse native div as table caption.
Closes #4119.
2017-12-04 15:04:47 -08:00
John MacFarlane
ae60e0196c Add empty_paragraphs extension.
* Deprecate `--strip-empty-paragraphs` option.  Instead we now
  use an `empty_paragraphs` extension that can be enabled on
  the reader or writer.  By default, disabled.

* Add `Ext_empty_paragraphs` constructor to `Extension`.

* Revert "Docx reader: don't strip out empty paragraphs."
  This reverts commit d6c58eb836.

* Implement `empty_paragraphs` extension in docx reader and writer,
  opendocument writer, html reader and writer.

* Add tests for `empty_paragraphs` extension.
2017-12-04 14:56:57 -08:00
John MacFarlane
c58ecde937 MANUAL: note on extensions in gfm. 2017-12-04 10:29:27 -08:00
Alexander Krotov
ed261e5832 Muse reader: add underline support in Emacs Muse mode 2017-12-04 15:59:26 +03:00
John MacFarlane
4235c2d416 Update changelog. 2017-12-03 20:40:52 -08:00
John MacFarlane
c94b970ced Include default CSS for 'underline' class in HTML-based templates. 2017-12-03 20:36:08 -08:00
John MacFarlane
45a46bf900 Removed unnecessary import. 2017-12-03 20:25:04 -08:00
John MacFarlane
03496d1810 Test for #4113.
Closes #4113.
2017-12-03 20:15:40 -08:00
John MacFarlane
d25017fc70 commonmark/gfm writer: use raw html for native divs/spans.
This allows a pandoc markdown native div or span to be
rendered in gfm using raw html tags.
2017-12-03 12:29:57 -08:00
John MacFarlane
5d0863d198 HTML writer: export tagWithAttributes.
This is a helper allowing other writers to create single
HTML tags.
2017-12-03 12:25:23 -08:00
John MacFarlane
0a091f1463 commonmark/gfm writer: implement raw_html and raw_tex extensions.
Note that `raw_html` is enabled by default for `gfm`, while
`raw_tex` is disabled by default.
2017-12-03 11:45:22 -08:00
John MacFarlane
b480d0da7a Bump bounds for binary, http-types, tasty-hunit 2017-12-02 23:24:19 -08:00
John MacFarlane
3ee85960cb Update man page and MANUAL date. 2017-12-02 18:56:45 -08:00
John MacFarlane
c87f39421d Update changelog. 2017-12-02 18:44:58 -08:00
John MacFarlane
92c527713b Docx writer: allow empty paragraphs.
See #2252.

This also changes fixDisplayMath from Text.Pandoc.Writers.Shared
so that it no longer produces empty Para as an artifact.
(That was the original reason the writer omitted them.)
2017-12-02 17:17:39 -08:00
John MacFarlane
d6c58eb836 Docx reader: don't strip out empty paragraphs.
We now have the `--strip-empty-paragraphs` option for that,
if you want it.  Closes #2252.

Updated docx reader tests.

We use stripEmptyParagraphs to avoid changing too
many tests.  We should add new tests for empty paragraphs.
2017-12-02 16:51:31 -08:00
John MacFarlane
f4b86a1bc2 Shared.blocksToInlines: rewrote using builder.
This gives us automatic normalization, so we don't get
for example two consecutive Spaces.
2017-12-02 16:28:20 -08:00
John MacFarlane
7b8c2b6691 Add --strip-empty-paragraphs option.
This works for any input format.
2017-12-02 15:21:59 -08:00
John MacFarlane
e09e6a6ffa Bump to 2.0.4, update changelog. 2017-12-02 11:17:22 -08:00
John MacFarlane
78982d0581 Update tested-with. 2017-12-02 10:56:56 -08:00
John MacFarlane
22eb15ec35 LaTeX writer: escape _ in code with --listings. 2017-12-02 10:31:58 -08:00
John MacFarlane
ecfb5a0838 revealjs template: added a necessary escape. 2017-12-01 22:02:07 -08:00
John MacFarlane
d9f0b816e2 reveal.js template: include tex2jax configuration.
This ensures that we don't use $..$ delimiters, which
gives bad results when $ is used as a currency sign.
This depends on the current dev version of reveal.js.
2017-12-01 21:41:48 -08:00
John MacFarlane
1193c1a505 LaTeX writer: allow specifying just width or height for image size.
Previously both needed to be specified (unless the image was
being resized to be smaller than its original size).

If height but not width is specified, we now set width to
textwidth (and similarly if width but not height is specified).
Since we have keepaspectratio, this yields the desired result.
2017-12-01 21:18:29 -08:00
John MacFarlane
29ec13184d LaTeX writer: escape ~ in code with --listings.
Closes #4111.
2017-12-01 17:17:26 -08:00
John MacFarlane
b2a190546d Revert "LaTeX writer: Add keepaspectratio to includegraphics..."
This reverts commit 171187a452.
2017-12-01 13:51:33 -08:00
Albert Krewinkel
3f1f9536d4
pandoc.lua: set metatable on List MetaValues
The `List` metatable is assigned to the tables which get passed to the
constructors `MetaBlocks`, `MetaInline`, and `MetaList`. This enables
the use of the resulting objects as lists.  This is part of the changes
discussed in #4081.
2017-12-01 18:47:33 +01:00