tex program structure