Here is an article from Texas Instruments featured on EETimes describing how to design a buck-boost converter. These converters are used when the input voltage can be both above and below the output voltage. One example are 3.3V systems powered by lithium-ion batteries which swing from ~3V to ~4V.
This design is in effect a combination of both buck and boost reference designs. When the right switch is left open and control is applied to the left switch a buck converter is made. Vice-versa, when the left switch is left closed and control is applied to the right switch a boost converter is built.
A graph describing the transition form buck to boost is below.