Style math according to surrounding context.