This is at least how it works in my game, 2.42.
There are two different ways to make citizens change attitude: the martial law way and the luxury way. HG uses the luxury way and ST uses the martial law way.
the luxury way means:
black guy + 2 lux -> happy
red + 2 lux -> content
content + 2 lux -> happy
the martial law way:
black guy -> red
red guy -> content
This is why you can have unhappy citizens in your shakespeare city and why a city with HG get happy when you move your unit out.
If you have one red and one black in your ST city, the city will have one content and one red, since the wonder moves the attitude one step in your favor. The city will riot.
If you have one black guy, one defender and HG, your city will city will have one content citizen when done. the defender turns the black guy to red, and HG turns the red guy content. If you then move the defender out, the HG is applied on the black guy directly and turn him into a happy citizen.
This is the way it seems to work in my game
