Age | Commit message (Collapse) | Author | Files | Lines |
|
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.)
|
|
|
|
|
|
Closes: #4532
|
|
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.
|
|
|
|
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.
|
|
|
|
This reverts commit 99fa850a37cc3e56b415754c70ea2d98da709584.
|
|
There were a few layouts where we were still just checking the built
in pptx doc, instead of the supplied reference doc.
|
|
This was causing headers to be misaligned when some templates were used.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
This is no longer necessary since we no longer support ghc 7.8.
|
|
This seems to be necessary if we are to use our custom Prelude
with ghci.
Closes #4464.
|
|
|
|
Instead of writing my own.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
This will add a space between notes paragraphs, which seems more like
what most users would do by hand (press "enter" twice).
|
|
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.
|
|
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.
|
|
We remove the `notesMasterIdLst` entry in `presentation.xml` if there
no speaker notes in the presentation.
|
|
If there are speaker notes in the presentation, we read in the
notesMasters templates from the reference pptx file.
|
|
We record notes in a map in state while processing.
|
|
This is to avoid confusion with {foot,end}notes.
|
|
|
|
|
|
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.
|
|
This allows us to set document metadata properties from pandoc metadata.
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
This will prevent confusion when speakers notes are implemented.
|
|
Rather than passing around attributes, we can have image sizing in the
picProps and then pass it along to write to XML.
|
|
|
|
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.
|
|
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`.
|
|
We don't need it for anything but the log messages, and we can just
keep track of that in state and pass it along to the `writePowerpoint`
function. This will simplify the code.
|
|
We don't convert a '#target' ExternalTarget to an InternalTarget if
`target` is not in the AnchorMap. We just remove the link. This
prevents broken links in the Powerpoint output.
|
|
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.
|