I’m hoping this is the right thread for someone who is new to Pandoc and YAML to ask what might be a stupid question.
I have written a YAML that works:
[code]—
title: ‘<$level1_title>’
abstract: |
Prepared for: <$custom:Clientfullname>
Draft version: <$custom:Draft #>
Draft date: <$longModifiedDate>
Prepared by: <$fullname>
Project started: <$longCreatedDate>
Words: <$wc>
ALL COPY IS UNPROOFED UNTIL THE FINAL VERSION
© Taleist 2018. All rights reserved.
<$img:Taleistlogo;w=150>
—[/code]
The problem is when I try to use replacements to insert double carriage returns between paragraphs when outputting with Pandoc to Word. (If I don’t, then Pandoc’s reference.docx sees only line breaks not paragraph breaks, which affects lists, etc.)
If I use replacements to insert a full line between paragraphs for Markdown then it breaks the YAML.
In this version, I use replacements to put in a clean line, so all the paragraphs are correctly formatted. However, Pandoc doesn’t recognise the YAML I used as front matter.
https://www.dropbox.com/s/dncr4soejxb0ao0/yaml%20with%20replacements%20turned%20on.docx?dl=1
In this version, everything is the same except I don’t run the text through replacements to insert an extra carriage return. The result is that the YAML shows up perfectly before the table of contents, but there are only line breaks between my paragraphs.
https://www.dropbox.com/s/3p5d4ya17khdglh/YAML%20with%20replacements%20turned%20off.docx?dl=1
I confess that I learn this sort of thing by trial and error, reading forums, cobbling things together, etc. I’ve spent hours over a couple of weekends trying to work this out because I don’t like asking questions that I could find the answer to with a little work.
As is probably obvious, I’m not a script person, so I know enough perhaps to be dangerous. In short, my reach might be exceeding my grasp here, so any help would be much appreciated.
To my mind, I’m looking for a way to exclude my YAML page from being included during the replacement stage.