This page contains wiring diagrams for adding a new light fixture using an existing receptacle as the source. Diagrams include adding a light from a switched receptacle and tapping an always-hot outlet. Different wiring arrangements are included to allow for either the light or the switch to come first in the circuit.
The white wire on the switch loop is used to carry current from the source to the switch and it is marked with black tape or paint to label it as hot. The black on the switch loop runs from the top switch terminal to the top half of the receptacle. With this arrangement the top half of the duplex is controlled with the switch and the bottom half is always hot.
This drawing shows the wiring for adding a new light fixture using an always-hot receptacle outlet as the source. New cable is run from the receptacle to the new fixture location and a switch loop cable is run from there to the new switch location.
This page contains several diagrams for wiring a switch to control one or more receptacle outlets including a split receptacle and multiple outlets wired together.