Age | Commit message (Collapse) | Author | Files | Lines |
|
Starting numbers for ordered lists were previously ignored. Now we
specify the number if it is something other than 1.
Closes: #5709
|
|
This commit alters the way in which the Powerpoint writer treats
inline code and code blocks.
- Inline code is now formatted at the same size as the surrounding
text.
- Code blocks are now given a margin and font size according to their
level.
- Furthermore this commit allows changing the font with which code is
formatted via the `monofont` option.
Tested in
- PowerPoint 365 for Windows - 1808 (Build 10730.20344 Click-to-Run)
- PowerPoint 365 for Mac - 16.26 (19060901)
|
|
I had been using record syntax in an ADT, is bad style, since it means
that each record produces a partial function. Fortunately we weren't
using the partial functions anywhere, so this changes it to positional
syntax.
|
|
When editing a template/reference-doc, the user might be in Master
view, but when producing a slide show, it is assumed that slide view
will be desired. This removes the "lastView" attr from the
viewProps.xml slide so that the presentation will always open up in
slide view.
Note this requires creating a new "ppt/viewProps.xml" instead of just
moving over the old one from the viewProps file. Since this produces a
slightly different order of xml files in the content manifest, the
golden files will have to be rebuilt.
|
|
We don't build it at the moment, so it was causing corruption.
|
|
We were previously carrying over too many elements from the layout,
which produced visual artifacts and some corruption. This empties the
sptree (except for properties) after building the shapes, and then
inserts them.
Together with 5e944bf5, fixes #5402
(Note that this addresses the issue and template in that particular
bug report. Other issues will arise no doubt arise with other
templates.)
|
|
Previously we had applied content shapes based on their index (which
was "1", "2" in MS Word 2013). It turns out that this was a
convention, and could not be relied on. Instead we use a default
type (ie, a ph tag with no "type"). This is more correct, and should
make the application of reference documents in PowerPoint much more
robust.
|
|
This is the first step toward making templating work better. It seems
that content shapes have a default ph type. In other words, shapes
with *NO PH TYPE* should be considered to have an "obj" ph type, and
used as content shapes.
see https://github.com/scanny/python-pptx/blob/master/docs/dev/analysis/placeholders/slide-placeholders/placeholders-in-new-slide.rst
|
|
If the slide deck has a metadata slide (with author, title, etc) and
has speaker notes before any body content, the speaker notes will be
applied to the metadata slide. If there is no metadata slide, pandoc
will behave as before.
|
|
Previously, if notes came after a section-title header (ie, a level-1
header in a slide-level=2 presentation), they would go on the next
slide. This keeps them on the slide with the header.
|
|
The haddock module header contains essentially the
same information, so the boilerplate is redundant and
just one more thing to get out of sync.
|
|
Use span with single class "underline" as in docx writer.
|
|
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.
|
|
* 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
|
|
instead of duplicating code.
|
|
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.
|
|
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
|
|
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.
|