title: Making a small modification to a LaTeX environment
body: <p>I've been using <code>\begin{figure} ... \end{figure}</code> throughout my LaTeX document, but the default styling is ugly; namely, the figures are all left-aligned.  Is there a way to redefine the "figure" environment so it automatically inserts some centering commands such as like this?:</p>
  
  <pre><code>\begin{figure} \begin{center}
  \end{center} \end{figure}
  </code></pre>
  
  <p>Sure, I could use <code>\newenvironment</code> to define a "cfigure" environment, but that's undesirable.  I don't want to go through and change all my "figures" to "cfigures" (and then later realise I wanted all the figures to be right-aligned and have to rename them all to "rfigures").</p>
  
  <p>I could use <code>\renewenvironment</code>, but then I'd have to dig through the LaTeX source to find what the "figure" environment was originally defined as copy/paste it in.</p>
  
  <p>I <em>almost</em> found what I wanted at <a href="http://texblog.net/latex-archive/plaintex/expandafter/" rel="noreferrer">this blog post</a>, but the example there was for a command, not an environment.</p>