mailRe: latex_mf_table.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on March 10, 2009 - 20:43:
On Tue, Mar 10, 2009 at 7:26 PM, Sébastien Morin
<sebastien.morin.1@xxxxxxxxx> wrote:
Hi Ed,

Your proposal works for not crashing when a spin is not selected.

However, for this not selected spin, the printout is something like:

   :3\&:LEU@N           & \

Oh, that is strange.  It should produce:

   :3\&:LEU@N           & \\

hence terminating the table row.


Hence, it doesn't compile with latex.

Something like this compiles without problem:

   :3\&:LEU@N           & \multicolumn{11}{c}{} \\


Hence, I would add the following change to you fix:

           # The spin is not selected.
           if not spin.select:
               self.file.write("\\multicolumn{11}{c}{} \\\\\n")
               continue

This should fix the problem!


The same could fix things if a spin has no model...

               # The model-free model.
               if hasattr(spin, 'model'):
                   self.file.write("$%s$ & " % spin.model)
               else:
                   self.file.write("\\multicolumn{11}{c}{} \\\\\n")

This one will cause problems as the rest of the spin info will be
printed on the next line, producing a broken table.  You would need a
continue statement at the end of the 'else' section to avoid this
breakage.

Regards,

Edward



Related Messages


Powered by MHonArc, Updated Tue Mar 10 21:01:05 2009