iandol / scrivomatic

A writing workflow using Scrivener's style system + Pandoc for output…
https://iandol.github.io/scrivomatic/
GNU General Public License v3.0
296 stars 31 forks source link

Question—export to .pptx #16

Closed atanasj closed 6 years ago

atanasj commented 6 years ago

Hi,

Great scripting—this has really helped my workflow so much!

I am having trouble exporting a slideshow. I cannot seem to get the pandoc_title_block to appear as would be expected when trying to go via the workflow.

I have used the template provided in the pandoc use manual (see the 'Producing slide shows with pandoc' section for the example habits.txt file).

Specifically, this appears at the top of the document:

% Habits
% John Doe
% March 22, 2005

The cli code provided in the manual is:

pandoc habits.txt -o habits.pptx

This works as expected (see habitsOk.pptx). Now, I have added the following to the pandocomatic.yaml file:

  pptx:
    extends: ['refs']
    pandoc:
      from: markdown
      to: pptx
      reference-doc: "_templates/uow_custom.pptx"  #templates/custom.docx

All other attributes print as normal, however the title block does not (see habitsNotOk.pptx). I'm not sure whether it is because when going through the workflow it is converting form markdown and not txt as per the pandoc provided example, or something else completely different.

Any ideas? Your help is greatly appreciated!

Cheers, Atanas

iandol commented 6 years ago

Hi Atanas, that is an easy fix. The problem is that the sample markdown uses a title block for metadata, but pandocomatic uses YAML metadata, and you can't use both easily. As Pandoc fully supports the content of title block n YAML, if you format your metadata like so:

---
title: Habits
author: Joanna Doe
date: March 22, 2005
pandocomatic:
  use-template: pptx
---

Then the title slide is also produced via pandocomatic :-)

atanasj commented 6 years ago

AWESOME!

So simple, thanks. Truly appreciate all your help @iandol.

Question/issues closed!

:-)