fortran code and manual latex mods