Using a nightly worked. Here is a better minimal working example that shows the effect of the redefined command:
---
title: "Minimal Working Example"
header-includes:
- \let\oldsection\section
- \renewcommand{\section}[1]{\clearpage\oldsection{#1}}
---
# Heading 1 #
Text 1.
# Heading 2 #
Text 2.
The command
pandoc -t latex --latex-engine=xelatex --output=mwe2.pdf mwe2.md
results in a pdf file with each heading on a new page. Producing latex output shows the header inclusions inserted without alteration - without needing the "backtick" notation John mentioned.
Guess I'm using a pandoc nightly until this behaviour migrates into debian/testing :-)
Thanks John, Roland and BP for chipping in to help me.
P.S. It's been ages since I used Google Groups. If there is any way to mark this post or thread "solved" please let me know and I will.
On Thursday, 10 August 2017 03:24:41 UTC+9:30, Roland Hieber wrote:
On 08.08.2017 15:56, David Nebauer wrote:
> Can't install dev pandoc because the ghc archive downloaded as part of
> the process is corrupt.
You could try installing one of the nightlies from
https://github.com/pandoc-extras/pandoc-nightly instead.
- Roland