title: How to format fortran output in Maxima
body: <p>I am using Maxima (aka Macsyma) to generate some coefficients and Maxima has to write the fortran representation of the expression in an external file for a python program to read out of.</p>
  
  <p>I am using the following piece of code to write the coefficients down:</p>
  
  <pre><code>with_stdout ("An.txt",
      for n : 0 thru N do
          fortran(A[n]));
  </code></pre>
  
  <p>But unfortunately they get written down in the file <code>An.txt</code> exactly like this:</p>
  
  <pre><code>      exp(beta*t)*(-alpha*(beta**2*t**2+2*beta*t+2)*exp(-beta*t)*D/beta*
       1   *3+alpha*(beta*t+1)*exp(-beta*t)*D/beta**2-alpha**2*(beta**4*t*
       2   *4+4*beta**3*t**3+12*beta**2*t**2+24*beta*t+24)*exp(-beta*t)/be
       3   ta**5+2*alpha**2*(beta**3*t**3+3*beta**2*t**2+6*beta*t+6)*exp(-
       4   beta*t)/beta**4-alpha**2*(beta**2*t**2+2*beta*t+2)*exp(-beta*t)
       5   /beta**3+%c)
        alpha*(t-1)*t
        beta
        (2*(beta*D+3*alpha*beta*(t-1)*t)+alpha*t+alpha*(t-1))/A_0(t)/6.0E+
       1   0
  </code></pre>
  
  <p>yes, that's with a five(or six)-space indentation before every entry and with the numbers indicating a continuation of expression.</p>
  
  <p>Any chance I can get a easier-to-read version of this? Every entry in one full line would be ideal. I have already tried the function <code>f90</code> but it prints out nothing and I have also tried to use <code>fortindent</code> and <code>fortspaces</code> but nothing changes (I might be using the wrong syntax for them, though).</p>
  
  <p>Thanks in advance.</p>