added trim to imagemagick

The images created by mathmode are slightly larger than necessary. If this is not the intended behavior, it can be fixed by adding a trim flag in the imagemagick settings