title: Substitution in a file name with reStructuredText (Sphinx)?
body: <p>I want to create several files from a single template, which differ only by a variable name. For example :</p>
  
  <p>(file1.rst):</p>
  
  <pre><code>.. |variable| replace:: 1
  .. include template.rst
  </code></pre>
  
  <p>(template.rst) :</p>
  
  <pre><code>Variable |variable|
  =====================
  
  Image
  -------
  
  .. image:: ./images/|variable|-image.png
  </code></pre>
  
  <p>where of course I have an image called "./images/1-image.png". The substitution of "|variable|" by "1" works well in the title, but not in the image file name, and at compilation I get :</p>
  
  <pre><code>WARNING: image file not readable: ./images/|variable|-image.png
  </code></pre>
  
  <p>How can I get reST to make the substitution in the variable name too? (if this changes anything,  am using Sphinx).</p>