Allow handlers for setting the actual annotation text.

We use that for shortening link labels and will use it for inline elements.
Extract all available formats for a math formula.