Framework for building tex documents