PaperStatistical mechanical theory for nonuniform fluids. II. Hard-sphere fluid in the presence of an external field