Age | Commit message (Collapse) | Author | Files | Lines |
|
...not just using `--variable` on the command line (as in
other writers). Closes #7187.
|
|
This should speed-up recompilation after changes in `Text.Pandoc.Class`,
as the number of modules affected by a change will be smaller in
general. It also offers faster insights into the parts of `T.P.Class`
used within a module.
|
|
* Use implicit Prelude
The previous behavior was introduced as a fix for #4464. It seems that
this change alone did not fix the issue, and `stack ghci` and `cabal
repl` only work with GHC 8.4.1 or newer, as no custom Prelude is loaded
for these versions. Given this, it seems cleaner to revert to the
implicit Prelude.
* PandocMonad: remove outdated check for base version
Only base versions 4.9 and later are supported, the check for
`MIN_VERSION_base(4,8,0)` is therefore unnecessary.
* Always use custom prelude
Previously, the custom prelude was used only with older GHC versions, as
a workaround for problems with ghci. The ghci problems are resolved by
replacing package `base` with `base-noprelude`, allowing for consistent
use of the custom prelude across all GHC versions.
|
|
* Update copyright year
* Copyright: add notes for Lua and Jira modules
|
|
The haddock module header contains essentially the
same information, so the boilerplate is redundant and
just one more thing to get out of sync.
|
|
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.
|
|
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.
|