Commit graph

10565 commits

Author SHA1 Message Date
Alexander Krotov
a16382b06b Muse reader: use updateState instead of setState to restore museInLink 2018-02-20 14:37:02 +03:00
Jesse Rosenthal
f6eac1ad7e Powerpoint writer tests: Test everything with template as well
Modify the PowerPoint tests to run all the tests with
template (--reference-doc) as well. Because there are so many
interlocking pieces, bugs can pop up in weird places when using
templates, since it changes how the writer builds its output
file.

For example, I recently discovered a bug in which speaker notes worked
fine and templating worked fine elsewhere, but templating with speaker
notes produced a file that would crash MS PowerPoint. That particular
bug was fixed, but this will forces us to check for that with each new
change.
2018-02-19 20:04:39 -05:00
Jesse Rosenthal
b3f2efd35a Powerpoint writer: Update.golden tests.
Checked with Office 2013. No corruption and output as expected.
2018-02-19 15:31:20 -05:00
Jesse Rosenthal
f1146cd7ee Powerpoint writer: Add notesMaster to presentation.xml if necessary
In previous version, we only modified the notesMaster entry in the
presentation.xml file, and removed it if necessary. But if using a
template, it might not be available. So we always delete it, and then
add it back in if necessary.

We also have to make sure that we add it appropriately the .rels file
associated with presentation.xml.
2018-02-19 15:31:20 -05:00
Alexander Krotov
5a9d7d20dd Move manyUntil to Text.Pandoc.Parsing and use it in Txt2Tags reader 2018-02-19 19:23:30 +03:00
Jesse Rosenthal
574104861f Powerpoint writer: Another attempt at avoiding compiler warnings. 2018-02-18 18:54:16 -05:00
Jesse Rosenthal
b4f43f8799 Powerpoint writer: fix compiler complaints. 2018-02-18 17:44:09 -05:00
Jesse Rosenthal
4a6000c7d0 MANUAL: add reference to pptx support for speaker notes. 2018-02-18 16:31:32 -05:00
Jesse Rosenthal
32e6ae4347 Powerpoint writer: Add tests for speaker notes. 2018-02-18 16:31:32 -05:00
Jesse Rosenthal
6562863ef1 Powerpoint writer: separate SpeakerNotes paragraphs with empy par
This will add a space between notes paragraphs, which seems more like
what most users would do by hand (press "enter" twice).
2018-02-18 16:31:32 -05:00
Jesse Rosenthal
07f3aa178b Powerpoint writer: Ignore links and (end)notes in speaker notes.
MS PowerPoint does not offer a way to insert links into speaker notes
text, so we match that behavior, and make our lives easier.

As for (end)notes, there is no clear solution to the question of wat
that would *mean*. The default behavior would be to add it to the
endnote slide, but that would put speaker note content into the public
presentation. The best solution would be to put the content at the
bottom of the notes page, but that would take some doing, and can be
added to the speaker notes feature later.
2018-02-18 16:31:32 -05:00
Jesse Rosenthal
112602232c Powerpoint writer: update golden test files
Since the template changed, some small elements of these test files
changed as well.

All of these were checked with Powerpoint 2013 on Windows
10 (VirtualBox). All had expected outcomes and no corruption.
2018-02-18 16:31:32 -05:00
Jesse Rosenthal
575a360c6c Powerpoint writer: Output speaker notes.
There are a number of interlocking parts here. The main thing to note
is that, to match the MSPowerPoint-generated pptx files, we only
include the notesMaster and notesSlide files if there are notes. This
means we have to be careful with the rIds, and build a number of files
conditionally.
2018-02-18 16:31:32 -05:00
Jesse Rosenthal
47a399303d Powerpoint writer: modify speaker notes in presentation.xml
We remove the `notesMasterIdLst` entry in `presentation.xml` if there
no speaker notes in the presentation.
2018-02-18 16:31:32 -05:00
Jesse Rosenthal
eace2357dd Powerpoint writer: Read speaker note templates conditionally
If there are speaker notes in the presentation, we read in the
notesMasters templates from the reference pptx file.
2018-02-18 16:31:32 -05:00
Jesse Rosenthal
6c6ac9f22e Powerpoint writer: Move notes slides into data tree. 2018-02-18 16:31:32 -05:00
Jesse Rosenthal
d9e179d6fd Powerpoint writer: Read notes into powerpoint Presentatation type.
We record notes in a map in state while processing.
2018-02-18 16:31:32 -05:00
Jesse Rosenthal
6fa6b6a5f2 Powerpoint writer: Change references to Notes to SpeakerNotes
This is to avoid confusion with {foot,end}notes.
2018-02-18 16:31:32 -05:00
Andrew Pritchard
bb7681a85a EMF Image size support (#4375) 2018-02-18 11:12:58 -08:00
John MacFarlane
377640402f LaTeX reader: Fixed comments inside citations. Closes #4374. 2018-02-17 23:06:54 -08:00
John MacFarlane
3535af0197 Markdown writer: properly escape @ to avoid capture as citation.
Closes #4366.
2018-02-16 15:59:03 -08:00
John MacFarlane
c75740e22c Make image size detection for PDFs more robust.
See #4322.
2018-02-16 13:45:15 -08:00
John MacFarlane
5a56819894 Travis: ensure nightly builds can fail. 2018-02-16 11:04:50 -08:00
John MacFarlane
036767ea80 TEI writer: more attribute fixes.
- Ensure that id prefix is always used.
- Don't emit `role` attribute; that was a leftover from the
  Docbook writer.
2018-02-16 10:47:46 -08:00
John MacFarlane
ded2e211ca TEI writer: Use 'xml:id', not 'id' attribute.
Closes #4371.
2018-02-16 10:41:22 -08:00
Alexander Krotov
0e4b8ae362 Muse reader: prioritize lists with roman numerals over alphabetical lists
This is to make sure "i." starts a roman numbered list,
instead of a list with letter "i" (followed by "j", "k", ...").
2018-02-16 12:53:41 +03:00
danse
e6ff7f7986 Docx reader: Pick table width from the longest row or header
This change is intended to preserve as much of the table content as
possible

Closes #4360
2018-02-15 15:06:01 -05:00
Alexander Krotov
82a0ceaf18 Muse reader: fix directive parsing
This fixes bugs introduced in commit 4bfab8f04c.
2018-02-15 18:17:24 +03:00
Alexander Krotov
9131d62c9b Muse writer: use unicode quotes for quoted text 2018-02-15 14:33:25 +03:00
Alexander Krotov
6dcb974423 AsciiDoc writer: do not output implicit heading IDs
Convert to asciidoc-auto_identifiers for old behaviour.

Fixes #4363
2018-02-13 23:19:34 +03:00
John MacFarlane
39f0eebf38 Typo fix changelog. 2018-02-13 09:10:41 -08:00
Alexander Krotov
650b30737f Muse reader: remove listItemContents function 2018-02-13 15:58:22 +03:00
Alexander Krotov
e02b7d2b38 Muse reader: hlint 2018-02-13 14:43:44 +03:00
Alexander Krotov
42e39fbd26 Muse reader: parse definition lists with multiple descriptions 2018-02-13 14:34:45 +03:00
Alexander Krotov
5a304360d0 Muse reader: parse next list item before parsing more item contents 2018-02-13 14:14:43 +03:00
Alexander Krotov
8aed3652c2 Muse reader: refactor to avoid reparsing
Lists are parsed in linear instead of exponential time now.

Contents of block tags, such as <quote>, is parsed directly,
without storing it in a string and parsing with parseFromString.

Fixed a bug: headers did not terminate lists.
2018-02-12 17:30:57 +03:00
Alexander Krotov
10c8b9f4bb Muse reader: move indentation parsing from definitionListItem to definitionList 2018-02-12 14:57:18 +03:00
Alexander Krotov
3480a8acc2 Muse reader: paragraph indentation does not indicate nested quote
Muse allows indentation to indicate quotation or alignment,
but only on the top level, not within a <quote> or list.

This patch also simplifies the code by removing museInQuote
and museInList fields from the state structure.
Headers and indented paragraphs are attempted to be parsed
only at the topmost level, instead of aborting parsing with guards.
2018-02-12 04:57:56 +03:00
Alexander Krotov
30cd636c21 Muse reader: replace optionMaybe with optional 2018-02-12 01:40:55 +03:00
Alexander Krotov
450a200637 Muse reader: test empty quote tag 2018-02-11 19:45:16 +03:00
Alexander Krotov
1dfda7e204 Muse reader: require that block tags are on separate lines
Text::Amuse already explicitly requires it anyway.
Supporting block tags on the same line as contents makes
it hard to combine closing tag parsers with indentation parsers.
Being able to combine parsers is required for no-reparsing refactoring
of Muse reader.
2018-02-11 19:35:58 +03:00
Alexander Krotov
cadcf62ff3 Muse reader: move para definition into blockElements 2018-02-11 19:35:52 +03:00
Alexander Krotov
02cb6eb477 Muse reader: move end-of-line parsing to paraUntil 2018-02-11 19:30:01 +03:00
John MacFarlane
018d8aaee8 Updated rst writer test for template change. 2018-02-08 16:52:29 -08:00
John MacFarlane
d0e49e0a8a rst template: remove definition of 'math' role as raw.
This used to be needed prior to v 0.8 of docutils, but
now math support is built-in.
2018-02-08 16:31:19 -08:00
Alexander Krotov
5b3247d0b2 Muse reader: rename "literal" to "literalTag" 2018-02-06 01:35:41 +03:00
Alexander Krotov
fe5fd12812 Muse reader: avoid reparsing at the top level
Blocks following paragraphs are parsed only once at the top level.
Lists still take exponential time to parse, but this time is not
doubled anymore when this list terminates paragraph.
2018-02-06 01:35:41 +03:00
Alexander Krotov
e645510d54 Muse reader: implement paraUntil
paraUntil does not discard the result of the following block parsing.
This change is a part of Muse reader refactoring to avoid reparsing.
2018-02-06 01:35:41 +03:00
Adam Brandizzi
1a8840f41a INSTALL.md: mentioning Stack version. (#4343) 2018-02-05 11:49:56 -08:00
jarlg
ccc80bdab1 Update default.nix to current nixpkgs-unstable for hslua-0.9.5 (#4348) 2018-02-05 11:04:13 -08:00