title: Include by \input an header-includes: preamble in a markdown file
body: <p>I have plenty of markdown files starting with a rather long <code>header-includes</code>, followed by some included directives:</p>
  <pre><code>---
  header-includes:
  - \usepackage{fvextra}
  - \usepackage{tcolorbox}
  - \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakanywhere,breaksymbol=,breakanywheresymbolpre=,commandchars=\\\{\}}
  - \usepackage[margins=raggedright]{floatrow}
  
  title: &quot;Mathématiques  \n55. Les dérivées&quot;
  subtitle: &quot;&quot;
  author: Marc Le Bihan
  geometry: margin=2cm
  fontsize: 12pt
  output: pdf
  classoption: fleqn
  urlcolor: blue
  ---
  
  \input{apprentissage-include}
  </code></pre>
  <p>where <code>apprentissage-include.tex</code> has such definitions:</p>
  <pre class="lang-latex prettyprint-override"><code>\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakanywhere,breaksymbol=,breakanywheresymbolpre=,commandchars=\\\{\}}
  
  \newcommand{\donnee}[1]{\textbf{\textcolor{Purple}{#1}}}
  \newcommand{\definition}[1]{\textbf{\textcolor{blue}{#1}}}
  [...]
  </code></pre>
  <p>I would like to include the <code>header-includes</code> preamble too, to change its content more easily when updates are needed.</p>
  <p>I've created an <code>header-include.tex</code> containing:</p>
  <pre><code>---
  header-includes:
  - \usepackage{fvextra}
  [...]
  ---
  </code></pre>
  <p>But whatever I've tried :</p>
  <pre><code>\input{header-include}
  \input{apprentissage-include}
  </code></pre>
  <p>or</p>
  <pre><code>---
  \input{header-include}
  ---
  
  \input{apprentissage-include}
  </code></pre>
  <p>I'm receiving the message :<br />
  <code>! LaTeX Error: Can be used only in preamble.</code></p>
  <p>Do I have a way to succeed?</p>