improve eqnarray, handle testsuperscript
handle pictures and legends