more updates to support latex destination

includes bug fixes for interaction with geometry and tocloft.