Commit graph

10232 commits

Author SHA1 Message Date
John MacFarlane
3a3d661408 LaTeX reader: export tokenize, untokenize.
Mainly so they can be tested.
2017-12-15 10:13:16 -08:00
John MacFarlane
044d58bb24 Fixed regression in LateX tokenization.
This mainly affects the Markdown reader when parsing
raw LaTeX with escaped spaces.  Closes #4159.
2017-12-15 09:45:29 -08:00
John MacFarlane
61133b5268 Merge branch 'master' of github.com:jgm/pandoc 2017-12-14 20:54:59 -08:00
John MacFarlane
b88cd9c2ed filters.md: say that Text.Pandoc.JSON comes form pandoc-types.
Closes jgm/pandoc-website#16.
2017-12-14 20:54:15 -08:00
John MacFarlane
a831a4f469 MANUAL: add note on what formats have +smart by default. 2017-12-14 12:54:37 -08:00
John MacFarlane
b94f1e2045 RST reader: more accurate parsing of references.
Previously we erroneously included the enclosing
backticks in a reference ID (closes #4156).

This change also disables interpretation of
syntax inside references, as in docutils.
So, there is no emphasis in

    `my *link*`_
2017-12-14 12:48:43 -08:00
John MacFarlane
3361f85f8e
Merge pull request #4148 from stencila/jats-figures
fig, table-wrap & caption Divs for JATS writer
2017-12-14 13:45:23 -07:00
John MacFarlane
7888f49342 Markdown reader: be pickier about table captions.
A caption starts with a `:` which can't be followed
by punctuation.  Otherwise we can falsely interpret
the start of a fenced div, or even a table header line
like `:--:|:--:`, as a caption.
2017-12-14 12:03:14 -08:00
Hamish Mackenzie
fa0241592c Deduplicate JATS writer image mime type code 2017-12-14 18:39:45 +13:00
John MacFarlane
17b667ec26 Update latex template to work with recent versions of beamer.
The old template produced numbered sections with some recent
versions of beamer.

Thanks to Thomas Hodgson.
2017-12-13 21:17:13 -08:00
John MacFarlane
935b16b38a Removed whitespace at ends of line. 2017-12-13 20:48:24 -08:00
John MacFarlane
52a8116e71
Merge pull request #4153 from tarleb/unify-lua-init
Unify lua initalization
2017-12-13 21:42:06 -07:00
Jesse Rosenthal
440533643e Docx writer: Add tests for list continuation. 2017-12-13 15:16:44 -05:00
Jesse Rosenthal
3c7a3d378c Docx writer: Continue lists after interruption.
Docx expects that lists will continue where they left off after an
interruption and introduces a new id if a list is starting again. So
we keep track of the state of lists and use them to define a "start"
attribute, if necessary.

Closes #4025
2017-12-13 15:16:17 -05:00
Albert Krewinkel
4c64af4407
Custom writer: use init file to setup Lua interpreter
The same init file (`data/init`) that is used to setup the Lua
interpreter for Lua filters is also used to setup the interpreter of
custom writers.lua.
2017-12-13 21:15:41 +01:00
Albert Krewinkel
f9d0e1c89c
Lua filters: drop unused code, language extensions 2017-12-13 19:54:57 +01:00
Albert Krewinkel
0abb9bdc54
Custom writer: define instances for newtype wrapper
The custom writer used its own `ToLuaStack` instance definitions, which
made it difficult to share code with Lua filters, as this could result
in conflicting instances. A `Stringify` wrapper is introduced to avoid
this problem.
2017-12-13 19:54:50 +01:00
Georger Araújo
ce73dec833 Delete removed -S option from command in epub.md (#4151)
Because `--smart/-S` has been removed.
Maybe ` -f markdown+smart` shoud also be added?
2017-12-13 11:28:16 -07:00
John MacFarlane
d9cdce4281 Markdown reader: always use four space rule for example lists.
It would be awkward to indent example list contents to the
first non-space character after the label, since example
list labels are often long.

Thanks to Bernhard Fisseni for the suggestion.
2017-12-13 10:20:57 -08:00
John MacFarlane
68edc9efbf Update man page. 2017-12-12 16:36:23 -08:00
John MacFarlane
ccfbc205ee Updated changelog. 2017-12-12 16:36:10 -08:00
John MacFarlane
7093a3b44c Markdown: Improved computation of relative cell widths in pipe tables. 2017-12-12 15:36:29 -08:00
John MacFarlane
e86c337356 Pipe tables: use full text width for tables with wrapping cells.
Previously we computed the column sizes based on the ratio
between the header lines and the text width (as set by `--columns`).
This meant that tables with very short header lines would be
very narrow. With this change, pipe tables with wrapping cells will
always take up the whole text width. The relative column widths
will still be determined by the ratio of header lines, but they
will be normalized to add up to 1.0.
2017-12-12 15:16:16 -08:00
Hamish Mackenzie
ec1693505c fig, table-wrap & caption Divs for JATS writer
Support writing <fig> and <table-wrap> elements with <title> and
<caption> inside them by using Divs with class set to on of
fig, table-wrap or cation.  The title is included as a Heading
so the constraint on where Heading can occur is also relaxed.

Also leaves out empty alt attributes on links.
2017-12-13 12:06:22 +13:00
Hamish Mackenzie
7d23031b90 Add default.nix for working on pandoc with Nix (#4146) 2017-12-12 10:03:57 -07:00
Alexander Krotov
c66391eecb Spellcheck some changelog messages 2017-12-12 13:42:00 +03:00
John MacFarlane
12850755a7 Updated man page. 2017-12-11 22:42:55 -08:00
John MacFarlane
4e457868fa Change version to 2.0.5.
Note that we don't need to bump the second number
for an additional module and exported function.
2017-12-11 22:38:38 -08:00
John MacFarlane
0c54bbcf1b Updated changelog. 2017-12-11 22:08:11 -08:00
John MacFarlane
75fa139481 Update man page. 2017-12-11 21:46:58 -08:00
John MacFarlane
a23c93aa74 Version to 2.1 2017-12-11 21:46:40 -08:00
John MacFarlane
7f56d08443 Update cabal description to include powerpoint. 2017-12-11 21:42:59 -08:00
Thomas Hodgson
166561cc8d Added support for LaTeX pagestyle variable (#4135)
* Add pagestyle support

* Add pagestyle option to MANUAL.txt

* Moved mention of pagestyle to the section on variables
2017-12-11 22:26:16 -07:00
John MacFarlane
51c0ae5a66 --pdf-engine-opt: fix bug where option order was reversed.
Closes #4137.
2017-12-11 07:55:24 -08:00
Jesse Rosenthal
1a5e494cb5 Add PowerPoint info to MANUAL and README. 2017-12-11 07:00:17 -05:00
Jesse Rosenthal
be6b43b14c Fix comment that confused compiler. 2017-12-11 07:00:17 -05:00
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