reorganize some tex snippets