aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Powerpoint
AgeCommit message (Collapse)AuthorFilesLines
2019-03-01Remove license boilerplate.John MacFarlane2-38/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-27PowerPoint writer: add underlinesJesse Rosenthal1-0/+3
Use span with single class "underline" as in docx writer.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel2-4/+4
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-01-26Improve writing metadata for docx, pptx and odt (#5252)Agustín Martín Barbero2-7/+55
* docx writer: support custom properties. Solves the writer part of #3024. Also supports additional core properties: `subject`, `lang`, `category`, `description`. * odt writer: improve standard properties, including the following core properties: `generator` (Pandoc/VERSION), `description`, `subject`, `keywords`, `initial-creator` (from authors), `creation-date` (actual creation date). Also fix date. * pptx writer: support custom properties. Also supports additional core properties: `subject`, `category`, `description`. * Includes golden tests. * MANUAL: document metadata support for docx, odt, pptx writers
2019-01-04Use toTableOfContents in Powerpoint writer....John MacFarlane1-16/+3
instead of duplicating code.
2018-11-11Text.Pandoc.Shared: add parameter to uniqueIdent, inlineListToIdentifier.John MacFarlane1-1/+2
The parameter is Extensions. This allows these functions to be sensitive to the settings of `Ext_gfm_auto_identifiers` and `Ext_ascii_identifiers`. This allows us to use `uniqueIdent` in the CommonMark reader, replacing some custom code. It also means that `gfm_auto_identifiers` can now be used in all formats. Semantically, `gfm_auto_identifiers` is now a modifier of `auto_identifiers`; for identifiers to be set, `auto_identifiers` must be turned on, and then the type of identifier produced depends on `gfm_auto_identifiers` and `ascii_identifiers` are set. Closes #5057.
2018-10-20Powerpoint: Support raw openxml in pptx writer.Jesse Rosenthal2-12/+25
This allows raw openxml blocks and inlines to be used in the pptx writer. A few caveats: 1. It's up to the user to write well-formed openxml. The chances for corruption, especially with such a brittle format as pptx, is pretty high. 2. Because of the tricky way that blocks map onto shapes, if you are using a raw block, it should be the only block on a slide (otherwise other text might end up overlapping it). 3. The pptx ooxml namespace abbreviations are different from the docx ooxml namespaces. Again, it's up to the user to get it right. Unzipped document and ooxml specification should be consulted. Closes: #4976
2018-10-04Add lookupMeta* functions to Text.Pandoc.Writers.Shared (#4907)Mauro Bieg1-14/+8
Remove exported functions `metaValueToInlines`, `metaValueToString`. Add new exported functions `lookupMetaBool`, `lookupMetaBlocks`, `lookupMetaInlines`, `lookupMetaString`. Use these whenever possible for uniformity in writers. API change (major, because of removed function `metaValueToInlines`. `metaValueToString` wasn't in any released version.)
2018-04-26Remove unused importAlexander Krotov1-1/+1
2018-04-26Simplify curSlideHasSpeakerNotesAlexander Krotov1-4/+2
2018-04-05Powerpoint writer: Handle Quoted InlinesJesse Rosenthal1-2/+13
Closes: #4532
2018-03-30Powerpoint writer: code cleanupJesse Rosenthal1-4/+1
Since we're using mapM_ instead of mapM, we can get rid of the return statement. We also don't need the `unless` statement anymore.
2018-03-25Powerpoint writer: code cleanup.Jesse Rosenthal1-39/+17
2018-03-24Powerpoint writer: simplify code with `ParseXml`Jesse Rosenthal1-23/+2
There were some artifact code blocks around from before `reference-doc` functionality was implemented. This led to ignoring the reference-doc in places. Though I fixed this, I kept the old hacked-up functions instead of replacing them with `parseXml` (imported from Writers.OOXML) which does this in a consistent manner. This commit corrects that oversight.
2018-03-24Powerpoint writer: Allow fallback options when looking for placeholder type.Jesse Rosenthal1-9/+17
2018-03-24Revert "Powerpoint writer: Remove spPr tag from non-body layouts"Jesse Rosenthal1-5/+1
This reverts commit 99fa850a37cc3e56b415754c70ea2d98da709584.
2018-03-24Powerpoint reader: Check reference-doc for all layouts.Jesse Rosenthal1-2/+6
There were a few layouts where we were still just checking the built in pptx doc, instead of the supplied reference doc.
2018-03-23Powerpoint writer: Remove spPr tag from non-body layoutsJesse Rosenthal1-1/+5
This was causing headers to be misaligned when some templates were used.
2018-03-23Powepoint writer: Simplify speaker notesJesse Rosenthal1-27/+31
We now pull the filtered blocks and speaker notes out at the top of the `blocksToSlide` function, and then make SpeakerNotes into a parameter of the `blocksToSlide'` subfunction. The output is the same, but the logic should be easier to follow now.
2018-03-23Powerpoint writer: change notes state to a simpler per-slide valueJesse Rosenthal1-18/+7
We used to keep a map of the slideId-to-notes for each slide. Since we now extract them at the slide level, this is overcomplicated, and we can just extract them before converting a slide and then clear the state after.
2018-03-23Powerpoint writer: Remove `Maybe` from `SpeakerNotes` in `Slide`.Jesse Rosenthal2-71/+71
Previously, we had treated it as a `Maybe`. But there is no difference between not having speaker notes and having empty speaker notes. So we make the SpeakerNotes newtype into a monoid, and test for memptiness instead of testing for Just/Nothing.
2018-03-21Powerpoint writer: handle speaker notes earlier in the conversion processJesse Rosenthal1-15/+23
Internal change: We were getting bad results with the empty text box created by the conversion of notes into an empty paragraph. So we now convert the notes at the `blocksToSlide` stage, by `walkM`ing a function over the blocks that returns `()`, and then filters the notes out. This avoids the need to have a return value for speaker notes, and thus avoids the empty TextBox. Together with the previous commit (256f14c5a), closes #4477.
2018-03-21Powerpoint writer: Keep notes with related blocksJesse Rosenthal1-8/+17
Some blocks automatically split slides (imgs, tables, `column` divs). We assume that any speaker notes immediately following these are connected to these elements, and keep them with the related blocks, splitting after them.
2018-03-18Removed old-locale flag and Text.Pandoc.Compat.Time.John MacFarlane2-2/+2
This is no longer necessary since we no longer support ghc 7.8.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane2-0/+4
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-17hlint fixes.John MacFarlane1-10/+10
2018-02-27Powerpoint writer: use `trim` from SharedJesse Rosenthal1-3/+2
Instead of writing my own.
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-27Powerpoint writer: Remove empty slidesJesse Rosenthal1-2/+38
Make sure there are no empty slides in the pptx output. Because of the way that slides were split, these could be accidentally produced by comments after images. When animations are added, there will be a way to add an empty slide with either incremental lists or pauses. Test outputs checked with MS PowerPoint (Office 2013, Windows 10, VBox). Both files have expected output and are not corrupted.
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 Rosenthal2-10/+30
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-18Powerpoint writer: Read notes into powerpoint Presentatation type.Jesse Rosenthal1-3/+20
We record notes in a map in state while processing.
2018-02-18Powerpoint writer: Change references to Notes to SpeakerNotesJesse Rosenthal1-7/+7
This is to avoid confusion with {foot,end}notes.
2018-02-18EMF Image size support (#4375)Andrew Pritchard1-0/+1
2018-01-19hlint code improvements.John MacFarlane1-38/+36
2018-01-18Powerpoint writer: Implement syntax highlightingJesse Rosenthal2-24/+82
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 Rosenthal2-11/+37
This allows us to set document metadata properties from pandoc metadata.
2018-01-18Powerpoint writer: Add docProps to Presentation datatype.Jesse Rosenthal2-12/+39
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: Link notes to endnotes slide.Jesse Rosenthal1-19/+25
2018-01-17Powerpoint writer: Use more specific slide id names.Jesse Rosenthal1-3/+33
2018-01-17Powerpoint writer: Use slideids to simplify code.Jesse Rosenthal2-60/+91
2018-01-17Powerpoint writer: Revamp slide typeJesse Rosenthal2-48/+97
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: Change reference to notesSlide to endNotesSlideJesse Rosenthal1-11/+11
This will prevent confusion when speakers notes are implemented.