Commit graph

12102 commits

Author SHA1 Message Date
John MacFarlane
ba05e1ea02 Shared.compactify: Avoid mixed lists.
This improves on the original fix to #5285 by preventing
other mixed lists (lists with a mix of Plain and Para
elements) that were allowed given the original fix.
2019-02-25 17:33:54 -08:00
John MacFarlane
38c028bd50 JATS reader: fix parsing of figures.
This ensures that a figure containing a single image
is parsed as a pandoc "implicit figure" (i.e., a
Para with a single Image whose title attribute begins
with `fig:`).  More complex figures will still be parsed
as divs.

Closes #5321.
2019-02-23 15:40:06 -07:00
John
c75b558cbc Add section identifiers support for FB2 writer (#5315)
Closes #5229.
2019-02-22 00:43:43 -07:00
Jesse Rosenthal
69d433d37a Docx reader: Start adding comment to combine module
This module is one of the most opaque parts of the docx reader: it
deals with the fact that runs have non-nesting formatting, so we have
to figure out the nesting on the fly as we combine them.

We start adding commenting, so new developers can understand and, if
necessary, modify this module. Specific function comments will be
added in the future, but this offers a global description of the
purpose of the module.
2019-02-21 08:32:57 -05:00
Mauro Bieg
ba065cb7f4 MANUAL: reorder custom-styles section (#5324) 2019-02-20 22:36:28 -07:00
Chris Martin
76707a6de9 Escape slashes so haddock doesn't think they're italics (#5322) 2019-02-20 22:34:19 -07:00
Jesse Rosenthal
83d2a5131d Docx reader tests: fix test file with trailing space.
This failed due to the fix of #5273.
2019-02-18 15:49:36 -05:00
Jesse Rosenthal
9a1a3fe482 Docx reader: add tests for trimming last inline. 2019-02-18 15:49:00 -05:00
Jesse Rosenthal
beda70b923 Docx reader: Trim space inside the last inline.
We have to add one final mempty when we're combining in order to trim
inlines appropriately. (We need to use our own trimming routines here
due to the way that formatted inlines are smushed together when
converting from docx.)

Closes #5273
2019-02-18 15:43:54 -05:00
Alexander Krotov
596f8fd06b hlint Muse 2019-02-18 15:53:19 +03:00
Alexander Krotov
c4814ea965 Muse reader: add secondary note support 2019-02-18 15:21:32 +03:00
Alexander Krotov
2c7c8a6f40 Muse writer: escape secondary notes 2019-02-18 15:21:32 +03:00
Alexander Krotov
073db7ac1f Move a comment in Muse Writer 2019-02-18 15:21:32 +03:00
Albert Krewinkel
b11ad32605
doc/lua-filters.md: fixed typos in mediabag docs. 2019-02-16 12:12:42 +01:00
Albert Krewinkel
331d6224a1
T.P.Lua: split StackInstances into smaller Marshaling modules 2019-02-16 12:08:22 +01:00
Albert Krewinkel
85470c49fe
T.P.Lua: get CommonState from Lua global
This allows more control over the common state from within Lua scripts.
2019-02-16 12:08:22 +01:00
John MacFarlane
bc2aca3d6d ipynb writer: don't create attachments for images with absolute URIs.
...including data: URIs.

Closes #5303.
2019-02-15 22:55:17 -08:00
John MacFarlane
d7d1c9c8e4 Markdown reader: fix bug parsing fenced code blocks.
Previously parsing would break if the code block
contained a string of backticks of sufficient length
followed by something other than end of line.

Closes #5304.
2019-02-15 22:34:32 -08:00
John MacFarlane
fb5bafd13e Use latest pandoc-citeproc (0.16.1). 2019-02-15 15:05:46 -08:00
John MacFarlane
1cfd0fb33c Revert "JATS writer: Support citations."
This reverts commit 39889c22df.
2019-02-15 10:29:11 -08:00
John MacFarlane
39889c22df JATS writer: Support citations. 2019-02-15 10:26:40 -08:00
John MacFarlane
35df24e698 JATS reader: handle citations with multiple references.
The rid attribute can have a space-separated list of ids.

Closes #5310.
2019-02-15 10:09:46 -08:00
John MacFarlane
b6c64bdd81 Delete default.nix.
This is a generated file and shouldn't be in the repository.
Closes #5298.
2019-02-14 08:58:27 -08:00
Jesse Rosenthal
332e2ba5b6 Docx reader: Add test for reading sdts in footnotes. 2019-02-12 17:26:37 -05:00
Jesse Rosenthal
8552e188cd Docx reader: unwrap sdt elements in footnotes and comments.
We had previously walked the document to unwrap sdt/sdtContent and
smartTag tags in `word/document.xml`, but not in the
`word/{foot/end}note.xml` and `word/comments.xml`.

Closes #5302
2019-02-12 16:36:54 -05:00
John MacFarlane
bb2fa73500 CircleCI: show build.log on cabal builds. 2019-02-11 08:36:51 -08:00
John MacFarlane
b9a2f8ea54 Remove redundant import. 2019-02-11 08:33:17 -08:00
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