Commit graph

10080 commits

Author SHA1 Message Date
John MacFarlane
9daf22fa61 LaTeX reader: Refactored inlineCommand. 2017-12-22 18:03:51 -08:00
mb21
add3cf73a9 API change: export blocksToInlines' from Text.Pandoc.Shared 2017-12-22 20:35:00 +01:00
Albert Krewinkel
dd217f75e5
doc/lua-filter.md: document pandoc.utils.stringify
Change: minor
2017-12-22 20:29:00 +01:00
Albert Krewinkel
23edb958db
Lua modules: add stringify function to pandoc.utils
The new function `pandoc.utils.stringify` converts any AST element to a
string with formatting removed.
2017-12-22 20:09:37 +01:00
Albert Krewinkel
9ddf84072b
Lua.Util: avoid altering the stack if peeking fails
The stack now remains unaltered if `getRawInt` or `getTable` fail.  This
is important when those functions are used in an operation that is part
of an Alternative.

Change: minor
2017-12-22 20:08:45 +01:00
John MacFarlane
9758720a24 RST writer: fix anchors for headers.
We were missing an `_`.
See #4188.
2017-12-22 10:36:37 -08:00
Jesse Rosenthal
279c254007 PowerPoint writer: Treat lists inside BlockQuotes as lists
We don't yet produce incremental lists in PowerPoint, but we should at
least treat lists inside BlockQuotes as lists, for compatibility with
other slide formats.
2017-12-22 05:32:23 -05:00
John MacFarlane
a848d3e031 Mention JATS output (and input) in MANUAL, README, cabal description. 2017-12-21 22:20:38 -08:00
John MacFarlane
af04881655
Merge pull request #4177 from stencila/jats-xml-reader
Add Basic JATS reader based on DocBook reader
2017-12-21 23:16:03 -07:00
John MacFarlane
32f9dbbae5 Merge branch 'master' of github.com:jgm/pandoc 2017-12-21 21:45:35 -08:00
John MacFarlane
239cfb7f00 Docx writer: ensure that distArchive is the one that comes with pandoc.
Previously a `reference.docx` in `~/.pandoc` (or the user data dir)
would be used instead, and this could cause problems because a
user-modified docx sometimes lacks vital sections that we count
on the `distArchive` to supply.

Closes #4182.
2017-12-21 21:44:13 -08:00
Hamish Mackenzie
a5d7be075d JATS writer: Make <p> optional in <td> and <th> (#4178)
If the contents are single `Plain` block then do not wrap them with
a <p> element.
2017-12-21 22:30:22 -07:00
Hamish Mackenzie
de8c47eae8 jats writer: Self closing tags for empty xref (#4187) 2017-12-21 22:29:03 -07:00
Hamish Mackenzie
d853571397 Improve support for code language in JATS 2017-12-22 15:24:54 +13:00
Jesse Rosenthal
3c10951023 Change notes to a smaller size.
This will allow more to fit on a single slide, and will probably look better.
2017-12-21 17:01:11 -05:00
Jesse Rosenthal
5b2c38a07d PowerPoint writer: Add ability to force size.
This replaces the more specific blockQuote runProp, which only
affected the size of blockquotes. We can use this for notes, etc.
2017-12-21 17:00:59 -05:00
Albert Krewinkel
bd3ea72371
Lua modules: added pandoc.utils module
A new module `pandoc.utils` has been created. It holds utility functions
like `sha1`, which was moved from the main `pandoc` module.
2017-12-21 22:42:59 +01:00
Albert Krewinkel
5ad719c1fb
Lua modules: make a Haskell module for each Lua module
Definitions for the `pandoc.mediabag` modules are moved to a separate
Haskell module.

Change: minor
2017-12-21 22:42:59 +01:00
Albert Krewinkel
ab3c506584
Lua modules: move to dedicated submodule
The Haskell module defining the Lua `pandoc` module is moved to
Text.Pandoc.Lua.Module.Pandoc.

Change: minor
2017-12-21 22:42:59 +01:00
Mauro Bieg
6ec7e39b4c MANUAL.txt use native syntax for custom-style (#4174) 2017-12-21 12:56:20 -07:00
John MacFarlane
685e90cd4f LaTeX reader: Fixed subtle bug in tokenizer.
Material following `^^` was dropped if it wasn't a character
escape.  This only affected invalid LaTeX, so we didn't see it
in the wild, but it appeared in a QuickCheck test failure
https://travis-ci.org/jgm/pandoc/jobs/319812224
2017-12-21 11:50:55 -08:00
John MacFarlane
117a672c4d Removed default.theme data file.
It is no longer needed now that we have `--print-highlight-style`.
See #4096.
2017-12-21 11:28:38 -08:00
Jesse Rosenthal
c4f58684ee PowerPoint writer: Implement notes
This currently prints all notes on a final slide.

Note that at the moment, there is a danger of text overflowing the
note slide, since there is no logic for adding further slides. A
future commit will shrink the font size on these notes, but that won't
take care of the problem altogether. (We might have to implement some
sort of clumsy page-breaking logic here based on font size and
text-box dimensions, though that seems like a can of worms.)
2017-12-21 12:11:58 -05:00
Jesse Rosenthal
f76b4fc497 PowerPoint writer: Register notes to state.
When we encounter a note, we write it to the state directory of notes,
and input a superscript.
2017-12-21 11:45:08 -05:00
Jesse Rosenthal
d6c9e4f243 Add Note state to PowerPoint writer.
First step toward implementing notes in pptx writer.
2017-12-21 11:35:00 -05:00
Jesse Rosenthal
4d0cb0b2fc Implement basic definition list functionality to PowerPoint writer.
These are currently implemented in terms of a Bold para for the terms,
and then blockquotes for the definitions. THis can be refined a bit in
the future.
2017-12-21 11:09:05 -05:00
Jesse Rosenthal
4e53c7bf55 Don't look for default template file for Powerpoint.
When using readerStandalone, this keeps us from looking for a
non-existent template pptx file.

Closes #4181
2017-12-21 10:35:51 -05:00
Jesse Rosenthal
3c8f0269f9 Add pptx to isTextFormat list
This is used to check standalone and not writing to the terminal.
2017-12-21 10:22:58 -05:00
Alexander Krotov
d035689a06 Org writer: do not wrap "-" to avoid accidental bullet lists
Also add TODO for ordered lists.
2017-12-21 16:36:29 +03:00
Alexander Krotov
0405c5b461 Muse reader: parse anchors immediately after headings as IDs 2017-12-21 15:52:10 +03:00
Albert Krewinkel
5d3573e780
Lua modules: turn pipe, read into full Haskell functions
The `pipe` and `read` utility functions are converted from hybrid
lua/haskell functions into full Haskell functions. This avoids the need
for intermediate `_pipe`/`_read` helper functions, which have dropped.
2017-12-20 22:24:41 +01:00
Albert Krewinkel
299e452463
Test more pandoc Lua module functions
The functions `sha1`, `read`, and `pipe` are now tested.

Change: minor
2017-12-20 21:36:41 +01:00
John MacFarlane
2b2dae8b47 Travis: use --jobs=2 for installing dependencies.
In hopes this will help with the OOM problems.
2017-12-20 12:35:58 -08:00
John MacFarlane
f5c8dd2745 makefile: use lts-10 resolver. 2017-12-20 12:35:58 -08:00
Albert Krewinkel
e45f87a3be
Org reader: fix asterisks-related parsing error
A parsing error was fixed which caused the org reader to fail when
parsing a paragraph starting with two or more asterisks.

Fixes: #4180
2017-12-20 18:04:50 +01:00
Alexander Krotov
b5e62a5c09 Muse reader: require that note references does not start with 0 2017-12-20 14:00:30 +03:00
John MacFarlane
ac202e648b Stack builds with lts-10.0. 2017-12-19 22:28:25 -08:00
Hamish Mackenzie
5d3c9e5646 Add Basic JATS reader based on DocBook reader 2017-12-20 13:54:02 +13:00
Alexander Krotov
1e21cfb251 Muse writer: don't wrap note references to the next line
Closes #4172.
2017-12-19 13:30:48 +03:00
Alexander Krotov
ef8430e702 Fix for #4171 fix: don't wrap note references after SoftBreak 2017-12-19 13:30:48 +03:00
Albert Krewinkel
46d3c95ecd
pandoc.lua: re-add missing MetaMap function
This was a bug introduced in version 2.0.4 (commit
3f1f9536d4).
2017-12-19 09:12:16 +01:00
Alexander Krotov
f6abf15832 Muse reader: parse empty comments correctly 2017-12-19 04:23:32 +03:00
John MacFarlane
c0cc9270cb Org writer: don't allow fn refs to wrap to beginning of line.
Otherwise they can be interpreted as footnote definitions.

Closes #4171.
2017-12-18 16:33:52 -08:00
Albert Krewinkel
70dc5834da
Lua filters: perform minor code clean-up
Change: minor
2017-12-18 18:10:08 +01:00
John MacFarlane
808f6d3fa1 OPML reader: enable raw HTML and other extensions by default for notes.
This fixes a regression in 2.0.

Note that extensions can now be individually disabled, e.g.
`-f opml-smart-raw_html`.

Closes #4164.
2017-12-17 09:52:53 -08:00
John MacFarlane
d35e396f3c Use latest pandoc-citeproc in binary pkg. 2017-12-15 15:48:02 -08:00
John MacFarlane
bba7646340 LaTeX writer: use \renewcommand for \textlatin with babel.
This avoids a clash with a deprecated \textlatin command defined
in Babel.  Closes #4161.
2017-12-15 12:21:41 -08:00
John MacFarlane
79c3f57c47 Added tests of latex tokenizer.
This should help prevent regressions like #4159.
2017-12-15 10:13:43 -08:00
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