title: Emacs org-mode: define variable in buffer and access variable
body: <p>I would like to define a buffer wide variable in an org-file and use the value from this variable later for, e.g., define the width of images for latex export.</p>
  
  <p>Is there a way how this can be done?</p>
  
  <p>Can this be done using <code>#+CONSTANTS:</code>?</p>
  
  <p>Ideally, it should work like this:</p>
  
  <p>I define a variable <code>image_width</code> in a buffer, e.g.</p>
  
  <pre><code>image_width=10
  </code></pre>
  
  <p>and use this variable in for <code>#+ATTR_LATEX:</code> settings, e.g., <code>#+ATTR_LATEX: :width $image_width</code>.</p>