The density profile and surface tension of a Lennard-Jones fluid from a generalized van der Waals theory