Magnetic Field Dependence of the Energy Gap in Nanotubes