Commit graph

10080 commits

Author SHA1 Message Date
John MacFarlane
cc9e3a9172 Allow --list-extensions to take an optional FORMAT argument.
This lists the extensions set by default for the selected
FORMAT.
2017-12-27 12:25:48 -08:00
John MacFarlane
ab9b9cf95b Update changelog 2017-12-27 11:39:13 -08:00
John MacFarlane
8a35b44aaf Allow lenient decoding of *latex error logs.
These sometimes aren't properly UTF8 encoded, and it's
confusing if we get an encoding error due to the error
log.

Closes #4200.
2017-12-27 11:37:35 -08:00
Albert Krewinkel
3b2282c962
data/sample.lua: use next instead of for loop
Each definition list item contains just a single key and the associated
value.  Using `next` to get the key/value pair is more idiomatic than
iterating over the single-element table.
2017-12-27 20:11:19 +01:00
John MacFarlane
e19526846f Removed extra comment. 2017-12-27 10:52:12 -08:00
John MacFarlane
cb4123841c Revert "data/sample.lua: Fixed problem with definition lists."
This reverts commit 0e3736422e
in favor of @tarleb's fix.
2017-12-27 10:48:34 -08:00
John MacFarlane
1ce426a9cb Add custom tests to pandoc.cabal 2017-12-27 10:48:19 -08:00
John MacFarlane
152731b590 Update changelog. 2017-12-27 09:55:28 -08:00
John MacFarlane
56951b873e Updated man page. 2017-12-27 09:53:50 -08:00
John MacFarlane
eb7f65305d Update manual date and man page. 2017-12-27 09:53:16 -08:00
John MacFarlane
c164c94d79
Merge pull request #4204 from mb21/extension-docs
MANUAL introduce dedicated extensions section
2017-12-27 10:52:33 -07:00
Albert Krewinkel
2953983e9e
Fix regression of DefinitionLists in custom writer
Pairs where serialized as two-element lists instead, and are now pushed
again as a table with a single key/value pair.

Fixes: #4202
2017-12-27 18:48:52 +01:00
John MacFarlane
9ef3d77652 Makefile: Add 'pandoc-templates' target. 2017-12-27 09:35:20 -08:00
John MacFarlane
87c9771e9a Update changelog. 2017-12-27 09:21:38 -08:00
John MacFarlane
27ba06fe8f data/sample.lua: fixed problem with tables.
Closes #4202.
2017-12-27 09:16:29 -08:00
John MacFarlane
0e3736422e data/sample.lua: Fixed problem with definition lists. 2017-12-27 09:16:01 -08:00
John MacFarlane
e23e1f3c22 Added tests for custom writer. 2017-12-27 09:15:45 -08:00
mb21
44e504853f MANUAL.txt introduce dedicated extensions section 2017-12-27 17:11:23 +01:00
Jesse Rosenthal
d71165c8e2 Docx reader: add tests for structured document tags unwrapping. 2017-12-27 10:03:00 -05:00
Jesse Rosenthal
dc3ee500a0 Docx Reader: preprocess Document body to unwrap "w:sdt" elements
We walk through the document (using the zipper in
Text.XML.Light.Cursor) to unwrap the sdt tags before doing the rest of
the parsing of the document. Note that the function is generically
named `walkDocument` in case we need to do any further preprocessing
in the future.

Closes #4190
2017-12-27 10:03:00 -05:00
Albert Krewinkel
7e8cfc0990
Fix custom writer regression
An additional `Lua.call` was left in during refactoring, which caused an
exception "attempt to call a nil value".

Fixes: #4202
2017-12-27 09:16:33 +01:00
John MacFarlane
47455715d3 Update changelog. 2017-12-26 22:45:29 -08:00
John MacFarlane
06ad9d08ea Use lts-10.1 resolver. 2017-12-26 22:07:00 -08:00
John MacFarlane
596257f350 Updated reference.docx.
Instead of just "Hello, world", the document now contains
exemplars of most of the styles that have an effect on pandoc
documents.

This makes it easier to see the effect of style changes.

Closes #4175.
2017-12-26 22:02:49 -08:00
John MacFarlane
b52cbb71c2 LaTeX writer: Allow fragile=singleslide attribute in beamer slides.
Closes #4169.
2017-12-26 11:17:32 -08:00
John MacFarlane
b5ae537321 Add opus to MIME type table as audio/ogg.
See #4198.
2017-12-26 11:03:03 -08:00
John MacFarlane
9e1d86638c LaTeX reader: support \foreignlanguage from babel. 2017-12-26 10:57:57 -08:00
John MacFarlane
ba4b9db16d Tweaks to lua-filters.md docs 2017-12-26 10:25:05 -08:00
John MacFarlane
718b2c5837 HTML writer: Use br elements in line blocks...
instead of relying on CSS.  Closes #4162.  HTML-based templates have had
the custom CSS for div.line-block removed.  Those maintaining custom
templates will want to remove this too.

We still enclose line blocks in a div with class line-block.
2017-12-26 08:40:33 -08:00
John MacFarlane
9dea8a27e2 Use pandoc-citeproc 0.12.2 in binary pgks 2017-12-24 22:47:14 -08:00
John MacFarlane
1d498b0e35 Fixed changelog typo 2017-12-24 21:36:31 -08:00
John MacFarlane
f2812e12eb Update changelog. 2017-12-24 13:48:42 -08:00
John MacFarlane
ee5fe9bf2c RST reader: allow empty list items (as docutils does).
Closes #4193.
2017-12-24 13:02:18 -08:00
John MacFarlane
bb5f4c9b22 Add Hamish Mackenzie to authors. 2017-12-23 23:38:10 -08:00
John MacFarlane
2af478c3b5 Bump to 2.0.6. 2017-12-23 23:20:33 -08:00
John MacFarlane
c7e5543c29 JATS reader: handle author-notes. 2017-12-23 22:28:43 -08:00
John MacFarlane
4612a9a8c1 JATS reader: code refactoring. 2017-12-23 21:54:06 -08:00
John MacFarlane
0d1546328e Plain writer: don't linkify table of contents. 2017-12-23 21:30:10 -08:00
John MacFarlane
dd3ec34a34 Fixed bug: when target is PDF, writer extensions were being ignored.
E.g. `-t latex-smart -o file.pdf` would produce a different
latex intermediate than `-t latex-smart -o file.tex`.

Thanks to Bernhard Fisseni for pointing this out.

This is a regression since pandoc 2.0 (introduced in commit
c7e3c1ec).
2017-12-23 21:10:33 -08:00
Albert Krewinkel
59a4745457
Lua modules: add function pandoc.utils.hierarchicalize
Convert list of Pandoc blocks into (hierarchical) list of Elements.
2017-12-23 23:29:24 +01:00
John MacFarlane
790dc2546b JATS reader: include institute metadata. 2017-12-23 10:20:13 -08:00
John MacFarlane
6b63b63f30 JATS reader: process author metadata. 2017-12-23 10:03:13 -08:00
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