Commit graph

12325 commits

Author SHA1 Message Date
John MacFarlane
85afbc7c6b ipynb writer: keep plain text fallbacks in output...
even if a richer format is included.

We don't know what output format will be needed.
The fallback can always be weeded out using a filter.

Closes #5293.
2019-02-10 22:05:22 -08:00
John MacFarlane
9abb458cbb Implement aria roles doc-bibliography, doc-biblioentry, doc-biblioref.
Note that doc-biblioref is only used when link-citations produces
links, since it belongs on links.

See #4213.
2019-02-10 18:15:55 -08:00
John MacFarlane
3c6d52df34 trypandoc: added some missing formats to drop-down list. 2019-02-10 15:03:30 -08:00
John MacFarlane
7615478bed Provisional changelog updates. 2019-02-10 14:50:07 -08:00
John MacFarlane
b1c964d725 Bump to 2.6.1. 2019-02-10 14:26:33 -08:00
John MacFarlane
bf13c4af18 Update AUTHORS. 2019-02-10 14:22:48 -08:00
John MacFarlane
b6cf490efd Use latest skylighting. 2019-02-10 08:06:53 -08:00
Mauro Bieg
d0a5f2aded JATS writer: wrap figure caption in <p> to fix validation (#5292)
closes #5290
2019-02-10 07:22:12 -08:00
Arfon Smith
f27d029f0f Add JATS to output option on Try pandoc. (#5291) 2019-02-10 07:20:18 -08:00
John MacFarlane
1cdbb896f6 Added simple ipynb reader/writer tests.
Closes #5274.
2019-02-09 14:53:30 -08:00
John MacFarlane
ec11f8d992 ipynb writer - ensure final newline. 2019-02-09 14:53:22 -08:00
John MacFarlane
5afde8dc76 Add titlepage class to section in epub3 template.
Closes #5269.
2019-02-09 14:12:30 -08:00
Albert Krewinkel
75c791b4fe Lua filters: load module pandoc before calling init.lua (#5287)
The file `init.lua` in pandoc's data directory is run as part of
pandoc's Lua initialization process. Previously, the `pandoc` module was
loaded in `init.lua`, and the structure for marshaling was set-up after.
This allowed simple patching of element marshaling, but made using
`init.lua` more difficult:

  - it encouraged mixing essential initialization with user-defined
    customization;

  - upstream changes to init.lua had to be merged manually;

  - accidentally breaking marshaling by removing required modules was
    possible;

Instead, all required modules are now loaded before calling `init.lua`.
The file can be used entirely for user customization. Patching
marshaling functions, while discouraged, is still possible via the
`debug` module.
2019-02-09 13:56:49 -08:00
Pascal Wagler
66ed198fff Added support for the subject metadata variable to PDF. (#5289) 2019-02-09 13:54:19 -08:00
Albert Krewinkel
ba61dc35d8
T.P.Lua: properly indent module-loading error 2019-02-09 20:12:34 +01:00
Albert Krewinkel
9a9c138d9c
data/pandoc.lua: re-export all bundled modules
All Lua modules bundled with pandoc, i.e., `pandoc.List`,
`pandoc.mediabag`, `pandoc.utils`, and `text` are re-exported from the
`pandoc` module. They are assigned to the fields `List`, `mediabag`,
`utils`, and `text`, respectively.
2019-02-09 20:12:33 +01:00
John MacFarlane
4543543063 Fixed asciidoc display math in list contexts. 2019-02-09 11:02:19 -08:00
TG
8c2e2435f9 Asciidoctor writer sets the stem attribute if it contains latexmath 2019-02-09 08:21:53 -08:00
TG
568b25d33a Adds Asciidoctor sprcific writer and tests 2019-02-09 08:21:53 -08:00
TG
8fdeae2872 AsciiDoc Writer: DisplayMath as asciidoc latexmath block 2019-02-09 08:20:56 -08:00
John MacFarlane
b8eeb0f4da AsciiDoc writer: change bulletListLevel and orderedListLevel...
so that 0 means "not in a list," which is more what
one would expect.
2019-02-09 08:17:53 -08:00
John MacFarlane
47537d26db Improve tight/loose list handling.
Closes #5285. Previously the algorithm allowed list items
with a mix of Para and Plain, which is never wanted.

compactify in T.P.Shared has been modified so that, if
a list's items contain (at the top level) Para elements
(aside from perhaps at the very end), ALL Plains are
converted to Paras.
2019-02-08 23:16:01 -08:00
John MacFarlane
5c8e12b64b Fix misleading code comment. 2019-02-08 22:34:26 -08:00
Mauro Bieg
62c5d17d3f Make --metadata-file use pandoc-markdown (#5279)
see #5272
2019-02-08 12:44:02 -08:00
John MacFarlane
403aafe983 Small fix in lua-filters doc. 2019-02-08 11:11:57 -08:00
John MacFarlane
2da9090adc Use latest basement/foundation on 32bit windows. 2019-02-08 09:29:09 -08:00
Jesse Rosenthal
b3d015e266 Docx reader: fix paths in archive to prevent Windows failure
Some paths in archives are absolute (have an opening slash) which, for
reasons unknown, produces a failure in the test suite on MS
Windows. This fixes that by removing the leading slash if it exists.

Closes #5277 (previously closed with 4cce0ef but reopened due to this bug).
2019-02-08 09:54:10 -05:00
Jesse Rosenthal
0719807401 Revert "Docx reader: Fix windows error"
This reverts commit 2142bbe572.
2019-02-07 15:06:25 -05:00
Jesse Rosenthal
2142bbe572 Docx reader: Fix windows error
Try fixing a parsing error on windows by insisting that the parser use
a Posix filepath library for splitting doc paths in a zipfile. (It
might default on Windows to using a backslash as a separator, while
it's always a forward-slash in zip archives.)
2019-02-07 14:46:56 -05:00
John MacFarlane
4ef23623d3 Use pandoc-citeproc-0.16.0.2 2019-02-07 10:00:21 -08:00
Jesse Rosenthal
b0d55e4f5b Docx reader: Some code cleanup
* clarify function name. We had previously used `getDocumentPath`,
   but `Document` is an overdetermined term here. Use
   `getDocumentXmlPath` to make clear what we're doing.

 * Use field notation for setting ReaderEnv. As we've added (and
   continue to add) fields, the assignment by position has gotten
   harder to read.

 * figure out document.xml path once at the beginning of parsing, and
   add it to the environment, so we can avoid repeated lookups.
2019-02-07 09:23:28 -05:00
Jesse Rosenthal
9ff4042932 Docx reader: Extend dynamic xml location to detecting relationships
Getting the location used to depend on a hard-coded .rels file based
on "word/document.xml". We now dynamically detect that file based on
the document.xml file specified in "_rels/.rels"
2019-02-07 06:00:37 -05:00
Albert Krewinkel
713ed7c0c5
data/pandoc.lua: re-export List and utils module 2019-02-07 10:10:55 +01:00
Jesse Rosenthal
1847bdbb83 Docx reader: Tests for alternate document.xml 2019-02-06 21:14:46 -05:00
Jesse Rosenthal
4cce0efa48 Docx reader: Dynamically determine document.xml path.
The desktop Word program places the main document file in
"word/document.xml", but the online word places it in
"word/document2.xml". This file path is actually stated in the root
"_rels/.rels" file, in the "Relationship" element with an
"http://../officedocument" type.

Closes #5277
2019-02-06 21:14:46 -05:00
John MacFarlane
5d3b8ede15 cabal.project - use released pandoc-citeproc (take 2). 2019-02-06 17:32:46 -08:00
John MacFarlane
424ec937e0 cabal - prevent using basement 0.0.10 on 32-bit windows.
It is broken, see https://github.com/haskell-foundation/foundation/issues/515
2019-02-06 17:19:58 -08:00
John MacFarlane
54ee40f216 Remove PROVISIONAL from 2.6 changelog. 2019-02-06 15:05:37 -08:00
John MacFarlane
23932d5e05 cabal.project - use released pandoc-citeproc. 2019-02-06 10:56:28 -08:00
John MacFarlane
5e1dc5809b stack.yaml - use latest pandoc-citeproc. 2019-02-06 10:56:11 -08:00
John MacFarlane
2b003d4a6b Handle Word files generated by Microsoft Word Online.
For some reason, Word in Office 365 Online uses `document2.xml`
for the content, instead of `document.xml`.  This causes pandoc
not to be able to parse docx.

This quick fix has the parser check for both `document.xml`
and `document2.xml`.

Addresses #5277, but a more robust solution would be to
get the name of the main document dynamically (who knows
whether it might change again?).
2019-02-06 09:01:26 -08:00
Alexander Krotov
59fa4eb17e Muse reader: test that block level markup does not break <verbatim> 2019-02-06 02:25:24 +03:00
Albert Krewinkel
37a82b0b11 Add missing copyright notices and remove license boilerplate (#5112)
Quite a few modules were missing copyright notices.

This commit adds copyright notices everywhere via haddock module
headers.  The old license boilerplate comment is redundant with this and has
been removed.

Update copyright years to 2019.

Closes #4592.
2019-02-04 13:52:31 -08:00
John MacFarlane
4b89311081 More carefully groom ipynb default extensions. 2019-02-04 11:11:38 -08:00
John MacFarlane
977a88f92d Add all_symbols_escapable to githubMarkdownExtensions. 2019-02-04 11:11:13 -08:00
John MacFarlane
ccf4e23ee1 Markdown reader: add newline when parsing blocks in YAML.
Otherwise last block gets parsed as a Plain rather than
a Para.

This is a regression in pandoc 2.x.  This patch restores
pandoc 1.19 behavior.

Closes #5271.
2019-02-04 10:22:02 -08:00
John MacFarlane
ca4d308b60 ipynb reader: handle images referring to attachments.
Previously we didn't strip off the attachment: prefix,
so even though the attachment is available in the mediabag,
pandoc couldn't find it.
2019-02-02 18:22:43 -08:00
John MacFarlane
d50cb029fd HTML5 template: Add role with ARIA doc-toc for table of contents.
See #4213.
2019-02-02 16:20:19 -08:00
John MacFarlane
b74267406b Update test for last commit. 2019-02-02 16:20:06 -08:00
John MacFarlane
b062117ef4 HTML5 writer: implement WAI-ARIA roles for (end)notes.
See #4213.
2019-02-02 16:14:58 -08:00