aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Powerpoint/Output.hs
AgeCommit message (Collapse)AuthorFilesLines
2018-03-18Removed old-locale flag and Text.Pandoc.Compat.Time.John MacFarlane1-1/+1
This is no longer necessary since we no longer support ghc 7.8.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-02-27Powerpoint writer: Use table stylesJesse Rosenthal1-3/+17
This will use the default table style in the reference-doc file. As a result they will be easier when using in a template, and match the color scheme.
2018-02-20Powerpoint writer: Use ph name and idx for getting layout shapesJesse Rosenthal1-37/+26
Internal change: when we take shapes from the layout for title, content, etc, we should use the attributes of the "ph" (placeholder) tag -- idx and name. This is what powerpoint uses internally, and therefore seems more dependable across reference-docs than using the shape names, as we had previously done. There should be no output changes as a result of this commit.
2018-02-19Powerpoint writer: Add notesMaster to presentation.xml if necessaryJesse Rosenthal1-25/+54
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-18Powerpoint writer: Another attempt at avoiding compiler warnings.Jesse Rosenthal1-4/+2
2018-02-18Powerpoint writer: fix compiler complaints.Jesse Rosenthal1-7/+11
2018-02-18Powerpoint writer: separate SpeakerNotes paragraphs with empy parJesse Rosenthal1-4/+8
This will add a space between notes paragraphs, which seems more like what most users would do by hand (press "enter" twice).
2018-02-18Powerpoint writer: Ignore links and (end)notes in speaker notes.Jesse Rosenthal1-1/+9
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-18Powerpoint writer: Output speaker notes.Jesse Rosenthal1-25/+287
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-18Powerpoint writer: modify speaker notes in presentation.xmlJesse Rosenthal1-1/+12
We remove the `notesMasterIdLst` entry in `presentation.xml` if there no speaker notes in the presentation.
2018-02-18Powerpoint writer: Read speaker note templates conditionallyJesse Rosenthal1-18/+38
If there are speaker notes in the presentation, we read in the notesMasters templates from the reference pptx file.
2018-02-18EMF Image size support (#4375)Andrew Pritchard1-0/+1
2018-01-18Powerpoint writer: Implement syntax highlightingJesse Rosenthal1-22/+35
This also necessitated implementing colors and underlining, though there is currently no way to produce these from markdown. Note that background colors can't be implemented in PowerPoint, so highlighting styles that require these will be incomplete.
2018-01-18Powerpoint writer: Make our own docProps/core.xml file.Jesse Rosenthal1-7/+32
This allows us to set document metadata properties from pandoc metadata.
2018-01-18Powerpoint writer: Add docProps to Presentation datatype.Jesse Rosenthal1-5/+5
This picks up the necessary information from meta and carries it over to the XML output, so Output.hs doesn't need access to the original pandoc information.
2018-01-17Powerpoint writer: Use slideids to simplify code.Jesse Rosenthal1-37/+66
2018-01-17Powerpoint writer: Revamp slide typeJesse Rosenthal1-15/+15
This is an internal change to the Presentation type. The algebraic datatype that used to be called `Slide` is now `Layout`, and Slide is defined as `Slide SlideId Layout (Maybe Notes)`. Though there should be no user-visible changes in this commit, it offers two benefits moving forward: 1. Slides now carry their Id with them, instead of being assigned it in deck order. This makes it easier to set up a link to, say, an endnotes slide ahead of time. 2. This makes room for Notes slides, when we implement them.
2018-01-17Powerpoint writer: Move image sizing into picProps.Jesse Rosenthal1-4/+3
Rather than passing around attributes, we can have image sizing in the picProps and then pass it along to write to XML.
2018-01-15Powerpoint writer: Improve table placement.Jesse Rosenthal1-9/+5
2018-01-15Powerpoint writer: Make our own _rels/.rels file.Jesse Rosenthal1-21/+43
The toplevel .rels file could have a thumbnail image if taken from the template. Rather than removing it from the inherited file, it's easier to just make our own.
2018-01-15Powerpoint writer: Import reference-doc images properly.Jesse Rosenthal1-2/+2
There was a glob error that was leading to images from the reference-doc pptx not being imported. We don't need a glob here -- just replace it with `isPrefixOf`.
2018-01-14Powerpoint writer: Fix anchor links.Jesse Rosenthal1-43/+22
They were broken when I refactored (the Output module wanted to use state left over from the construction of the Presentation type). This change introduces a new type `LinkTarget = InternalTarget | ExternalTarget`. Internal target points to a slide number, and these will all be resolved before the Presentation is passed along to the Output module.
2018-01-14Powerpoint writer: Refactor into separate modules.Jesse Rosenthal1-0/+1431
There are two steps in the conversion: a conversion from pandoc to a Presentation datatype modeling pptx, and a conversion from Presentation to a pptx archive. The two steps were sharing the same state and environment, and the code was getting a bit spaghetti-ish. This separates the conversion into separate modules (T.P.W.Powerpoint.Presentation, which defineds the Presentation datatype and goes Pandoc->Presentation) and (T.P.W.Pandoc.Output, which goes Presentation->Archive). Text.Pandoc.Writers.Powerpoint a thin wrapper around the two modules.