added support for shifting raw:: latex directive to after endframe