figures and refs, and keyword escaping for math sequences