title: Variable evaluation in LateX
body: <p>I have the following piece of latex code:</p>
  
  <pre><code>\def\a{1}
  \def\b{2}
  \def\c{\a+\b}
  \def\d{\c/2}
  </code></pre>
  
  <p>I expected \d to have the value 1.5. But it did not. However,  adding parenthesis to the definition of \c like</p>
  
  <pre><code>\def\c{\a+\b}
  </code></pre>
  
  <p>Doesn't work either, because if I use \c somewhere, it complains about the parenthesis. Is there a way to evaluate  \c before dividing it by 2 in the definition of \d? Like:</p>
  
  <pre><code>\def\d{\eval{\c}/2}
  </code></pre>
  
  <p>(I made that \eval up to show what I mean)</p>