Albert Krewinkel
2c66a42ab8
Lua modules: add function pandoc.utils.normalize_date
...
The function parses a date and converts it (if possible) to "YYYY-MM-DD"
format.
2017-12-23 13:43:22 +01:00
Albert Krewinkel
35f0567a8f
Lua modules: add function pandoc.utils.to_roman_numeral
...
The function allows conversion of numbers below 4000 into roman
numerals.
2017-12-23 13:42:35 +01:00
Albert Krewinkel
ef4351c4d2
data/init.lua: load pandoc.utils by default
2017-12-23 13:42:35 +01:00
John MacFarlane
dd39959453
JATS reader: better citation handling.
...
We now convert a ref-list element into a list of
citations in metadata, suitable for use with pandoc-citeproc.
We also convert references to pandoc citation elements.
Thus a JATS article with embedded bibliographic information
can be processed with pandoc and pandoc-citeproc to produce
a formatted bibliography.
2017-12-23 00:46:48 -08:00
John MacFarlane
e3c1449ae6
Merge pull request #4189 from mb21/export-blocksToInlines
...
API change: export blocksToInlines' from Text.Pandoc.Shared
2017-12-22 19:05:29 -07:00
John MacFarlane
28b736bf95
latex_macros
extension changes.
...
Don't pass through macro definitions themselves when `latex_macros`
is set. The macros have already been applied.
If `latex_macros` is enabled, then `rawLaTeXBlock` in
Text.Pandoc.Readers.LaTeX will succeed in parsing a macro definition,
and will update pandoc's internal macro map accordingly, but the
empty string will be returned.
Together with earlier changes, this closes #4179 .
2017-12-22 18:03:51 -08:00
John MacFarlane
4a07977715
Markdown reader: improved raw tex parsing.
...
+ Preserve original whitespace between blocks.
+ Recognize `\placeformula` as context.
2017-12-22 18:03:51 -08:00
John MacFarlane
3679d8d0bd
LaTeX reader: use applyMacros in rawLaTeXBlock, rawLaTeXInline.
2017-12-22 18:03:51 -08:00
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