More work on scripts and tex.