Improved handling of sub/superscripts. Fixes dcjones/Gadfly.jl#439