Age | Commit message (Collapse) | Author | Files | Lines |
|
This seems to be necessary if we are to use our custom Prelude
with ghci.
Closes #4464.
|
|
|
|
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.
|
|
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.
|
|
Just as a slide can't have an image and text on the same slide because
of overlapping, we can't have both in a single column. We run
splitBlocks on the text in the column and discard the rest.
|
|
You can have two images side-by-side, or text alongside an image. The
image will be fit correctly within the column.
|
|
We put `getContentShape` and `getContentShapeSize` inside the P monad,
so that we can (in the future) make use of knowledge of what slide
environment we're in to get the correct shape. This will allow us, for
example, to get individual columns for a two-column layout, and place
images in them appropriately.
|
|
We now determine image and caption placement by getting the dimensions
of the content box in a given layout. This allows for images to be
correctly sized and positioned in a different template.
Note that iamges without captions and headers are no longer
full-screened. We can't do this dependably in different layouts,
because we don't know where the header is (it could be to the side of
the content, for example).
|
|
Our presentation size is now dependent on the reference/template file
we use. This will make it easier to set different output sizes by
supplying different reference files. The alternative (allowing a user
to explicitly set output size regardless of the template) will lead to
too many thorny issues, as explicitly set sizes at the various level
of powerpoint layout would have to be reset.
|
|
Last commit accidentally left commented-out code in.
|
|
Above the slidelevel, subheaders will be printed in bold and given a
bit of extra space before them. Note that at the moment, no
distinction is made between levels of headers above the slide header,
though that can be changed. (It has to be changed in pandoc, since
PowerPoint has no concept of paragraph or character classes.)
This allows us to clean up the code as well: the code in
`blockToParagraphs` since it will only touch content blocks, and
therefore will not deal with headers at or below the slidelevel.
|
|
Since we now import from reference/dist file by glob, we need to make
sure that we're getting the files we need to make a non-corrupt
Powerpoint. This performs that check.
(In the process, this change also cleaned up a lot of commented-out
code left from the switch to the new reference-doc method.)
|
|
Templating should work much more reliably now. There is still some
problem with image placement when we change sizes. A further commit
will address this.
|
|
|
|
Accompanying change in MANUAL.txt
|
|
It used to be hardcoded to 2. This will set it to the appropriate
slide-level.
|
|
This is triggered by the `--toc` flag. Note that in a long slide deck
this risks overrunning the text box. The user can address this by
setting `--toc-depth=1`.
|
|
Previously, this hadn't been aware of a metadata slide. We also
clarify the logic for setting the startnumber of different slide
sections correctly.
|
|
If the user entered an internal link without a corresponding anchor,
it would produce a corrupted file. Now we check the anchor map, and
make sure the target is in the file. If it isn't, we ignore it.
|
|
We want to count the slide numbers correctly if it's in there.
|
|
For anchor-type links (`[foo](#bar)`) we produce an anchor link. In
powerpoint these are links to slides, so we keep track of a map
relating anchors to the slides they occur on.
|
|
For anchors, block-processing functions need to know what slide number
they're in. We make the envCurSlideId available to blocks.
|
|
It really isn't a moving state, and that can be misleading.
|
|
|
|
|
|
For now, ignore notes div for parity with other slide outputs.
|
|
We had previously defaulted to slideLevel 2. Now we use the correct
behavior of defaulting to the highest level header followed by
content. We change an expected test result to match this behavior.
|
|
We treat links with an image as the first inline as an image with a
link picProp -- so we have to split on it the same as if it were an
image.
|
|
This will make the xml easier to read for debugging purposes. It
should also make links behave more consistently across numerous words.
|
|
Previous version replaced *each* element from the template with the
new elements -- leading to multiple overlapping frames. This only
replaces the first instance, and throws out the rest.
|
|
Previously (a) the code size wasn't set when we force size, and (b)
the properties was set from the default, instead of inheriting. Both
of those problems were fixed.
|
|
A lot of work in the powerpoint writer is replacing XML from within
slidelayouts from templates. This function does a good deal of that
work, and this makes it preserve element order, as well as making it a
bit easier to understand.
|
|
Remove commented-out functions and imports.
|
|
The following markdown:
[![Image Title](image.jpg)](http://www.example.com)
will now produce a linked image in the resulting PowerPoint file.
|
|
We require an empty "<a:p>" tag, even if the cell contains no
paragraphs -- otherwise PowerPoint complains of corruption.
|
|
The record syntax in a pattern match seems to be confusing the 8.X
compilers. Stop using it.
|
|
|
|
This uses the columns/column div format described in the pandoc
manual. At the moment, only two columns (half the screen each) are
allowed. Custom widths are not supported.
|
|
|
|
We don't yet produce incremental lists in PowerPoint, but we should at
least treat lists inside BlockQuotes as lists, for compatibility with
other slide formats.
|
|
This will allow more to fit on a single slide, and will probably look better.
|
|
This replaces the more specific blockQuote runProp, which only
affected the size of blockquotes. We can use this for notes, etc.
|
|
This currently prints all notes on a final slide.
Note that at the moment, there is a danger of text overflowing the
note slide, since there is no logic for adding further slides. A
future commit will shrink the font size on these notes, but that won't
take care of the problem altogether. (We might have to implement some
sort of clumsy page-breaking logic here based on font size and
text-box dimensions, though that seems like a can of worms.)
|
|
When we encounter a note, we write it to the state directory of notes,
and input a superscript.
|
|
First step toward implementing notes in pptx writer.
|
|
These are currently implemented in terms of a Bold para for the terms,
and then blockquotes for the definitions. THis can be refined a bit in
the future.
|
|
|
|
|
|
This imports the essential Powerpoint writer.
It works following the standard Pandoc conventions for making other
sorts of slides. At the moment, there are still these TODOs:
1. Syntax highlighting is not yet implemented. (This is difficult
because there are no character classes in Powerpoint.)
2. Footnotes and Definition lists are not yet implemented. (Notes will
usually take the form of a final slide.
3. Image placement and auto-resizing has a few glitches.
4. Reference powerpoint files don't work dependably from the command
line. This will be implemented, but at the moment users are advised
to change themes from within Powerpoint.
|